Skip to content

Commit bd7b963

Browse files
committed
Include full checking for performance test suite.
1 parent d36dac6 commit bd7b963

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

benchmark/CMakeLists.txt

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
2-
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/PerfTestSuite/CMakeLists.txt)
3-
add_subdirectory(PerfTestSuite)
1+
option(SWIFT_INCLUDE_PERF_TESTSUITE "Create targets for swift performance benchmarks." YES)
2+
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
3+
# Performance test harness only builds on Darwin.
4+
if (SWIFT_INCLUDE_PERF_TESTSUITE)
5+
set(PERF_TESTSUITE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/PerfTestSuite" CACHE STRING "Path to swift performance testsuite repo.")
6+
if(EXISTS ${PERF_TESTSUITE_DIR}/CMakeLists.txt)
7+
add_subdirectory(${PERF_TESTSUITE_DIR})
8+
else()
9+
message(FATAL_ERROR "Can't find the Swift performance suite at ${PERF_TESTSUITE_DIR}/.")
10+
endif()
11+
add_custom_target(benchmark-swift
12+
DEPENDS benchmark-swift PerfTests_Onone PerfTests_O
13+
PerfTests_Ounchecked)
14+
endif()
415
endif()
16+

0 commit comments

Comments
 (0)