Skip to content

Commit 9a8c831

Browse files
committed
Add MSVC compiler version to build-info.
1 parent a44fb9d commit 9a8c831

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
118118
add_custom_command(
119119
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/build-info.h"
120120
COMMENT "Generating build details from Git"
121-
COMMAND ${CMAKE_COMMAND} -DMSVC=${MSVC} -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID} -DCMAKE_VS_PLATFORM_NAME=${CMAKE_VS_PLATFORM_NAME} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -P "${CMAKE_CURRENT_SOURCE_DIR}/scripts/build-info.cmake"
121+
COMMAND ${CMAKE_COMMAND} -DMSVC=${MSVC} -DCMAKE_C_COMPILER_VERSION=${CMAKE_C_COMPILER_VERSION} -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID} -DCMAKE_VS_PLATFORM_NAME=${CMAKE_VS_PLATFORM_NAME} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -P "${CMAKE_CURRENT_SOURCE_DIR}/scripts/build-info.cmake"
122122
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
123123
DEPENDS "${GIT_DIR}/index"
124124
VERBATIM

scripts/build-info.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if(Git_FOUND)
3636
endif()
3737

3838
if(MSVC)
39-
set(BUILD_COMPILER ${CMAKE_C_COMPILER_ID})
39+
set(BUILD_COMPILER "${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
4040
set(BUILD_TARGET ${CMAKE_VS_PLATFORM_NAME})
4141
else()
4242
execute_process(

0 commit comments

Comments
 (0)