From c6a04afa12c623f960eec2ce169ca947baa1a98e Mon Sep 17 00:00:00 2001 From: ThePhD Date: Fri, 7 May 2021 13:44:45 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Bless=20the=20windows=20build!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/exceptions/CMakeLists.txt | 27 +++++++++++++++----- tests/numerics/CMakeLists.txt | 3 ++- tests/regression_tests/simple/CMakeLists.txt | 14 ++++++++-- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/tests/exceptions/CMakeLists.txt b/tests/exceptions/CMakeLists.txt index 56619564..87f4c4d6 100644 --- a/tests/exceptions/CMakeLists.txt +++ b/tests/exceptions/CMakeLists.txt @@ -28,12 +28,25 @@ file(GLOB sources source/*.cpp) sol2_create_basic_test(sol2.tests.exceptions sol2::sol2 ${sources}) -target_compile_definitions(sol2.tests.exceptions PRIVATE - SOL_ALL_SAFETIES_ON=1) -target_compile_options(sol2.tests.exceptions PRIVATE - ${--allow-unreachable-code}) sol2_create_basic_test(sol2.tests.exceptions.SOL_ALL_SAFETIES_ON sol2::sol2 ${sources}) -target_compile_definitions(sol2.tests.exceptions.SOL_ALL_SAFETIES_ON PRIVATE - SOL_ALL_SAFETIES_ON=1) -target_compile_options(sol2.tests.exceptions.SOL_ALL_SAFETIES_ON PRIVATE +target_compile_options(sol2.tests.exceptions + PRIVATE ${--allow-unreachable-code}) +target_compile_options(sol2.tests.exceptions.SOL_ALL_SAFETIES_ON + PRIVATE + ${--allow-unreachable-code}) +target_compile_definitions(sol2.tests.exceptions.SOL_ALL_SAFETIES_ON + PRIVATE + SOL_ALL_SAFETIES_ON=1) + +if (WAY_TOO_BUSTED_RIGHT_NOW) + +sol2_create_basic_test(sol2.tests.exceptions.SOL_EXCEPTIONS_ALWAYS_UNSAFE sol2::sol2 ${sources}) +target_compile_options(sol2.tests.exceptions.SOL_EXCEPTIONS_ALWAYS_UNSAFE + PRIVATE + ${--allow-unreachable-code}) +target_compile_definitions(sol2.tests.exceptions.SOL_EXCEPTIONS_ALWAYS_UNSAFE + PRIVATE + SOL_EXCEPTIONS_ALWAYS_UNSAFE=0) + +endif() diff --git a/tests/numerics/CMakeLists.txt b/tests/numerics/CMakeLists.txt index b2c27297..4cc8bf03 100644 --- a/tests/numerics/CMakeLists.txt +++ b/tests/numerics/CMakeLists.txt @@ -29,5 +29,6 @@ file(GLOB sources sol2_create_basic_test(sol2.tests.numerics sol2::sol2 ${sources}) sol2_create_basic_test(sol2.tests.numerics.SOL_ALL_SAFETIES_ON sol2::sol2 ${sources}) -target_compile_definitions(sol2.tests.numerics.SOL_ALL_SAFETIES_ON PRIVATE +target_compile_definitions(sol2.tests.numerics.SOL_ALL_SAFETIES_ON + PRIVATE SOL_ALL_SAFETIES_ON=1) diff --git a/tests/regression_tests/simple/CMakeLists.txt b/tests/regression_tests/simple/CMakeLists.txt index 82ee854d..2a740dd5 100644 --- a/tests/regression_tests/simple/CMakeLists.txt +++ b/tests/regression_tests/simple/CMakeLists.txt @@ -27,7 +27,17 @@ file(GLOB_RECURSE sources CONFIGURE_DEPENDS source/*.cpp) -sol2_create_basic_test(sol2.tests.regression sol2::sol2 ${sources}) +sol2_create_basic_test(sol2.tests.regression.simple sol2::sol2 ${sources}) +sol2_create_basic_test(sol2.tests.regression.simple.SOL_ALL_SAFETIES_ON sol2::sol2 ${sources}) +target_compile_options(sol2.tests.regression.simple + PRIVATE ${--allow-unreachable-code}) +target_compile_options(sol2.tests.regression.simple.SOL_ALL_SAFETIES_ON + PRIVATE ${--allow-unreachable-code}) if (SOL2_TESTS_SINGLE) - sol2_create_basic_test(sol2.single.tests.regression sol2::sol2::single ${sources}) + sol2_create_basic_test(sol2.single.tests.regression.simple sol2::sol2::single ${sources}) + sol2_create_basic_test(sol2.single.tests.regression.simple.SOL_ALL_SAFETIES_ON sol2::sol2::single ${sources}) + target_compile_options(sol2.single.tests.regression.simple + PRIVATE ${--allow-unreachable-code}) + target_compile_definitions(sol2.single.tests.regression.simple.SOL_ALL_SAFETIES_ON + PRIVATE SOL_ALL_SAFETIES_ON=1) endif()