diff options
author | Sven Göthel <[email protected]> | 2024-05-04 06:04:13 +0200 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-05-04 06:04:13 +0200 |
commit | cdbdb7cc5c401f34bff45cf218579eb426ccf591 (patch) | |
tree | d45a2c0ec6e34b73d6de8475fd40d415cbafbebf | |
parent | 5fd048816a22a4b50e610d98ab033778b8f7de81 (diff) |
cmake: Use CMAKE_CXX_COMPILER_ID instead of CMAKE_COMPILER_IS_GNUCC
-rw-r--r-- | Setup.cmake | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Setup.cmake b/Setup.cmake index 75ae0fc..3b7fcde 100644 --- a/Setup.cmake +++ b/Setup.cmake @@ -73,23 +73,23 @@ endif() message(STATUS "${PROJECT_NAME} USE_STRIP = ${USE_STRIP} (pre-set)") if(DEBUG) - if(CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g3 -ggdb -DDEBUG -fno-omit-frame-pointer ${GCC_FLAGS_STACK} -no-pie") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DDEBUG") - endif(CMAKE_COMPILER_IS_GNUCC) + endif() if(INSTRUMENTATION) - if(CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_FLAGS_SANITIZE_ALLLEAK}") - endif(CMAKE_COMPILER_IS_GNUCC) + endif() elseif(INSTRUMENTATION_UNDEFINED) - if(CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_FLAGS_SANITIZE_UNDEFINED}") - endif(CMAKE_COMPILER_IS_GNUCC) + endif() elseif(INSTRUMENTATION_THREAD) - if(CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_FLAGS_SANITIZE_THREAD}") - endif(CMAKE_COMPILER_IS_GNUCC) + endif() endif(INSTRUMENTATION) elseif(GPROF) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -g -ggdb -pg") @@ -110,10 +110,10 @@ endif(DEBUG) message(STATUS "${PROJECT_NAME} USE_STRIP = ${USE_STRIP} (final)") if(DEBUG) - if(CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -no-pie") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie") - endif(CMAKE_COMPILER_IS_GNUCC) + endif() else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNDEBUG") endif(DEBUG) @@ -145,11 +145,11 @@ else() endif() if(${OS_NAME} STREQUAL "linux") - if(CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -latomic") else() set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -latomic") - endif(CMAKE_COMPILER_IS_GNUCC) + endif() endif() set (LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Installation path for libraries") |