Use debug conan profiles for debug configurations

This commit is contained in:
Dan Paulat 2025-06-29 23:12:06 -05:00
parent 76c6ac2ccd
commit f684d62cb1
3 changed files with 74 additions and 30 deletions

View file

@ -33,8 +33,24 @@ pip install --upgrade -r "%script_dir%\..\requirements.txt"
:: Install Conan profiles
@for /L %%i in (0,1,!last_profile!) do @(
:: Install the base profile
set "profile_name=!conan_profile[%%i]!"
conan config install "%script_dir%\conan\profiles\!profile_name!" -tf profiles
set "profile_path=%script_dir%\conan\profiles\!profile_name!"
conan config install "!profile_path!" -tf profiles
:: Create debug profile in temp directory
set "debug_profile_name=!profile_name!-debug"
set "debug_profile_path=%TEMP%\!debug_profile_name!"
copy "!profile_path!" "!debug_profile_path!" >nul
:: Replace build_type=Release with build_type=Debug
powershell -Command "(Get-Content '!debug_profile_path!') -replace 'build_type=Release', 'build_type=Debug' | Set-Content '!debug_profile_path!'"
:: Install the debug profile
conan config install "!debug_profile_path!" -tf profiles
:: Remove temporary debug profile
del "!debug_profile_path!"
)
:: Deactivate Python Virtual Environment