Skip to content

Commit 66efb4e

Browse files
PhilipOakleydscho
authored andcommitted
CMake: show Win32 and Generator_platform build-option values
Ensure key CMake option values are part of the CMake output to facilitate user support when tool updates impact the wider CMake actions, particularly ongoing 'improvements' in Visual Studio. These CMake displays perform the same function as the build-options.txt provided in the main Git for Windows. CMake is already chatty. The setting of CMAKE_EXPORT_COMPILE_COMMANDS is also reported. Include the environment's CMAKE_EXPORT_COMPILE_COMMANDS value which may have been propogated to CMake's internal value. Testing the CMAKE_EXPORT_COMPILE_COMMANDS processing can be difficult in the Visual Studio environment, as it may be cached in many places. The 'environment' may include the OS, the user shell, CMake's own environment, along with the Visual Studio presets and caches. See previous commit for arefacts that need removing for a clean test. Signed-off-by: Philip Oakley <[email protected]>
1 parent 9929d91 commit 66efb4e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

contrib/buildsystems/CMakeLists.txt

+10
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,20 @@ endif()
6363

6464
if(NOT DEFINED CMAKE_EXPORT_COMPILE_COMMANDS)
6565
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
66+
message("settting CMAKE_EXPORT_COMPILE_COMMANDS: ${CMAKE_EXPORT_COMPILE_COMMANDS}")
6667
endif()
6768

6869
if(USE_VCPKG)
6970
set(VCPKG_DIR "${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg")
71+
message("WIN32: ${WIN32}") # show its underlying text values
72+
message("VCPKG_DIR: ${VCPKG_DIR}")
73+
message("VCPKG_ARCH: ${VCPKG_ARCH}") # maybe unset
74+
message("MSVC: ${MSVC}")
75+
message("CMAKE_GENERATOR: ${CMAKE_GENERATOR}")
76+
message("CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}")
77+
message("CMAKE_GENERATOR_PLATFORM: ${CMAKE_GENERATOR_PLATFORM}")
78+
message("CMAKE_EXPORT_COMPILE_COMMANDS: ${CMAKE_EXPORT_COMPILE_COMMANDS}")
79+
message("ENV(CMAKE_EXPORT_COMPILE_COMMANDS): $ENV{CMAKE_EXPORT_COMPILE_COMMANDS}")
7080
if(NOT EXISTS ${VCPKG_DIR})
7181
message("Initializing vcpkg and building the Git's dependencies (this will take a while...)")
7282
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg_install.bat ${VCPKG_ARCH})

0 commit comments

Comments
 (0)