Skip to content

Commit 243a640

Browse files
committedJul 14, 2020
Add option to disable compile tests
1 parent b196000 commit 243a640

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed
 

‎.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
6969
- name: Configure CMake build
7070
run: |
71-
cmake -S . -B build -DBUILD_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug
71+
cmake -S . -B build -DBUILD_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug -DBUILD_COMPILE_TESTS=0
7272
7373
- name: Cleanup CMake compiler check
7474
run: |

‎CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ endif()
5050

5151

5252
option(BUILD_TESTS "Build tests" ON)
53+
option(BUILD_COMPILE_TESTS "Build compile tests" ON)
5354
if(BUILD_TESTS)
5455
enable_testing()
5556
endif()

‎tests/CMakeLists.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ package_add_test(test_state_machine
6262
package_add_test(test_variant
6363
test_variant.cc)
6464

65-
# compilation tests
66-
expect_compile_failure(failure_surjection_duplicate_keys.cc)
67-
expect_compile_failure(failure_surjection_entries_not_pairs.cc)
68-
expect_compile_failure(failure_bijection_duplicate_values.cc)
65+
if(BUILD_COMPILE_TESTS)
66+
# compilation tests
67+
expect_compile_failure(failure_surjection_duplicate_keys.cc)
68+
expect_compile_failure(failure_surjection_entries_not_pairs.cc)
69+
expect_compile_failure(failure_bijection_duplicate_values.cc)
70+
endif()

0 commit comments

Comments
 (0)
Please sign in to comment.