summaryrefslogtreecommitdiffstats
path: root/Modules/CheckVariableExists.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CheckVariableExists.cmake')
-rw-r--r--Modules/CheckVariableExists.cmake12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake
index 48e848b..f9155a0 100644
--- a/Modules/CheckVariableExists.cmake
+++ b/Modules/CheckVariableExists.cmake
@@ -39,9 +39,9 @@ macro(CHECK_VARIABLE_EXISTS VAR VARIABLE)
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
- else(CMAKE_REQUIRED_LIBRARIES)
+ else()
set(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES)
- endif(CMAKE_REQUIRED_LIBRARIES)
+ endif()
try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckVariableExists.c
@@ -55,12 +55,12 @@ macro(CHECK_VARIABLE_EXISTS VAR VARIABLE)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the variable ${VAR} exists passed with the following output:\n"
"${OUTPUT}\n\n")
- else(${VARIABLE})
+ else()
set(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}")
message(STATUS "Looking for ${VAR} - not found")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the variable ${VAR} exists failed with the following output:\n"
"${OUTPUT}\n\n")
- endif(${VARIABLE})
- endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
-endmacro(CHECK_VARIABLE_EXISTS)
+ endif()
+ endif()
+endmacro()