Skip to content
Snippets Groups Projects
Commit fe853abd authored by m.puchner's avatar m.puchner
Browse files

Merge branch 'PythonDebugForVS' into 'main'

use python_d.exe to run tests in debug builds on multi-config generators like MS Visual Studio

See merge request !642
parents 6fe9b790 e04aa182
No related branches found
No related tags found
1 merge request!642use python_d.exe to run tests in debug builds on multi-config generators like MS Visual Studio
Pipeline #56469 passed
......@@ -16,6 +16,10 @@ if(WIN32)
file(TO_CMAKE_PATH ${Python3_INCLUDE_DIRS} Python3_INCLUDE_DIRS)
file(TO_CMAKE_PATH ${Python3_NumPy_INCLUDE_DIRS} Python3_NumPy_INCLUDE_DIRS)
file(TO_CMAKE_PATH ${Python3_SITELIB} Python3_SITELIB)
# Necessary for Visual Studio (multi-config-generator): provide also debug-exe of python3
string(REPLACE ".exe" "_d.exe" Python3_EXECUTABLE_DEBUG ${Python3_EXECUTABLE})
endif()
configure_file(${CONFIGURABLES_DIR}/BAVersion.h.in ${BUILD_INC_DIR}/BAVersion.h @ONLY)
......
......@@ -36,7 +36,11 @@ inline std::string srcDir() {
//! Methods to access info about Python used during the build.
inline std::string pythonExecutable() {
#if defined WIN32 && defined _DEBUG
return "@Python3_EXECUTABLE_DEBUG@";
#else
return "@Python3_EXECUTABLE@";
#endif
}
inline std::string pythonInterpreterID() {
return "@Python3_INTERPRETER_ID@";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment