Commit 603f43d1 authored by Ben Boeckel's avatar Ben Boeckel

cmake: warn when the install location is not absolute

parent edbe799b
Pipeline #82610 passed with stage
......@@ -47,6 +47,15 @@ option(BUILD_SHARED_LIBS "Enable shared libraries" ON)
if (NOT superbuild_install_location)
set(superbuild_install_location "${CMAKE_BINARY_DIR}/install")
endif ()
if (NOT IS_ABSOLUTE "${superbuild_install_location}")
message(WARNING
"The given install location `${superbuild_install_location}` is relative; "
"replacing with an absolute path.")
get_filename_component(superbuild_install_location
"${superbuild_install_location}" ABSOLUTE)
endif ()
set(superbuild_prefix_path "${superbuild_install_location}")
set(superbuild_download_location "${CMAKE_BINARY_DIR}/downloads"
CACHE PATH "Location for downloaded source tarballs")
......
Markdown is supported
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