Skip to content

Commit e653040

Browse files
committed
cmake: Enter subdirectories before setting up benchmark.
Perform add_subdirectory() calls before setting up singlesource/multisource benchmarks to avoid settings of the parent directory influencing independent benchmarks in the subdirectory. As far as I can tell there is no problem today, but we should get used to the safe style. llvm-svn: 286142
1 parent 7ad24e2 commit e653040

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
llvm_add_subdirectories(Large)
2+
13
list(APPEND LDFLAGS -lm)
24
llvm_singlesource()
3-
4-
llvm_add_subdirectories(Large)
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
llvm_add_subdirectories(Large)
2+
13
list(APPEND LDFLAGS -lm -lstdc++)
24
set(FP_ABSTOLERANCE 0.01)
35
if(ARCH STREQUAL "XCore")
@@ -6,5 +8,3 @@ if(ARCH STREQUAL "XCore")
68
endif()
79
endif()
810
llvm_singlesource()
9-
10-
llvm_add_subdirectories(Large)

SingleSource/Benchmarks/Shootout-C++/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
llvm_add_subdirectories(EH)
2+
13
list(APPEND CXXFLAGS -Wno-deprecated)
24
list(APPEND CPPFLAGS -Wno-deprecated)
35
set(FP_TOLERANCE 0.00000001)
@@ -16,5 +18,3 @@ if(TARGET_OS STREQUAL "Darwin")
1618
list(APPEND LDFLAGS -Xlinker -stack_size -Xlinker 0x800000)
1719
endif()
1820
llvm_singlesource(PREFIX "shootout-cxx")
19-
20-
llvm_add_subdirectories(EH)
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
llvm_add_subdirectories(EH)
2+
13
list(APPEND LDFLAGS -lstdc++)
24
llvm_singlesource(PREFIX "regression-cxx")
3-
4-
llvm_add_subdirectories(EH)
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
llvm_add_subdirectories(Large)
2+
13
execute_process(COMMAND date +%j OUTPUT_VARIABLE TMP1)
24
set(SEED TMP1)
35
set(RUN_OPTIONS 31415926)
46
list(APPEND LDFLAGS -lstdc++)
57
llvm_singlesource()
6-
7-
llvm_add_subdirectories(Large)

0 commit comments

Comments
 (0)