Browse Source

Recognize Clang C and C++ compilers (see #10693)

Map to the platform and compiler information for GNU because the
compilers are command-line compatible for common operations.  Later we
can add Clang-specific features as necessary.  We honor the preferred
capitalization is "Clang", not the common mis-spelling "CLang".
pull/1/head
Brad King 15 years ago
parent
commit
571dc74891
  1. 3
      Modules/CMakeCCompilerId.c.in
  2. 3
      Modules/CMakeCXXCompilerId.cpp.in
  3. 1
      Modules/Compiler/Clang-C.cmake
  4. 1
      Modules/Compiler/Clang-CXX.cmake
  5. 1
      Modules/Platform/Linux-Clang-C.cmake
  6. 1
      Modules/Platform/Linux-Clang-CXX.cmake

3
Modules/CMakeCCompilerId.c.in

@ -9,6 +9,9 @@
#if defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
#elif defined(__clang__)
# define COMPILER_ID "Clang"
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"

3
Modules/CMakeCXXCompilerId.cpp.in

@ -11,6 +11,9 @@
#elif defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
#elif defined(__clang__)
# define COMPILER_ID "Clang"
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"

1
Modules/Compiler/Clang-C.cmake

@ -0,0 +1 @@
include(Compiler/GNU-C)

1
Modules/Compiler/Clang-CXX.cmake

@ -0,0 +1 @@
include(Compiler/GNU-CXX)

1
Modules/Platform/Linux-Clang-C.cmake

@ -0,0 +1 @@
INCLUDE(Platform/Linux-GNU-C)

1
Modules/Platform/Linux-Clang-CXX.cmake

@ -0,0 +1 @@
INCLUDE(Platform/Linux-GNU-CXX)
Loading…
Cancel
Save