From bbfffc8ce49b9afe854f0799513ab6b7891d6dab Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Wed, 21 Oct 2026 08:10:34 +0800 Subject: [CMake] Add RCC platform configuration checks --- rcc/cmake/modules/DetermineGCCCompatible.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 rcc/cmake/modules/DetermineGCCCompatible.cmake (limited to 'rcc/cmake/modules/DetermineGCCCompatible.cmake') 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() -- cgit v1.2.3