diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2015-08-14 09:38:23 (GMT) |
---|---|---|
committer | Gregor Jasny <gjasny@googlemail.com> | 2015-08-18 20:30:55 (GMT) |
commit | c66835fc37fa3dec32a437010648fee0b210a1a5 (patch) | |
tree | 3c4e6756f59da3270bd0ecd8f70d50838315db21 /Modules | |
parent | a712575da1a0e6117c4682100e3b9df72b964b2a (diff) | |
download | CMake-c66835fc37fa3dec32a437010648fee0b210a1a5.zip CMake-c66835fc37fa3dec32a437010648fee0b210a1a5.tar.gz CMake-c66835fc37fa3dec32a437010648fee0b210a1a5.tar.bz2 |
Extra Generator: Populate MSVC system include paths from environment (#15597)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake index 064e650..3bfb876 100644 --- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake +++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake @@ -101,6 +101,8 @@ if (NOT CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS) _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs _defines) set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories") set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros") + elseif ("${CMAKE_C_COMPILER_ID}" MATCHES MSVC) + set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS "$ENV{INCLUDE}" CACHE INTERNAL "C compiler system include directories") endif () endif () @@ -110,6 +112,8 @@ if (NOT CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS) _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs _defines) set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories") set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "CXX compiler system defined macros") + elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES MSVC) + set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS "$ENV{INCLUDE}" CACHE INTERNAL "CXX compiler system include directories") endif () endif () |