diff options
author | Brad King <brad.king@kitware.com> | 2019-04-08 14:44:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-04-08 14:44:46 (GMT) |
commit | 30f68934e90ddc5fbf523b56ba1ae6199e49466b (patch) | |
tree | 6e7681160a6dc7d7f2bc076538d8ce49154045f1 /Modules | |
parent | 192aa506c66d5269e10d87f1a67df5397325a9af (diff) | |
parent | ef41d49812f90f3d2a6edcae282a30b545df7f6d (diff) | |
download | CMake-30f68934e90ddc5fbf523b56ba1ae6199e49466b.zip CMake-30f68934e90ddc5fbf523b56ba1ae6199e49466b.tar.gz CMake-30f68934e90ddc5fbf523b56ba1ae6199e49466b.tar.bz2 |
Merge branch 'backport-implicit-includes-relative' into release-3.14
Merge-request: !3204
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeParseImplicitIncludeInfo.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/CMakeParseImplicitIncludeInfo.cmake b/Modules/CMakeParseImplicitIncludeInfo.cmake index c8d4c5a..c42474b 100644 --- a/Modules/CMakeParseImplicitIncludeInfo.cmake +++ b/Modules/CMakeParseImplicitIncludeInfo.cmake @@ -216,6 +216,14 @@ 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 + # 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. + get_filename_component(dir "${CMAKE_BINARY_DIR}/${CMAKE_MATCH_1}" ABSOLUTE) + list(APPEND implicit_dirs "${dir}") + string(APPEND log " collapse relative include dir [${d}] ==> [${dir}]\n") else() string(APPEND log " skipping relative include dir [${d}]\n") endif() |