Skip to content
Snippets Groups Projects
Commit e05070dd authored by Raphael Isemann's avatar Raphael Isemann Committed by Vassil Vassilev
Browse files

Prevent CMake from failing when no libcpp paths are found.

This patch instead prints an error with some useful debugging
information that should help identify the cause of this issue.
parent a7bf910f
Branches
Tags
No related merge requests found
...@@ -213,12 +213,16 @@ if (NOT libcxx) ...@@ -213,12 +213,16 @@ if (NOT libcxx)
# Only use the first path from the HEADERS_LOCATION (which is separated by colons). # Only use the first path from the HEADERS_LOCATION (which is separated by colons).
get_property(__libcpp_full_paths GLOBAL PROPERTY ROOT_CLING_CXX_HEADERS_LOCATION) get_property(__libcpp_full_paths GLOBAL PROPERTY ROOT_CLING_CXX_HEADERS_LOCATION)
string(REGEX MATCHALL "[^:]+" __libcpp_full_paths_list "${__libcpp_full_paths}") string(REGEX MATCHALL "[^:]+" __libcpp_full_paths_list "${__libcpp_full_paths}")
list(GET __libcpp_full_paths_list 0 __libcpp_full_path) if (__libcpp_full_paths_list)
list(GET __libcpp_full_paths_list 0 __libcpp_full_path)
configure_file(${CMAKE_SOURCE_DIR}/build/unix/modulemap.overlay.yaml.in ${CMAKE_BINARY_DIR}/include/modulemap.overlay.yaml @ONLY) configure_file(${CMAKE_SOURCE_DIR}/build/unix/modulemap.overlay.yaml.in ${CMAKE_BINARY_DIR}/include/modulemap.overlay.yaml @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/build/unix/stl.cppmap ${CMAKE_BINARY_DIR}/include/stl.cppmap) configure_file(${CMAKE_SOURCE_DIR}/build/unix/stl.cppmap ${CMAKE_BINARY_DIR}/include/stl.cppmap)
configure_file(${CMAKE_SOURCE_DIR}/build/unix/libc.modulemap ${CMAKE_BINARY_DIR}/include/libc.modulemap) configure_file(${CMAKE_SOURCE_DIR}/build/unix/libc.modulemap ${CMAKE_BINARY_DIR}/include/libc.modulemap)
else()
message(SEND_ERROR "Couldn't find c++ library paths, no modulemap overlay will be installed! (__libcpp_full_paths = '${__libcpp_full_paths}')")
endif()
endif() endif()
if (cxxmodules) if (cxxmodules)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment