diff options
author | Brad King <brad.king@kitware.com> | 2023-01-12 12:00:56 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-01-12 12:05:42 -0500 |
commit | 607bccb4efe15d7c33618a2c6324d2dbeccb5119 (patch) | |
tree | 7142a143198561ec554ed68e38f6cd11f68bbaed /Modules | |
parent | 6b92224f6c8758e5e84b1425273f4abf3b278f54 (diff) | |
download | cmake-607bccb4efe15d7c33618a2c6324d2dbeccb5119.tar.gz |
Restore implicit include directory extraction for adaptive relative paths
Update the logic added by commit ef41d49812 (Fix implicit include
directory extraction for adaptive relative paths, 2019-04-08,
v3.14.2~5^2) to account for the new `try_compile` work directory used
for the ABI check since commit 2edf0fc6d7 (Modules: Use new
keyword-dispatched try_compile signature, 2022-09-13,
v3.25.0-rc1~144^2).
Paths relative to the work directory will now have one more `../`
in them, so update the test data to match.
Fixes: #24279
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeParseImplicitIncludeInfo.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/CMakeParseImplicitIncludeInfo.cmake b/Modules/CMakeParseImplicitIncludeInfo.cmake index 5c0eda2703..1ebd887bc4 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. |