I'm sorry if this is obvious, but I have a command that basically does the following:
mkdir -p /home/developer/cmake-build-debug
cd /home/developer/cmake-build-debug
cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/home/developer/cmake-build-debug -DCMAKE_BUILD_TYPE=Debug ..
I'm expecting this to build the CMake project in /home/developer and output the Makefile etc. to /home/developer/cmake-build-debug. However, the output I get is
Output Directory: /home/developer/cmake-build-debug
-- Boost version 1.58.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/developer
and the build artifacts get created in /home/developer.
The reason I get the first line is my CMakeLists.txt has the following line in it for debugging: message("Output Directory: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
.
This has happened before and I think it kind of "randomly" stopped happening, but I just rebuilt the docker container in which I'm doing this and I'm at a loss for why this is happening. Can someone explain why this is happening and how to fix it?