I have the following use case:
Lets say the project’s top-level CMakeLists.txt file contains the following lines:
Is it possible to overwrite these paths at runtime using the command line interface? Per documentation the following commands below can be used to set the paths at runtime. However, my tests show that the paths set at runtime will not overwrite the paths that have been already set within the CMakeLists.txt file.
$ mkdir build && cd build $ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/my/path -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/my/path -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=/my/path .. $ cmake --build .
Is there another way, or some option that I am missing to overwrite the paths set within the CMakeLists.txt, without manipulating the CMakeLists.txt file itself?
Thanks in advance!