diff --git a/CMakeLists.txt b/CMakeLists.txt index c318eef9..d5b727ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,7 +118,7 @@ if(USE_CCACHE) find_program(CCACHE_FOUND ccache) if(CCACHE_FOUND) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - endif(CCACHE_FOUND) + endif() endif() if(ENABLE_CTEST) @@ -127,27 +127,27 @@ endif() if(ENABLE_HLSL) add_definitions(-DENABLE_HLSL) -endif(ENABLE_HLSL) +endif() if(ENABLE_GLSLANG_WEBMIN) add_definitions(-DGLSLANG_WEB) if(ENABLE_GLSLANG_WEBMIN_DEVEL) add_definitions(-DGLSLANG_WEB_DEVEL) - endif(ENABLE_GLSLANG_WEBMIN_DEVEL) -endif(ENABLE_GLSLANG_WEBMIN) + endif() +endif() if(WIN32) set(CMAKE_DEBUG_POSTFIX "d") option(OVERRIDE_MSVCCRT "Overrides runtime of MSVC " ON) if(MSVC AND OVERRIDE_MSVCCRT) include(ChooseMSVCCRT.cmake) - endif(MSVC) + endif() add_definitions(-DGLSLANG_OSINCLUDE_WIN32) elseif(UNIX) add_definitions(-DGLSLANG_OSINCLUDE_UNIX) -else(WIN32) +else() message("unknown platform") -endif(WIN32) +endif() if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") 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) endif() endif() -endif(ENABLE_GLSLANG_JS) +endif() # Request C++11 if(${CMAKE_VERSION} VERSION_LESS 3.1) @@ -329,7 +329,7 @@ endif() add_subdirectory(SPIRV) if(ENABLE_HLSL) add_subdirectory(hlsl) -endif(ENABLE_HLSL) +endif() if(ENABLE_CTEST) add_subdirectory(gtests) endif() @@ -346,11 +346,11 @@ if(ENABLE_CTEST AND BUILD_TESTING) set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$/localResults) set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$/glslangValidator) set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$/spirv-remap) - else(CMAKE_CONFIGURATION_TYPES) + else() set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/localResults) set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator) set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap) - endif(CMAKE_CONFIGURATION_TYPES) + endif() add_test(NAME glslang-testsuite COMMAND bash ${IGNORE_CR_FLAG} runtests ${RESULTS_PATH} ${VALIDATOR_PATH} ${REMAP_PATH} diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt index d699dadd..22f767d7 100644 --- a/SPIRV/CMakeLists.txt +++ b/SPIRV/CMakeLists.txt @@ -101,12 +101,12 @@ if(ENABLE_OPT) $) else() target_link_libraries(SPIRV PRIVATE MachineIndependent) -endif(ENABLE_OPT) +endif() if(WIN32) source_group("Source" FILES ${SOURCES} ${HEADERS}) source_group("Source" FILES ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) -endif(WIN32) +endif() if(ENABLE_GLSLANG_INSTALL) if(BUILD_SHARED_LIBS) @@ -135,4 +135,4 @@ if(ENABLE_GLSLANG_INSTALL) install(EXPORT SPIRVTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/) -endif(ENABLE_GLSLANG_INSTALL) +endif() diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt index 751d1cd7..91bec6cc 100644 --- a/StandAlone/CMakeLists.txt +++ b/StandAlone/CMakeLists.txt @@ -62,7 +62,7 @@ elseif(UNIX) if(NOT ANDROID) set(LIBRARIES ${LIBRARIES} pthread) endif() -endif(WIN32) +endif() target_link_libraries(glslangValidator ${LIBRARIES}) target_include_directories(glslangValidator PUBLIC @@ -73,7 +73,7 @@ if(ENABLE_OPT) target_include_directories(glslangValidator PRIVATE ${spirv-tools_SOURCE_DIR}/include ) -endif(ENABLE_OPT) +endif() if(ENABLE_SPVREMAPPER) set(REMAPPER_SOURCES spirv-remap.cpp) @@ -85,7 +85,7 @@ endif() if(WIN32) source_group("Source" FILES ${SOURCES}) -endif(WIN32) +endif() if(ENABLE_GLSLANG_INSTALL) install(TARGETS glslangValidator EXPORT glslangValidatorTargets @@ -108,4 +108,4 @@ if(ENABLE_GLSLANG_INSTALL) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() install(EXPORT glslang-default-resource-limitsTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) -endif(ENABLE_GLSLANG_INSTALL) +endif() diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt index dab5f8bf..d0394c86 100644 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt @@ -35,14 +35,14 @@ if(WIN32) add_subdirectory(OSDependent/Windows) elseif(UNIX OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia") add_subdirectory(OSDependent/Unix) -else(WIN32) +else() message("unknown platform") -endif(WIN32) +endif() if(EMSCRIPTEN OR ENABLE_GLSLANG_JS) # May be enabled on non-Emscripten builds for binary-size testing. add_subdirectory(OSDependent/Web) -endif(EMSCRIPTEN OR ENABLE_GLSLANG_JS) +endif() ################################################################################ # GenericCodeGen @@ -129,7 +129,7 @@ if(ENABLE_HLSL) HLSL/hlslTokenStream.h HLSL/hlslGrammar.h HLSL/hlslParseables.h) -endif(ENABLE_HLSL) +endif() add_library(MachineIndependent STATIC ${MACHINEINDEPENDENT_SOURCES} ${MACHINEINDEPENDENT_HEADERS}) set_property(TARGET MachineIndependent PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -194,7 +194,7 @@ if(WIN32) source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*") source_group("HLSL" REGULAR_EXPRESSION "HLSL/*") source_group("CInterface" REGULAR_EXPRESSION "CInterface/*") -endif(WIN32) +endif() ################################################################################ # install @@ -225,4 +225,4 @@ if(ENABLE_GLSLANG_INSTALL) install(FILES ${GLSLANG_BUILD_INFO_H} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang) -endif(ENABLE_GLSLANG_INSTALL) +endif() diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt index 354a3e97..d521da17 100644 --- a/glslang/OSDependent/Unix/CMakeLists.txt +++ b/glslang/OSDependent/Unix/CMakeLists.txt @@ -56,4 +56,4 @@ if(ENABLE_GLSLANG_INSTALL) install(TARGETS OSDependent EXPORT OSDependentTargets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(EXPORT OSDependentTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) -endif(ENABLE_GLSLANG_INSTALL) +endif() diff --git a/glslang/OSDependent/Web/CMakeLists.txt b/glslang/OSDependent/Web/CMakeLists.txt index 0f60dbcc..5bfbed41 100644 --- a/glslang/OSDependent/Web/CMakeLists.txt +++ b/glslang/OSDependent/Web/CMakeLists.txt @@ -55,7 +55,7 @@ if(ENABLE_GLSLANG_JS) if(ENABLE_EMSCRIPTEN_SINGLE_FILE) target_link_libraries(glslang.js "-s SINGLE_FILE=1") - endif(ENABLE_EMSCRIPTEN_SINGLE_FILE) + endif() if(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE) target_link_libraries(glslang.js "-s ENVIRONMENT=node -s BINARYEN_ASYNC_COMPILATION=0") @@ -67,5 +67,5 @@ if(ENABLE_GLSLANG_JS) add_custom_command(TARGET glslang.js POST_BUILD COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js >> ${CMAKE_CURRENT_BINARY_DIR}/glslang.js) endif() - endif(EMSCRIPTEN) -endif(ENABLE_GLSLANG_JS) + endif() +endif() diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt index 9cf1b7fb..21d603e7 100644 --- a/glslang/OSDependent/Windows/CMakeLists.txt +++ b/glslang/OSDependent/Windows/CMakeLists.txt @@ -45,10 +45,10 @@ endif() if(WIN32) source_group("Source" FILES ${SOURCES}) -endif(WIN32) +endif() if(ENABLE_GLSLANG_INSTALL) install(TARGETS OSDependent EXPORT OSDependentTargets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(EXPORT OSDependentTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) -endif(ENABLE_GLSLANG_INSTALL) +endif() diff --git a/gtests/CMakeLists.txt b/gtests/CMakeLists.txt index befe240e..c8f02828 100644 --- a/gtests/CMakeLists.txt +++ b/gtests/CMakeLists.txt @@ -72,7 +72,7 @@ if(BUILD_TESTING) install(TARGETS glslangtests EXPORT glslangtestsTargets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) install(EXPORT glslangtestsTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - endif(ENABLE_GLSLANG_INSTALL) + endif() set(GLSLANG_TEST_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Test") # Supply a default test root directory, so that manual testing @@ -90,7 +90,7 @@ if(BUILD_TESTING) target_include_directories(glslangtests PRIVATE ${spirv-tools_SOURCE_DIR}/include ) - endif(ENABLE_OPT) + endif() set(LIBRARIES glslang OSDependent OGLCompiler glslang @@ -102,7 +102,7 @@ if(BUILD_TESTING) if(ENABLE_HLSL) set(LIBRARIES ${LIBRARIES} HLSL) - endif(ENABLE_HLSL) + endif() target_link_libraries(glslangtests PRIVATE ${LIBRARIES} gmock) add_test(NAME glslang-gtests diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt index 62faa195..7d5bc152 100644 --- a/hlsl/CMakeLists.txt +++ b/hlsl/CMakeLists.txt @@ -56,4 +56,4 @@ if(ENABLE_GLSLANG_INSTALL) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() install(EXPORT HLSLTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) -endif(ENABLE_GLSLANG_INSTALL) +endif()