From 46e564dd736c366c2bf3770f13a265a011723bf7 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Mon, 5 Aug 2024 19:39:27 +0200 Subject: [PATCH] CMakeList: print which compiler is used --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f667a7d..4340896 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,16 @@ else() message(FATAL_ERROR "Unsupported GZ_VERSION: $ENV{GZ_VERSION}") endif() +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + MESSAGE("Using Clang") +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + MESSAGE("Using GNU GCC") +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") + MESSAGE("Using Intel Compiler") +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + MESSAGE("Using MSVC") +endif() + # --------------------------------------------------------------------------- # find_package(RapidJSON REQUIRED) find_package(OpenCV REQUIRED)