mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 01:40:05 +00:00
Add setup script argument to toggle address sanitizer
This commit is contained in:
parent
0b3f2c49db
commit
e76260dffa
3 changed files with 14 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ cmake_args=(
|
|||
-DCONAN_HOST_PROFILE="${conan_profile}"
|
||||
-DCONAN_BUILD_PROFILE="${conan_profile}"
|
||||
-DSCWX_VIRTUAL_ENV="${venv_path}"
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=on
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||
)
|
||||
|
||||
if [[ -n "${build_type}" ]]; then
|
||||
|
|
@ -27,5 +27,16 @@ else
|
|||
)
|
||||
fi
|
||||
|
||||
# Toggle address sanitizer based on argument
|
||||
if [ "${address_sanitizer}" != "disabled" ]; then
|
||||
cmake_args+=(
|
||||
-DSCWX_ADDRESS_SANITIZER=ON
|
||||
)
|
||||
else
|
||||
cmake_args+=(
|
||||
-DSCWX_ADDRESS_SANITIZER=OFF
|
||||
)
|
||||
fi
|
||||
|
||||
mkdir -p "${build_dir}"
|
||||
cmake "${cmake_args[@]}"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ export conan_profile=${2:-scwx-linux_gcc-11}
|
|||
export generator=Ninja
|
||||
export qt_base=/opt/Qt
|
||||
export qt_arch=gcc_64
|
||||
export address_sanitizer=${4:-disabled}
|
||||
|
||||
# Assign user-specified Python Virtual Environment
|
||||
[ "${3:-}" = "none" ] && unset venv_path || export venv_path="$(readlink -f "${3:-${script_dir}/../.venv}")"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ export conan_profile=${2:-scwx-linux_gcc-11}
|
|||
export generator=Ninja
|
||||
export qt_base=/opt/Qt
|
||||
export qt_arch=gcc_64
|
||||
export address_sanitizer=${4:-disabled}
|
||||
|
||||
# Assign user-specified Python Virtual Environment
|
||||
[ "${3:-}" = "none" ] && unset venv_path || export venv_path="$(readlink -f "${3:-${script_dir}/../.venv}")"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue