Overriding Option
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
Video Ref Timestamp
Backlinks