|
@@ -118,7 +118,7 @@ if(USE_CCACHE)
|
|
find_program(CCACHE_FOUND ccache)
|
|
find_program(CCACHE_FOUND ccache)
|
|
if(CCACHE_FOUND)
|
|
if(CCACHE_FOUND)
|
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
|
- endif(CCACHE_FOUND)
|
|
|
|
|
|
+ endif()
|
|
endif()
|
|
endif()
|
|
|
|
|
|
if(ENABLE_CTEST)
|
|
if(ENABLE_CTEST)
|
|
@@ -127,27 +127,27 @@ endif()
|
|
|
|
|
|
if(ENABLE_HLSL)
|
|
if(ENABLE_HLSL)
|
|
add_definitions(-DENABLE_HLSL)
|
|
add_definitions(-DENABLE_HLSL)
|
|
-endif(ENABLE_HLSL)
|
|
|
|
|
|
+endif()
|
|
|
|
|
|
if(ENABLE_GLSLANG_WEBMIN)
|
|
if(ENABLE_GLSLANG_WEBMIN)
|
|
add_definitions(-DGLSLANG_WEB)
|
|
add_definitions(-DGLSLANG_WEB)
|
|
if(ENABLE_GLSLANG_WEBMIN_DEVEL)
|
|
if(ENABLE_GLSLANG_WEBMIN_DEVEL)
|
|
add_definitions(-DGLSLANG_WEB_DEVEL)
|
|
add_definitions(-DGLSLANG_WEB_DEVEL)
|
|
- endif(ENABLE_GLSLANG_WEBMIN_DEVEL)
|
|
|
|
-endif(ENABLE_GLSLANG_WEBMIN)
|
|
|
|
|
|
+ endif()
|
|
|
|
+endif()
|
|
|
|
|
|
if(WIN32)
|
|
if(WIN32)
|
|
set(CMAKE_DEBUG_POSTFIX "d")
|
|
set(CMAKE_DEBUG_POSTFIX "d")
|
|
option(OVERRIDE_MSVCCRT "Overrides runtime of MSVC " ON)
|
|
option(OVERRIDE_MSVCCRT "Overrides runtime of MSVC " ON)
|
|
if(MSVC AND OVERRIDE_MSVCCRT)
|
|
if(MSVC AND OVERRIDE_MSVCCRT)
|
|
include(ChooseMSVCCRT.cmake)
|
|
include(ChooseMSVCCRT.cmake)
|
|
- endif(MSVC)
|
|
|
|
|
|
+ endif()
|
|
add_definitions(-DGLSLANG_OSINCLUDE_WIN32)
|
|
add_definitions(-DGLSLANG_OSINCLUDE_WIN32)
|
|
elseif(UNIX)
|
|
elseif(UNIX)
|
|
add_definitions(-DGLSLANG_OSINCLUDE_UNIX)
|
|
add_definitions(-DGLSLANG_OSINCLUDE_UNIX)
|
|
-else(WIN32)
|
|
|
|
|
|
+else()
|
|
message("unknown platform")
|
|
message("unknown platform")
|
|
-endif(WIN32)
|
|
|
|
|
|
+endif()
|
|
|
|
|
|
if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
|
|
if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
|
|
add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs
|
|
add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs
|
|
@@ -213,7 +213,7 @@ if(ENABLE_GLSLANG_JS)
|
|
add_compile_options(-Wno-unused-variable -Wno-unused-const-variable)
|
|
add_compile_options(-Wno-unused-variable -Wno-unused-const-variable)
|
|
endif()
|
|
endif()
|
|
endif()
|
|
endif()
|
|
-endif(ENABLE_GLSLANG_JS)
|
|
|
|
|
|
+endif()
|
|
|
|
|
|
# Request C++11
|
|
# Request C++11
|
|
if(${CMAKE_VERSION} VERSION_LESS 3.1)
|
|
if(${CMAKE_VERSION} VERSION_LESS 3.1)
|
|
@@ -329,7 +329,7 @@ endif()
|
|
add_subdirectory(SPIRV)
|
|
add_subdirectory(SPIRV)
|
|
if(ENABLE_HLSL)
|
|
if(ENABLE_HLSL)
|
|
add_subdirectory(hlsl)
|
|
add_subdirectory(hlsl)
|
|
-endif(ENABLE_HLSL)
|
|
|
|
|
|
+endif()
|
|
if(ENABLE_CTEST)
|
|
if(ENABLE_CTEST)
|
|
add_subdirectory(gtests)
|
|
add_subdirectory(gtests)
|
|
endif()
|
|
endif()
|
|
@@ -346,11 +346,11 @@ if(ENABLE_CTEST AND BUILD_TESTING)
|
|
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/localResults)
|
|
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/localResults)
|
|
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/glslangValidator)
|
|
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/glslangValidator)
|
|
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/spirv-remap)
|
|
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/spirv-remap)
|
|
- else(CMAKE_CONFIGURATION_TYPES)
|
|
|
|
|
|
+ else()
|
|
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/localResults)
|
|
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/localResults)
|
|
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator)
|
|
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator)
|
|
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap)
|
|
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap)
|
|
- endif(CMAKE_CONFIGURATION_TYPES)
|
|
|
|
|
|
+ endif()
|
|
|
|
|
|
add_test(NAME glslang-testsuite
|
|
add_test(NAME glslang-testsuite
|
|
COMMAND bash ${IGNORE_CR_FLAG} runtests ${RESULTS_PATH} ${VALIDATOR_PATH} ${REMAP_PATH}
|
|
COMMAND bash ${IGNORE_CR_FLAG} runtests ${RESULTS_PATH} ${VALIDATOR_PATH} ${REMAP_PATH}
|