File tree Expand file tree Collapse file tree 3 files changed +12
-31
lines changed Expand file tree Collapse file tree 3 files changed +12
-31
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,9 @@ option(SWIFT_BUILD_STATIC_STDLIB
44
44
"Build static variants of the Swift standard library and SDK overlay"
45
45
FALSE )
46
46
47
- option (SWIFT_INCLUDE_BENCHMARKS
48
- "Create targets for running swift benchmarks"
49
- TRUE )
47
+ option (SWIFT_BUILD_PERF_TESTSUITE
48
+ "Create targets for swift performance benchmarks. "
49
+ FALSE )
50
50
51
51
option (SWIFT_INCLUDE_TESTS "Create targets for building/running tests." TRUE )
52
52
@@ -633,7 +633,7 @@ if(SWIFT_BUILD_TOOLS)
633
633
endif ()
634
634
add_subdirectory (utils )
635
635
add_subdirectory (stdlib )
636
- if (SWIFT_INCLUDE_BENCHMARKS )
636
+ if (SWIFT_BUILD_PERF_TESTSUITE )
637
637
add_subdirectory (benchmark )
638
638
endif ()
639
639
if (SWIFT_INCLUDE_TESTS )
Original file line number Diff line number Diff line change 1
- option (SWIFT_INCLUDE_PERF_TESTSUITE "Create targets for swift performance benchmarks." NO )
2
1
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
3
2
# 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 ()
3
+ set (PERF_TESTSUITE_DIR "${CMAKE_CURRENT_SOURCE_DIR} /PerfTestSuite" CACHE STRING "Path to swift performance testsuite repo." )
4
+ if (EXISTS ${PERF_TESTSUITE_DIR} /CMakeLists.txt )
5
+ add_subdirectory (${PERF_TESTSUITE_DIR} )
6
+ else ()
7
+ message (FATAL_ERROR "Can't find the Swift performance suite at ${PERF_TESTSUITE_DIR} /." )
11
8
endif ()
12
9
endif ()
13
10
Original file line number Diff line number Diff line change @@ -698,10 +698,10 @@ function not() {
698
698
699
699
function true_false() {
700
700
case " $1 " in
701
- false | 0)
701
+ false | FALSE | 0)
702
702
echo " FALSE"
703
703
;;
704
- true | 1)
704
+ true | TRUE | 1)
705
705
echo " TRUE"
706
706
;;
707
707
* )
@@ -1322,15 +1322,6 @@ function cmake_config_opt() {
1322
1322
fi
1323
1323
}
1324
1324
1325
- function should_build_perftestsuite() {
1326
- if [ " $( uname -s) " != Darwin ]; then
1327
- echo " FALSE"
1328
- return
1329
- fi
1330
-
1331
- true_false " ${BUILD_SWIFT_PERF_TESTSUITE} "
1332
- }
1333
-
1334
1325
function set_swiftpm_bootstrap_command() {
1335
1326
swiftpm_bootstrap_command=()
1336
1327
@@ -1480,13 +1471,6 @@ for deployment_target in "${NATIVE_TOOLS_DEPLOYMENT_TARGETS[@]}" "${CROSS_TOOLS_
1480
1471
)
1481
1472
fi
1482
1473
1483
- if [[ $( should_build_perftestsuite) == " TRUE" ]]; then
1484
- swift_cmake_options=(
1485
- " ${swift_cmake_options[@]} "
1486
- -DSWIFT_INCLUDE_PERF_TESTSUITE=YES
1487
- )
1488
- fi
1489
-
1490
1474
swift_cmake_options=(
1491
1475
" ${swift_cmake_options[@]} "
1492
1476
-DSWIFT_AST_VERIFIER:BOOL=$( true_false " ${SWIFT_ENABLE_AST_VERIFIER} " )
@@ -1694,7 +1678,7 @@ for deployment_target in "${NATIVE_TOOLS_DEPLOYMENT_TARGETS[@]}" "${CROSS_TOOLS_
1694
1678
fi
1695
1679
1696
1680
build_targets=(all " ${SWIFT_STDLIB_TARGETS[@]} " )
1697
- if [[ $( should_build_perftestsuite ) == " TRUE" ]]; then
1681
+ if [[ $( true_false " ${build_perf_testsuite_this_time} " ) == " TRUE" ]]; then
1698
1682
native_swift_tools_path=$( build_directory macosx-x86_64 swift) /bin
1699
1683
cmake_options=(
1700
1684
" ${cmake_options[@]} "
You can’t perform that action at this time.
0 commit comments