Commit 9120840b authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

SuperBuild: set default when creating option to avoid override

parent 549ff6df
......@@ -4,11 +4,10 @@ include(CMakeParseArguments)
# internal variables
macro(SETUP_SYSTEM_LIBRARY)
cmake_parse_arguments(NEW_SYSLIB "" "PROJECT;DEFAULT" "" ${ARGN})
option(USE_SYSTEM_${NEW_SYSLIB_PROJECT} "Use a system build of ${NEW_SYSLIB_PROJECT}.")
set(USE_SYSTEM_${NEW_SYSLIB_PROJECT} OFF)
if(NEW_SYSLIB_DEFAULT)
set(USE_SYSTEM_${NEW_SYSLIB_PROJECT} ON)
endif()
option(USE_SYSTEM_${NEW_SYSLIB_PROJECT}
" Use a system build of ${NEW_SYSLIB_PROJECT}."
${NEW_SYSLIB_DEFAULT}
)
set(SYSTEM_${NEW_SYSLIB_PROJECT}_CMAKE_CACHE)
endmacro(SETUP_SYSTEM_LIBRARY)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment