cmake: Use CMAKE_CXX_COMPILER_ID
SD_BUILD_INFO_COMPILER_NAME is redundant since CMAKE_CXX_COMPILER_ID can already be used for this purpose, even if their values are not identical.
This commit is contained in:
parent
14a19abcc6
commit
c5266013fc
2 changed files with 7 additions and 13 deletions
|
@ -74,6 +74,12 @@ else()
|
||||||
message(STATUS "Data directory: ${SD_DATADIR_ABS}")
|
message(STATUS "Data directory: ${SD_DATADIR_ABS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID)
|
||||||
|
set(SD_BUILD_INFO_COMPILER_NAME ${CMAKE_CXX_COMPILER_ID})
|
||||||
|
else()
|
||||||
|
set(SD_BUILD_INFO_COMPILER_NAME "Unknown")
|
||||||
|
endif()
|
||||||
|
|
||||||
INCLUDE(cmake/macros.cmake)
|
INCLUDE(cmake/macros.cmake)
|
||||||
INCLUDE(cmake/checks.cmake)
|
INCLUDE(cmake/checks.cmake)
|
||||||
|
|
||||||
|
|
|
@ -159,19 +159,7 @@
|
||||||
# define SD_BUILD_INFO_CONFIGURATION "${CMAKE_BUILD_TYPE}"
|
# define SD_BUILD_INFO_CONFIGURATION "${CMAKE_BUILD_TYPE}"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#define SD_BUILD_INFO_COMPILER_NAME "${SD_BUILD_INFO_COMPILER_NAME}"
|
||||||
# define SD_BUILD_INFO_COMPILER_NAME "MSC"
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
# if defined(__MINGW32__)
|
|
||||||
# define SD_BUILD_INFO_COMPILER_NAME "MinGW GCC"
|
|
||||||
# elif defined(__INTEL_COMPILER)
|
|
||||||
# define SD_BUILD_INFO_COMPILER_NAME "Intel"
|
|
||||||
# else
|
|
||||||
# define SD_BUILD_INFO_COMPILER_NAME "GCC"
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# define SD_BUILD_INFO_COMPILER_NAME "Unknown"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Run-time directories */
|
/* Run-time directories */
|
||||||
#define SD_DATADIR "${SD_DATADIR}/"
|
#define SD_DATADIR "${SD_DATADIR}/"
|
||||||
|
|
Loading…
Reference in a new issue