mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-22 23:22:15 -05:00
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 <philipoakley@iee.email>
This commit is contained in:
committed by
Johannes Schindelin
parent
a35f141351
commit
86d138ede6
@@ -63,10 +63,20 @@ endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_EXPORT_COMPILE_COMMANDS)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
|
||||
message("settting CMAKE_EXPORT_COMPILE_COMMANDS: ${CMAKE_EXPORT_COMPILE_COMMANDS}")
|
||||
endif()
|
||||
|
||||
if(USE_VCPKG)
|
||||
set(VCPKG_DIR "${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg")
|
||||
message("WIN32: ${WIN32}") # show its underlying text values
|
||||
message("VCPKG_DIR: ${VCPKG_DIR}")
|
||||
message("VCPKG_ARCH: ${VCPKG_ARCH}") # maybe unset
|
||||
message("MSVC: ${MSVC}")
|
||||
message("CMAKE_GENERATOR: ${CMAKE_GENERATOR}")
|
||||
message("CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}")
|
||||
message("CMAKE_GENERATOR_PLATFORM: ${CMAKE_GENERATOR_PLATFORM}")
|
||||
message("CMAKE_EXPORT_COMPILE_COMMANDS: ${CMAKE_EXPORT_COMPILE_COMMANDS}")
|
||||
message("ENV(CMAKE_EXPORT_COMPILE_COMMANDS): $ENV{CMAKE_EXPORT_COMPILE_COMMANDS}")
|
||||
if(NOT EXISTS ${VCPKG_DIR})
|
||||
message("Initializing vcpkg and building the Git's dependencies (this will take a while...)")
|
||||
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg_install.bat ${VCPKG_ARCH})
|
||||
|
||||
Reference in New Issue
Block a user