Archived issue #0031822
Configuration, CMake - setting of Debugging properties via target properties instead of template file
Description
Currently Debugging properties of the generated Visual Studio projects are set in CMake configuration files via configuring template files *.user.in. E.g., look at /CMakeLists.txt:1002:
In modern versions of CMake some target and directory properties were introduced for this purpose:
The example of use of such properties:
The most recent of these properties were introduced in CMake 3.13 that was released in November 2018, almost two years ago. So it can be used in OCCT CMake configuration files as stable enough.
OCCT_CONFIGURE ("adm/templates/DRAWEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/src/DRAWEXE/DRAWEXE.vcxproj.user")In modern versions of CMake some target and directory properties were introduced for this purpose:
- target properties:
- VS_DEBUGGER_COMMAND (introduced in CMake 3.12) https://cmake.org/cmake/help/latest/prop_tgt/VS_DEBUGGER_COMMAND.html
- VS_DEBUGGER_COMMAND_ARGUMENTS (introduced in CMake 3.13) https://cmake.org/cmake/help/latest/prop_tgt/VS_DEBUGGER_COMMAND_ARGUMENTS.html
- VS_DEBUGGER_WORKING_DIRECTORY (introduced in CMake 3.8) https://cmake.org/cmake/help/latest/prop_tgt/VS_DEBUGGER_WORKING_DIRECTORY.html
- VS_DEBUGGER_ENVIRONMENT (introduced in CMake 3.13) https://cmake.org/cmake/help/latest/prop_tgt/VS_DEBUGGER_ENVIRONMENT.html
- directory properties:
- VS_STARTUP_PROJECT (introduced in CMake 3.6) https://cmake.org/cmake/help/latest/prop_dir/VS_STARTUP_PROJECT.html
The example of use of such properties:
set_target_properties (${PROJECT_NAME} PROPERTIES VS_DEBUGGER_ENVIRONMENT "${VisualStudio_DebuggerEnvironment}")
set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})The most recent of these properties were introduced in CMake 3.13 that was released in November 2018, almost two years ago. So it can be used in OCCT CMake configuration files as stable enough.
Public activity
1 archived note
Participants are labeled by their role within this record.
not relevant. closed.
Related records