commit 0ddb0f8822c4838002929ccc0ad98458549d46be parent 4fa2e0b5faccd98e265ef90188da2d48d15ed5b2 Author: vaplv <vaplv@free.fr> Date: Sun, 21 Dec 2014 14:27:04 +0100 Add the NO_TEST cmake option Diffstat:
| M | cmake/CMakeLists.txt | | | 29 | ++++++++++++++++------------- |
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -19,6 +19,7 @@ cmake_policy(SET CMP0011 NEW) enable_testing() option(BUILD_STATIC "Build RSIMD as a static library" ON) +option(NO_TEST "Disable the tests" OFF) set(RSIMD_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src) ################################################################################ @@ -78,20 +79,22 @@ rcmake_setup_devel(rsimd RSIMD ${VERSION} rsimd_version.h) ################################################################################ # Add tests ################################################################################ -macro(new_test _name) - add_executable(${_name} ${RSIMD_SOURCE_DIR}/${_name}.c) - target_link_libraries(${_name} rsimd m) - add_test(${_name} ${_name}) -endmacro(new_test) +if(NOT NO_TEST) + macro(new_test _name) + add_executable(${_name} ${RSIMD_SOURCE_DIR}/${_name}.c) + target_link_libraries(${_name} rsimd m) + add_test(${_name} ${_name}) + endmacro(new_test) -new_test(test_v4f) -new_test(test_v4i) -new_test(test_aosf33) -new_test(test_aosf44) -new_test(test_aosq) -new_test(test_soa4f2) -new_test(test_soa4f3) -new_test(test_soa4f4) + new_test(test_v4f) + new_test(test_v4i) + new_test(test_aosf33) + new_test(test_aosf44) + new_test(test_aosq) + new_test(test_soa4f2) + new_test(test_soa4f3) + new_test(test_soa4f4) +endif(NOT NO_TEST) ################################################################################ # Install directives