diff --git a/CMakeLists.txt b/CMakeLists.txt index 5068971b9..d51d70780 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,12 @@ else() message(STATUS "Data directory: ${SD_DATADIR_ABS}") 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/checks.cmake) diff --git a/cmake/config.h.in.cmake b/cmake/config.h.in.cmake index 07781aa14..fc98e1a9f 100755 --- a/cmake/config.h.in.cmake +++ b/cmake/config.h.in.cmake @@ -159,19 +159,7 @@ # define SD_BUILD_INFO_CONFIGURATION "${CMAKE_BUILD_TYPE}" #endif -#if defined(_MSC_VER) -# 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 +#define SD_BUILD_INFO_COMPILER_NAME "${SD_BUILD_INFO_COMPILER_NAME}" /* Run-time directories */ #define SD_DATADIR "${SD_DATADIR}/"