Module: kamailio
Branch: master
Commit: ccadde0a6656cd78fc1b4f67ed40b5a6ac119d9e
URL:
https://github.com/kamailio/kamailio/commit/ccadde0a6656cd78fc1b4f67ed40b5a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-12-11T11:19:11+01:00
cmake/defs.cmake: value of -DCOMPILER updated to include compiler suite name
- similar format like for old-makefiles, not only the version number
---
Modified: cmake/defs.cmake
---
Diff:
https://github.com/kamailio/kamailio/commit/ccadde0a6656cd78fc1b4f67ed40b5a…
Patch:
https://github.com/kamailio/kamailio/commit/ccadde0a6656cd78fc1b4f67ed40b5a…
---
diff --git a/cmake/defs.cmake b/cmake/defs.cmake
index bb9a0b680a7..1d151646c05 100644
--- a/cmake/defs.cmake
+++ b/cmake/defs.cmake
@@ -294,6 +294,13 @@ endif()
include(${CMAKE_SOURCE_DIR}/cmake/compiler-specific.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/os-specific.cmake)
+set(COMPILER_NAME ${CMAKE_C_COMPILER_ID})
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ set(COMPILER_NAME "gcc")
+elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ set(COMPILER_NAME "clang")
+endif()
+
string(TOLOWER ${OS} OS_LOWER)
target_compile_definitions(
common
@@ -303,7 +310,7 @@ target_compile_definitions(
ARCH="${CMAKE_HOST_SYSTEM_PROCESSOR}"
OS=${OS}
OS_QUOTED="${OS}"
- COMPILER="${CMAKE_C_COMPILER_VERSION}"
+ COMPILER="${COMPILER_NAME} ${CMAKE_C_COMPILER_VERSION}"
# ${HOST_ARCH}
${TARGET_ARCH}
__OS_${OS_LOWER}