[cmake-developers] Adding an option for relative compiler invocations

Brad King brad.king at kitware.com
Mon Jan 26 08:41:47 EST 2015


On 01/23/2015 05:44 PM, Michael Enßlin wrote:
> cd /home/mic/git/openage && /usr/bin/g++ $(CXX_DEFINES) $(CXX_FLAGS) -o
> /home/mic/git/openage/.bin/gcc-release-O2/cpp/CMakeFiles/openage.dir/engine.cpp.o
> -c cpp/engine.cpp

Invoking the compiler inside the source tree is not an option.  Many
compilers leave around extra files as side-effects and we cannot allow
them to pollute the source tree in an out-of-source build.

I don't think getting a relative __FILE__ is a realistic option with
CMake.

-Brad



More information about the cmake-developers mailing list