cmake: Remove "conditions" from endif

See https://cmake.org/cmake/help/latest/command/endif.html and
https://cmake.org/cmake/help/latest/command/if.html.

If the else/endif condition does not match the if condition verbatim,
an error is produced on some versions of cmake. This change removes
these "legacy conditions."
This commit is contained in:
Nathaniel Cesario 2021-09-28 17:01:21 -06:00
parent 581897f462
commit c8ef4f8a9f
9 changed files with 34 additions and 34 deletions

View file

@ -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}/$<CONFIGURATION>/localResults)
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/glslangValidator)
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(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}