Skip to content

Commit 107ae0c

Browse files
committed
Add custom make target for performance tests
1 parent db73ede commit 107ae0c

4 files changed

Lines changed: 9 additions & 15 deletions

File tree

Disruptor.PerfTests/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ set(DisruptorPerfTests_sources
2222
FunctionEvent.cpp
2323
FunctionEventHandler.cpp
2424
LatencyTestSession.cpp
25-
LatencyTestSessionResult.cpp
25+
LatencyTestSessionResult.cpp
2626
LongArrayEventHandler.cpp
2727
MutableLong.cpp
2828
OneToOneRawBatchThroughputTest.cpp
@@ -52,11 +52,9 @@ set(DisruptorPerfTests_sources
5252
ValueMutationEventHandler.cpp
5353
)
5454

55-
5655
add_definitions(-DBOOST_TEST_DYN_LINK)
5756

5857
add_executable(Disruptor.PerfTests ${DisruptorPerfTests_sources})
5958
target_link_libraries(Disruptor.PerfTests DisruptorStatic Disruptor.TestTools ${Boost_LIBRARIES})
6059

61-
add_test(cmake_Disruptor.PerfTests ${CMAKE_CURRENT_BINARY_DIR}/Disruptor.PerfTests)
62-
60+
add_custom_target(performance_test ${CMAKE_CURRENT_BINARY_DIR}/Disruptor.PerfTests)

Disruptor.TestTools/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ include_directories("..")
1212

1313

1414
set(DisruptorTestTools_sources
15-
15+
1616
CountdownEvent.cpp
1717
ManualResetEvent.cpp
1818
ResetEvent.cpp
1919
ScopeExitFunctor.cpp
2020
Stopwatch.cpp
21-
LatencyRecorder.cpp
21+
LatencyRecorder.cpp
2222
)
2323

24-
2524
add_library(Disruptor.TestTools STATIC ${DisruptorTestTools_sources})
26-

Disruptor.Tests/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ set(DisruptorTests_sources
5757
WaitStrategyTestUtil.cpp
5858
WorkerPoolTests.cpp
5959
YieldingWaitStrategyTests.cpp
60-
main.cpp
60+
main.cpp
6161
)
6262

6363
include_directories("..")
@@ -66,4 +66,3 @@ add_executable(Disruptor.Tests ${DisruptorTests_sources})
6666
target_link_libraries(Disruptor.Tests DisruptorStatic Disruptor.TestTools ${GMock_LIBRARY} ${Boost_LIBRARIES})
6767

6868
add_test(cmake_Disruptor.Tests ${CMAKE_CURRENT_BINARY_DIR}/Disruptor.Tests --result_code=no --report_level=no)
69-

Disruptor/CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ set(Disruptor_sources
2626
SpinWaitWaitStrategy.cpp
2727
stdafx.cpp
2828
ThreadPerTaskScheduler.cpp
29-
ThreadHelper_Linux.cpp
30-
ThreadHelper_Windows.cpp
29+
ThreadHelper_Linux.cpp
30+
ThreadHelper_Windows.cpp
3131
TimeoutBlockingWaitStrategy.cpp
3232
TypeInfo.cpp
3333
Util.cpp
@@ -101,7 +101,7 @@ set(Disruptor_headers
101101
SpinWait.h
102102
SpinWaitWaitStrategy.h
103103
ThreadPerTaskScheduler.h
104-
ThreadHelper.h
104+
ThreadHelper.h
105105
TimeoutBlockingWaitStrategy.h
106106
TimeoutException.h
107107
TypeInfo.h
@@ -112,7 +112,6 @@ set(Disruptor_headers
112112
YieldingWaitStrategy.h
113113
)
114114

115-
116115
add_library(DisruptorShared SHARED ${Disruptor_sources})
117116
set_target_properties(DisruptorShared PROPERTIES OUTPUT_NAME Disruptor)
118117
set_target_properties(DisruptorShared PROPERTIES VERSION ${DISRUPTOR_VERSION})
@@ -122,8 +121,8 @@ add_library(DisruptorStatic STATIC ${Disruptor_sources})
122121
set_target_properties(DisruptorStatic PROPERTIES OUTPUT_NAME Disruptor)
123122

124123
install(FILES ${Disruptor_headers} DESTINATION include/Disruptor)
124+
125125
install(TARGETS DisruptorShared DisruptorStatic
126126
LIBRARY DESTINATION lib
127127
ARCHIVE DESTINATION lib
128128
)
129-

0 commit comments

Comments
 (0)