Merge topic 'EclipseDetectClangIncludeDirs'
a396b6e
Eclipse: also detect include dirs and macro for clang (#13823)
This commit is contained in:
commit
f0c4d37ff3
|
@ -90,7 +90,7 @@ set(ENV{LANG} C)
|
|||
|
||||
# Now check for C, works for gcc and Intel compiler at least
|
||||
if (NOT CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS)
|
||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel)
|
||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel OR "${CMAKE_C_COMPILER_ID}" MATCHES Clang)
|
||||
_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")
|
||||
|
@ -99,7 +99,7 @@ endif ()
|
|||
|
||||
# And now the same for C++
|
||||
if (NOT CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Clang)
|
||||
_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")
|
||||
|
|
Loading…
Reference in New Issue