diff options
Diffstat (limited to 'Modules/CMakeDetermineCCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCCompiler.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index 9d395e5..f870956 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -115,6 +115,8 @@ if(NOT CMAKE_C_COMPILER_ID_RUN) include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake) CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c) + _cmake_find_compiler_sysroot(C) + # Set old compiler and platform id variables. if(CMAKE_C_COMPILER_ID STREQUAL "GNU") set(CMAKE_COMPILER_IS_GNUCC 1) @@ -191,6 +193,14 @@ include(CMakeFindBinUtils) include(Compiler/${CMAKE_C_COMPILER_ID}-FindBinUtils OPTIONAL) unset(_CMAKE_PROCESSING_LANGUAGE) +if(CMAKE_C_COMPILER_SYSROOT) + string(CONCAT _SET_CMAKE_C_COMPILER_SYSROOT + "set(CMAKE_C_COMPILER_SYSROOT \"${CMAKE_C_COMPILER_SYSROOT}\")\n" + "set(CMAKE_COMPILER_SYSROOT \"${CMAKE_C_COMPILER_SYSROOT}\")") +else() + set(_SET_CMAKE_C_COMPILER_SYSROOT "") +endif() + if(CMAKE_C_COMPILER_ARCHITECTURE_ID) set(_SET_CMAKE_C_COMPILER_ARCHITECTURE_ID "set(CMAKE_C_COMPILER_ARCHITECTURE_ID ${CMAKE_C_COMPILER_ARCHITECTURE_ID})") |