Options
Overriding Options
From Overriding Option
Go to text ā
Example option in CMakeLists.txt:
option(MY_OPTION "My Option" ON)
Example overriding option at runtime:
cmake -DMY_OPTION=OFF -S . -B ./build && cd build && make && echo "Build done."
Working Example
gt.sandbox.checkout.commit.cleanly 315b92c \
&& cd cpp/cmake-options \
&& cmake -DMY_OPTION=OFF -S . -B ./build && cd ./build && make \
&& ./MyMain