···112 # Check the actual deps, determine if the option is available
113 set(_avail ON)
114 foreach(d ${_option_deps_DEPENDS})
115- if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.18)
116- cmake_language(
117- EVAL
118- CODE
119- "
120- if(${d})
121- else()
122- set(_avail OFF)
123- set(_cond ${d})
124- endif()")
125- else()
126- # cmake_language(EVAL CODE was added in 3.18 so evaluate it the "old" way before then.
127- # turn spaces into semicolons so we have a list of arguments, signalling to CMAKE
128- # to interpret the "if()" differently
129- string(REGEX REPLACE " +" ";" CMAKE_DEPENDENT_OPTION_DEP "${d}")
130- if(${CMAKE_DEPENDENT_OPTION_DEP})
131-132- else()
133- set(_avail OFF)
134- set(_cond ${d})
135- endif()
136- endif()
137 endforeach()
138139 # Error if option was requested but not available
···112 # Check the actual deps, determine if the option is available
113 set(_avail ON)
114 foreach(d ${_option_deps_DEPENDS})
115+ cmake_language(
116+ EVAL
117+ CODE
118+ "
119+ if(${d})
120+ else()
121+ set(_avail OFF)
122+ set(_cond ${d})
123+ endif()")
0000000000000124 endforeach()
125126 # Error if option was requested but not available