From 3b8d94f4223416a45a4dd41e80dc92a06be712bc Mon Sep 17 00:00:00 2001 From: Sergey Kosarevsky Date: Fri, 25 Oct 2019 11:57:11 +0300 Subject: [PATCH] Add option ENABLE_CTEST to skip testing --- CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dcb2d0de..d6fc8d42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,7 @@ CMAKE_DEPENDENT_OPTION(ENABLE_HLSL "Enables HLSL input support" ON "NOT ENABLE_G option(ENABLE_OPT "Enables spirv-opt capability if present" ON) option(ENABLE_PCH "Enables Precompiled header" ON) +option(ENABLE_CTEST "Enables testing" ON) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32) set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "..." FORCE) @@ -67,8 +68,10 @@ macro(glslang_pch SRCS PCHCPP) endmacro(glslang_pch) project(glslang) -# make testing optional -include(CTest) + +if(ENABLE_CTEST) + include(CTest) +endif() if(ENABLE_HLSL) add_definitions(-DENABLE_HLSL) @@ -183,7 +186,9 @@ add_subdirectory(SPIRV) if(ENABLE_HLSL) add_subdirectory(hlsl) endif(ENABLE_HLSL) -add_subdirectory(gtests) +if(ENABLE_CTEST) + add_subdirectory(gtests) +endif() if(BUILD_TESTING) # glslang-testsuite runs a bash script on Windows.