Michael Enßlin michael@... writes:
Over the last several decades, at least on the POSIX platform, it has
become common practice to invoke compilers with relative file paths, and
compilers have adopted to act accordingly. While the true culprit is the
C standard's lax definition of __FILE__,
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
On 01/22/2015 04:46 AM, Michael Enßlin wrote:
(1.2) Using compile-time string manipulations to sanitize the filename.
Due to limitations of C++, this requires template metaprogramming,
leading to unreasonable complexity and compile times.
See below.
Over the last several decades,
Hi,
thanks for your reply.
I am using an out-of-source build, and my build system even contains
rules to explicitly prohibit in-source builds.
To make __FILE__ behave correctly, you'd have to invoke the compiler
with a different cwd.
A generated line in build.make, which currently looks like
Hi,
this issue has been discussed here in 2011, but not to my satisfaction
(http://www.cmake.org/pipermail/cmake/2011-December/thread.html#48266).
My logging code uses __FILE__ to print the name of the relevant source
file; cmake's absolute-path compiler invocations, combined with gcc's