aboutsummaryrefslogtreecommitdiff
path: root/rcc/cmake/modules/DetermineGCCCompatible.cmake
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-10-21 08:10:34 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-10-21 08:10:34 +0800
commitbbfffc8ce49b9afe854f0799513ab6b7891d6dab (patch)
treed1b2a1cc8166270764b627960fa193b60e9b3271 /rcc/cmake/modules/DetermineGCCCompatible.cmake
parent49de843452f161ee42cb8f4ff4780ccc02ae3a7a (diff)
downloadrcc-project-bbfffc8ce49b9afe854f0799513ab6b7891d6dab.tar.gz
rcc-project-bbfffc8ce49b9afe854f0799513ab6b7891d6dab.tar.xz
[CMake] Add RCC platform configuration checks
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()