aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandre Bouvier <[email protected]>2022-11-24 09:09:19 +0100
committermerry <[email protected]>2022-12-31 16:15:55 +0000
commit6ac0b249f73a28800e9ba668ee3dfc60efdb6f3c (patch)
treeb7d0cd586a0003a8cc2235b5c1b16d8cb57b14e8 /CMakeLists.txt
parent300046b60ba20314441619773f40eadcccac4125 (diff)
downloaddynarmic-6ac0b249f73a28800e9ba668ee3dfc60efdb6f3c.tar.gz
dynarmic-6ac0b249f73a28800e9ba668ee3dfc60efdb6f3c.zip
cmake: support standard ctest option
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4562f1af..cb153e29 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,12 +8,14 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(MASTER_PROJECT ON)
endif()
+include(CMakeDependentOption)
+
# Dynarmic project options
option(DYNARMIC_ENABLE_CPU_FEATURE_DETECTION "Turning this off causes dynarmic to assume the host CPU doesn't support anything later than SSE3" ON)
option(DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT "Enables support for systems that require W^X" OFF)
option(DYNARMIC_FATAL_ERRORS "Errors are fatal" OFF)
option(DYNARMIC_IGNORE_ASSERTS "Ignore asserts" OFF)
-option(DYNARMIC_TESTS "Build tests" ${MASTER_PROJECT})
+cmake_dependent_option(DYNARMIC_TESTS "Build tests" ${MASTER_PROJECT} "NOT DEFINED BUILD_TESTING" "${BUILD_TESTING}")
option(DYNARMIC_TESTS_USE_UNICORN "Enable fuzzing tests against unicorn" OFF)
option(DYNARMIC_USE_LLVM "Support disassembly of jitted x86_64 code using LLVM" OFF)
option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
@@ -155,7 +157,7 @@ add_subdirectory(externals)
# Dynarmic project files
add_subdirectory(src/dynarmic)
if (DYNARMIC_TESTS)
- enable_testing(true)
+ enable_testing()
add_subdirectory(tests)
endif()