[cmake-developers] Possibly an obscure bug

Ben Boeckel ben.boeckel at kitware.com
Wed Jun 15 14:54:18 EDT 2016


On Wed, Jun 15, 2016 at 21:34:27 +0300, Binkie Pinkie wrote:
> build$ make
> Scanning dependencies of target list
> make[2]: Circular blink/CMakeFiles/list.dir/main.cpp.o <- blink/list
> dependency dropped.
> [ 50%] Building CXX object blink/CMakeFiles/list.dir/main.cpp.o
> In file included from /media/data/docs/dev/Blink/blink/main.cpp:2:0:
> /media/data/docs/dev/Blink/build/blink/list:1:1: error: stray ‘\177’ in program
>  ELF              >     � @     @       �           @ 8   @            @
>  ^

Looks like the built binary gets found by the compiler and it tries to
#include it. Try setting:

    set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")

to put the executable outside of the -I paths.

--Ben


More information about the cmake-developers mailing list