I have one build script per each environment (debug, release, relwithdebuginfo etc).
Each script calls CMake with the relevant build environment set:
cmake -DCMAKE_BUILD_TYPE=Debug -DARG_FORCE_CLANG=True
a flag inside the CMakeLists.txt file controls the sanitize flag. However, I would like to control this from a new sanitize build script, something like:
cmake -DCMAKE_BUILD_TYPE=Debug -DARG_FORCE_CLANG=True -SANITIZE=true
Is there any way to achieve this?