Skip to content

Test possible fix for regex in build dir #13733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions cmake/modules/RootMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,14 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
# Remove all source dirs also while they preserved in root dictionaries and
# ends in the gInterpreter->GetIncludePath()

list(FILTER incdirs EXCLUDE REGEX "^${CMAKE_SOURCE_DIR}")
list(FILTER incdirs EXCLUDE REGEX "^${CMAKE_BINARY_DIR}/ginclude")
list(FILTER incdirs EXCLUDE REGEX "^${CMAKE_BINARY_DIR}/externals")
list(FILTER incdirs EXCLUDE REGEX "^${CMAKE_BINARY_DIR}/builtins")
# Trick based on https://gitlab.kitware.com/cmake/cmake/-/issues/18580
string(REGEX REPLACE "(.)" "\\\\\\1" raw_cmake_binary_dir "${CMAKE_BINARY_DIR}")
string(REGEX REPLACE "(.)" "\\\\\\1" raw_cmake_source_dir "${CMAKE_SOURCE_DIR}")

list(FILTER incdirs EXCLUDE REGEX "^${raw_cmake_source_dir}")
list(FILTER incdirs EXCLUDE REGEX "^${raw_cmake_binary_dir}/ginclude")
list(FILTER incdirs EXCLUDE REGEX "^${raw_cmake_binary_dir}/externals")
list(FILTER incdirs EXCLUDE REGEX "^${raw_cmake_binary_dir}/builtins")
list(INSERT incdirs 0 ${CMAKE_BINARY_DIR}/include)
# endif()

Expand Down