diff options
author | Brad King <brad.king@kitware.com> | 2023-01-13 13:45:28 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-01-13 13:45:37 (GMT) |
commit | 2d9e66a23bd469b5c89fb7951f6dc59738cd2516 (patch) | |
tree | ea2f375199e2374ab08d9176c313cfd32045483a | |
parent | 45da44cc23e3cc3a0fc9309cd9fb0ce53b40b256 (diff) | |
parent | 607bccb4efe15d7c33618a2c6324d2dbeccb5119 (diff) | |
download | CMake-2d9e66a23bd469b5c89fb7951f6dc59738cd2516.zip CMake-2d9e66a23bd469b5c89fb7951f6dc59738cd2516.tar.gz CMake-2d9e66a23bd469b5c89fb7951f6dc59738cd2516.tar.bz2 |
Merge topic 'implicit-includes' into release-3.25
607bccb4ef Restore implicit include directory extraction for adaptive relative paths
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8067
-rw-r--r-- | Modules/CMakeParseImplicitIncludeInfo.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/ParseImplicitData/hand-C-relative.input | 4 | ||||
-rw-r--r-- | Tests/RunCMake/ParseImplicitData/hand-CXX-relative.input | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/Modules/CMakeParseImplicitIncludeInfo.cmake b/Modules/CMakeParseImplicitIncludeInfo.cmake index 5c0eda2..1ebd887 100644 --- a/Modules/CMakeParseImplicitIncludeInfo.cmake +++ b/Modules/CMakeParseImplicitIncludeInfo.cmake @@ -233,8 +233,9 @@ function(cmake_parse_implicit_include_info text lang dir_var log_var state_var) get_filename_component(dir "${d}" ABSOLUTE) list(APPEND implicit_dirs "${dir}") string(APPEND log " collapse include dir [${d}] ==> [${dir}]\n") - elseif("${d}" MATCHES [[^\.\.[\/]\.\.[\/](.*)$]]) - # This relative path is deep enough to get out of the CMakeFiles/CMakeTmp + elseif("${d}" MATCHES [[^\.\.[\/]\.\.[\/]\.\.[\/](.*)$]]) + # This relative path is deep enough to get out of the + # CMakeFiles/CMakeScratch/<unique> # directory where the ABI check is done. Assume that the compiler has # computed this path adaptively based on the current working directory # such that the effective result is absolute. diff --git a/Tests/RunCMake/ParseImplicitData/hand-C-relative.input b/Tests/RunCMake/ParseImplicitData/hand-C-relative.input index 52ac9df..dd0c10b 100644 --- a/Tests/RunCMake/ParseImplicitData/hand-C-relative.input +++ b/Tests/RunCMake/ParseImplicitData/hand-C-relative.input @@ -16,8 +16,8 @@ This is a hand-written test case. #include "..." search starts here: #include <...> search starts here: /usr/local/include - ../../../adaptive/relative/include + ../../../../adaptive/relative/include /usr/include End of search list. -/usr/bin/ld -L/usr/lib64 -L../../../adaptive/relative/lib +/usr/bin/ld -L/usr/lib64 -L../../../../adaptive/relative/lib diff --git a/Tests/RunCMake/ParseImplicitData/hand-CXX-relative.input b/Tests/RunCMake/ParseImplicitData/hand-CXX-relative.input index 0b223a1..568933a 100644 --- a/Tests/RunCMake/ParseImplicitData/hand-CXX-relative.input +++ b/Tests/RunCMake/ParseImplicitData/hand-CXX-relative.input @@ -16,8 +16,8 @@ This is a hand-written test case. #include "..." search starts here: #include <...> search starts here: /usr/local/include - ../../../adaptive/relative/include + ../../../../adaptive/relative/include /usr/include End of search list. -/usr/bin/ld -L/usr/lib64 -L../../../adaptive/relative/lib +/usr/bin/ld -L/usr/lib64 -L../../../../adaptive/relative/lib |