John Brawn | a933c2a | 2015-09-29 14:33:58 +0000 | [diff] [blame] | 1 | # Determine if the compiler has GCC-compatible command-line syntax. |
| 2 | |
| 3 | if(NOT DEFINED LLVM_COMPILER_IS_GCC_COMPATIBLE) |
| 4 | if(CMAKE_COMPILER_IS_GNUCXX) |
| 5 | set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON) |
| 6 | elseif( MSVC ) |
| 7 | set(LLVM_COMPILER_IS_GCC_COMPATIBLE OFF) |
| 8 | elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) |
| 9 | set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON) |
Yichao Yu | eca8aa6 | 2017-01-26 23:50:18 +0000 | [diff] [blame] | 10 | elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel" ) |
| 11 | set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON) |
John Brawn | a933c2a | 2015-09-29 14:33:58 +0000 | [diff] [blame] | 12 | endif() |
| 13 | endif() |