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)
endmacro(glslang_pch)
project(glslang)
-# make testing optional
-include(CTest)
+
+if(ENABLE_CTEST)
+ include(CTest)
+endif()
if(ENABLE_HLSL)
add_definitions(-DENABLE_HLSL)
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.