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

@ -54,9 +54,7 @@
"inherits": "windows-x64-base",
"hidden": true,
"cacheVariables": {
"CMAKE_PREFIX_PATH": "C:/Qt/6.8.3/msvc2022_64",
"CONAN_HOST_PROFILE": "scwx-windows_msvc2022_x64",
"CONAN_BUILD_PROFILE": "scwx-windows_msvc2022_x64"
"CMAKE_PREFIX_PATH": "C:/Qt/6.8.3/msvc2022_64"
}
},
{
@ -65,9 +63,7 @@
"hidden": true,
"generator": "Ninja",
"cacheVariables": {
"CMAKE_PREFIX_PATH": "C:/Qt/6.8.3/msvc2022_64",
"CONAN_HOST_PROFILE": "scwx-windows_msvc2022_x64",
"CONAN_BUILD_PROFILE": "scwx-windows_msvc2022_x64"
"CMAKE_PREFIX_PATH": "C:/Qt/6.8.3/msvc2022_64"
}
},
{
@ -75,9 +71,7 @@
"inherits": "linux-base",
"hidden": true,
"cacheVariables": {
"CMAKE_PREFIX_PATH": "/opt/Qt/6.8.3/gcc_64",
"CONAN_HOST_PROFILE": "scwx-linux_gcc-11",
"CONAN_BUILD_PROFILE": "scwx-linux_gcc-11"
"CMAKE_PREFIX_PATH": "/opt/Qt/6.8.3/gcc_64"
},
"environment": {
"CC": "gcc-11",
@ -93,7 +87,9 @@
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
"CMAKE_BUILD_TYPE": "Debug",
"CONAN_HOST_PROFILE": "scwx-windows_msvc2022_x64-debug",
"CONAN_BUILD_PROFILE": "scwx-windows_msvc2022_x64-debug"
}
},
{
@ -105,7 +101,9 @@
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
"CMAKE_BUILD_TYPE": "Release",
"CONAN_HOST_PROFILE": "scwx-windows_msvc2022_x64",
"CONAN_BUILD_PROFILE": "scwx-windows_msvc2022_x64"
}
},
{
@ -113,7 +111,9 @@
"inherits": "windows-msvc2022-x64-ninja-base",
"displayName": "Windows MSVC 2022 x64 Ninja Debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
"CMAKE_BUILD_TYPE": "Debug",
"CONAN_HOST_PROFILE": "scwx-windows_msvc2022_x64-debug",
"CONAN_BUILD_PROFILE": "scwx-windows_msvc2022_x64-debug"
}
},
{
@ -121,7 +121,9 @@
"inherits": "windows-msvc2022-x64-ninja-base",
"displayName": "Windows MSVC 2022 x64 Ninja Release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
"CMAKE_BUILD_TYPE": "Release",
"CONAN_HOST_PROFILE": "scwx-windows_msvc2022_x64",
"CONAN_BUILD_PROFILE": "scwx-windows_msvc2022_x64"
}
},
{
@ -130,7 +132,9 @@
"displayName": "Linux GCC Debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/${presetName}/Debug/supercell-wx"
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/${presetName}/Debug/supercell-wx",
"CONAN_HOST_PROFILE": "scwx-linux_gcc-11-debug",
"CONAN_BUILD_PROFILE": "scwx-linux_gcc-11-debug"
}
},
{
@ -139,7 +143,9 @@
"displayName": "Linux GCC Release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/${presetName}/Release/supercell-wx"
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/${presetName}/Release/supercell-wx",
"CONAN_HOST_PROFILE": "scwx-linux_gcc-11",
"CONAN_BUILD_PROFILE": "scwx-linux_gcc-11"
}
},
{
@ -149,6 +155,8 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/${presetName}/Debug/supercell-wx",
"CONAN_HOST_PROFILE": "scwx-linux_gcc-11-debug",
"CONAN_BUILD_PROFILE": "scwx-linux_gcc-11-debug",
"SCWX_ADDRESS_SANITIZER": {
"type": "BOOL",
"value": "ON"
@ -162,6 +170,8 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/${presetName}/Release/supercell-wx",
"CONAN_HOST_PROFILE": "scwx-linux_gcc-11",
"CONAN_BUILD_PROFILE": "scwx-linux_gcc-11",
"SCWX_ADDRESS_SANITIZER": {
"type": "BOOL",
"value": "ON"
@ -202,9 +212,9 @@
"displayName": "CI Linux GCC ARM64",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_PREFIX_PATH": "/opt/Qt/6.8.3/gcc_arm64",
"CONAN_HOST_PROFILE": "scwx-linux_gcc-11_armv8",
"CONAN_BUILD_PROFILE": "scwx-linux_gcc-11_armv8",
"CMAKE_PREFIX_PATH": "/opt/Qt/6.8.3/gcc_arm64"
"CONAN_BUILD_PROFILE": "scwx-linux_gcc-11_armv8"
},
"environment": {
"CC": "gcc-11",
@ -233,10 +243,6 @@
"name": "macos-clang18-x64-base",
"inherits": "macos-clang18-base",
"hidden": true,
"cacheVariables": {
"CONAN_HOST_PROFILE": "scwx-macos_clang-18",
"CONAN_BUILD_PROFILE": "scwx-macos_clang-18"
},
"environment": {
"CC": "/usr/local/opt/llvm@18/bin/clang",
"CXX": "/usr/local/opt/llvm@18/bin/clang++",
@ -249,10 +255,6 @@
"name": "macos-clang18-arm64-base",
"inherits": "macos-clang18-base",
"hidden": true,
"cacheVariables": {
"CONAN_HOST_PROFILE": "scwx-macos_clang-18_armv8",
"CONAN_BUILD_PROFILE": "scwx-macos_clang-18_armv8"
},
"environment": {
"CC": "/opt/homebrew/opt/llvm@18/bin/clang",
"CXX": "/opt/homebrew/opt/llvm@18/bin/clang++",
@ -266,7 +268,9 @@
"inherits": "macos-clang18-x64-base",
"displayName": "macOS Clang 18 x64 Debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
"CMAKE_BUILD_TYPE": "Debug",
"CONAN_HOST_PROFILE": "scwx-macos_clang-18-debug",
"CONAN_BUILD_PROFILE": "scwx-macos_clang-18-debug"
}
},
{
@ -274,7 +278,9 @@
"inherits": "macos-clang18-x64-base",
"displayName": "macOS Clang 18 x64 Release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
"CMAKE_BUILD_TYPE": "Release",
"CONAN_HOST_PROFILE": "scwx-macos_clang-18",
"CONAN_BUILD_PROFILE": "scwx-macos_clang-18"
}
},
{
@ -282,7 +288,9 @@
"inherits": "macos-clang18-arm64-base",
"displayName": "macOS Clang 18 Arm64 Debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
"CMAKE_BUILD_TYPE": "Debug",
"CONAN_HOST_PROFILE": "scwx-macos_clang-18_armv8-debug",
"CONAN_BUILD_PROFILE": "scwx-macos_clang-18_armv8-debug"
}
},
{
@ -290,7 +298,9 @@
"inherits": "macos-clang18-arm64-base",
"displayName": "macOS Clang 18 Arm64 Release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
"CMAKE_BUILD_TYPE": "Release",
"CONAN_HOST_PROFILE": "scwx-macos_clang-18_armv8",
"CONAN_BUILD_PROFILE": "scwx-macos_clang-18_armv8"
}
}
],

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

View file

@ -71,7 +71,25 @@ fi
# Install Conan profiles
for profile_name in "${conan_profiles[@]}"; do
# Install original profile
conan config install "${script_dir}/conan/profiles/${profile_name}" -tf profiles
# Create debug profile in temp directory
debug_profile="/tmp/${profile_name}-debug"
cp "${script_dir}/conan/profiles/${profile_name}" "${debug_profile}"
# Replace build_type=Release with build_type=Debug
if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' 's/build_type=Release/build_type=Debug/g' "${debug_profile}"
else
sed -i 's/build_type=Release/build_type=Debug/g' "${debug_profile}"
fi
# Install the debug profile
conan config install "${debug_profile}" -tf profiles
# Remove temporary debug profile
rm "${debug_profile}"
done
# Deactivate Python Virtual Environment