summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDependentOption.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakeDependentOption.cmake')
-rw-r--r--Modules/CMakeDependentOption.cmake20
1 files changed, 10 insertions, 10 deletions
diff --git a/Modules/CMakeDependentOption.cmake b/Modules/CMakeDependentOption.cmake
index 98cae45..990728f 100644
--- a/Modules/CMakeDependentOption.cmake
+++ b/Modules/CMakeDependentOption.cmake
@@ -31,21 +31,21 @@ macro(CMAKE_DEPENDENT_OPTION option doc default depends force)
foreach(d ${depends})
string(REGEX REPLACE " +" ";" CMAKE_DEPENDENT_OPTION_DEP "${d}")
if(${CMAKE_DEPENDENT_OPTION_DEP})
- else(${CMAKE_DEPENDENT_OPTION_DEP})
+ else()
set(${option}_AVAILABLE 0)
- endif(${CMAKE_DEPENDENT_OPTION_DEP})
- endforeach(d)
+ endif()
+ endforeach()
if(${option}_AVAILABLE)
option(${option} "${doc}" "${default}")
set(${option} "${${option}}" CACHE BOOL "${doc}" FORCE)
- else(${option}_AVAILABLE)
+ else()
if(${option} MATCHES "^${option}$")
- else(${option} MATCHES "^${option}$")
+ else()
set(${option} "${${option}}" CACHE INTERNAL "${doc}")
- endif(${option} MATCHES "^${option}$")
+ endif()
set(${option} ${force})
- endif(${option}_AVAILABLE)
- else(${option}_ISSET MATCHES "^${option}_ISSET$")
+ endif()
+ else()
set(${option} "${${option}_ISSET}")
- endif(${option}_ISSET MATCHES "^${option}_ISSET$")
-endmacro(CMAKE_DEPENDENT_OPTION)
+ endif()
+endmacro()