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

@@ -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