summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake8
-rw-r--r--Modules/Platform/UnixPaths.cmake11
2 files changed, 12 insertions, 7 deletions
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index e55b83f..fd1d5fb 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -89,16 +89,18 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
endif()
# Parse implicit include directory for this language, if available.
- set (implicit_incdirs "")
if(CMAKE_${lang}_VERBOSE_FLAG)
+ set (implicit_incdirs "")
cmake_parse_implicit_include_info("${OUTPUT}" "${lang}"
implicit_incdirs log rv)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Parsed ${lang} implicit include dir info from above output: rv=${rv}\n${log}\n\n")
- if("${rv}" STREQUAL "done") # update parent if parse completed ok
- set(CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES "${implicit_incdirs}" PARENT_SCOPE)
+ if("${rv}" STREQUAL "done")
+ # We parsed implicit include directories, so override the default initializer.
+ set(_CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT "${implicit_incdirs}")
endif()
endif()
+ set(CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES "${_CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT}" PARENT_SCOPE)
# Parse implicit linker information for this language, if available.
set(implicit_dirs "")
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
index fc22fce..4ae4514 100644
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -69,14 +69,17 @@ list(APPEND CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES
)
# Default per-language values. These may be later replaced after
-# parsing the implicit link directories from compiler output.
-list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
+# parsing the implicit directory information from compiler output.
+set(_CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES_INIT
+ ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}
/usr/include
)
-list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
+set(_CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES_INIT
+ ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}
/usr/include
)
-list(APPEND CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES
+set(_CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES_INIT
+ ${CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES}
/usr/include
)