aboutsummaryrefslogtreecommitdiff
path: root/rcc/cmake/modules/DetermineGCCCompatible.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'rcc/cmake/modules/DetermineGCCCompatible.cmake')
-rw-r--r--rcc/cmake/modules/DetermineGCCCompatible.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/rcc/cmake/modules/DetermineGCCCompatible.cmake b/rcc/cmake/modules/DetermineGCCCompatible.cmake
new file mode 100644
index 0000000..b645e45
--- /dev/null
+++ b/rcc/cmake/modules/DetermineGCCCompatible.cmake
@@ -0,0 +1,13 @@
+# Determine if the compiler has GCC-compatible command-line syntax.
+
+if(NOT DEFINED RCC_COMPILER_IS_GCC_COMPATIBLE)
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ set(RCC_COMPILER_IS_GCC_COMPATIBLE ON)
+ elseif( MSVC )
+ set(RCC_COMPILER_IS_GCC_COMPATIBLE OFF)
+ elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
+ set(RCC_COMPILER_IS_GCC_COMPATIBLE ON)
+ elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel" )
+ set(RCC_COMPILER_IS_GCC_COMPATIBLE ON)
+ endif()
+endif()