diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-03-25 15:06:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-04-14 17:48:28 (GMT) |
commit | 8cc384f6299d60d705330f712031c2851498aa62 (patch) | |
tree | fe27164dc9a9fcac22c9ffd67a8e8396ddfa491a /Modules/CMakeDetermineCXXCompiler.cmake | |
parent | 37fa5122c2c1e2138b9e01191dc3cc1800f6ba40 (diff) | |
download | CMake-8cc384f6299d60d705330f712031c2851498aa62.zip CMake-8cc384f6299d60d705330f712031c2851498aa62.tar.gz CMake-8cc384f6299d60d705330f712031c2851498aa62.tar.bz2 |
Compilers: Add paths from -print-sysroot to system prefix path
Diffstat (limited to 'Modules/CMakeDetermineCXXCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index ebac435..e6b46b8 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -110,6 +110,8 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN) include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake) CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp) + _cmake_find_compiler_sysroot(CXX) + # Set old compiler and platform id variables. if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_COMPILER_IS_GNUCXX 1) @@ -189,6 +191,14 @@ include(CMakeFindBinUtils) include(Compiler/${CMAKE_CXX_COMPILER_ID}-FindBinUtils OPTIONAL) unset(_CMAKE_PROCESSING_LANGUAGE) +if(CMAKE_CXX_COMPILER_SYSROOT) + string(CONCAT _SET_CMAKE_CXX_COMPILER_SYSROOT + "set(CMAKE_CXX_COMPILER_SYSROOT \"${CMAKE_CXX_COMPILER_SYSROOT}\")\n" + "set(CMAKE_COMPILER_SYSROOT \"${CMAKE_CXX_COMPILER_SYSROOT}\")") +else() + set(_SET_CMAKE_CXX_COMPILER_SYSROOT "") +endif() + if(CMAKE_CXX_COMPILER_ARCHITECTURE_ID) set(_SET_CMAKE_CXX_COMPILER_ARCHITECTURE_ID "set(CMAKE_CXX_COMPILER_ARCHITECTURE_ID ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID})") |