summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt7
-rw-r--r--tests/otherbinding/CMakeLists.txt2
-rw-r--r--tests/samplebinding/CMakeLists.txt2
3 files changed, 9 insertions, 2 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index dc7c69f6..b9d60262 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,6 +1,13 @@
add_subdirectory(libsample)
add_subdirectory(libother)
+if(WIN32 OR DEFINED AVOID_PROTECTED_HACK)
+ message(STATUS "Tests will be generated avoiding the protected hack!")
+ set(GENERATOR_EXTRA_FLAGS --avoid-protected-hack)
+else()
+ message(STATUS "Tests will be generated using the protected hack!")
+ set(GENERATOR_EXTRA_FLAGS )
+endif()
add_subdirectory(samplebinding)
add_subdirectory(otherbinding)
diff --git a/tests/otherbinding/CMakeLists.txt b/tests/otherbinding/CMakeLists.txt
index 5a859679..366bdbd5 100644
--- a/tests/otherbinding/CMakeLists.txt
+++ b/tests/otherbinding/CMakeLists.txt
@@ -18,7 +18,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/other-binding.txt.in"
"${CMAKE_CURRENT_BINARY_DIR}/other-binding.txt" @ONLY)
add_custom_command(OUTPUT ${other_SRC}
-COMMAND ${GENERATORRUNNER_BINARY} --project-file=${CMAKE_CURRENT_BINARY_DIR}/other-binding.txt
+COMMAND ${GENERATORRUNNER_BINARY} --project-file=${CMAKE_CURRENT_BINARY_DIR}/other-binding.txt ${GENERATOR_EXTRA_FLAGS}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for 'other' test binding..."
)
diff --git a/tests/samplebinding/CMakeLists.txt b/tests/samplebinding/CMakeLists.txt
index abe982aa..e21c2286 100644
--- a/tests/samplebinding/CMakeLists.txt
+++ b/tests/samplebinding/CMakeLists.txt
@@ -92,7 +92,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sample-binding.txt.in"
"${CMAKE_CURRENT_BINARY_DIR}/sample-binding.txt" @ONLY)
add_custom_command(OUTPUT ${sample_SRC}
-COMMAND ${GENERATORRUNNER_BINARY} --project-file=${CMAKE_CURRENT_BINARY_DIR}/sample-binding.txt
+COMMAND ${GENERATORRUNNER_BINARY} --project-file=${CMAKE_CURRENT_BINARY_DIR}/sample-binding.txt ${GENERATOR_EXTRA_FLAGS}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for 'sample' test binding..."
)