Skip to content

Commit fb9f567

Browse files
committed
COMP: Fix cmake processing failure when option_name is empty
CMake Error at CMake/ctkMacroValidateBuildOptions.cmake:182 (if): if given arguments: AND NOT ON Unknown arguments specified Call Stack (most recent call first): CMakeLists.txt:857 (ctkMacroValidateBuildOptions)
1 parent 1aa8720 commit fb9f567

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMake/ctkMacroValidateBuildOptions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ macro(ctkMacroValidateBuildOptions dir executable target_directories)
179179
endif()
180180

181181
ctkMacroGetOptionName("${target_directories_with_target_name}" ${dep} dep_option)
182-
if(${${option_name}} AND NOT ${${dep_option}})
182+
if("${${option_name}}" AND NOT "${${dep_option}}")
183183
# Enable option
184184
message(STATUS "Enabling option [${dep_option}] required by [${target_project_name}]")
185185
set(${dep_option} ON CACHE BOOL "Enable ${target_project_name} library" FORCE)

0 commit comments

Comments
 (0)