[CMake] weirdness with CMAKE_CACHEFILE_DIR
Eric Torstenson
eric.torstenson at mac.com
Wed May 21 17:21:16 EDT 2008
Hi All,
I am performing out of source builds, and trying to use the CWD to place
my binaries. I am using CMAKE_CACHEFILE_DIR to get that directory, which
seems to be correct, but it seems to behave rather strangely.
On the first time I run CMake, it reads properly when I display it using
MESSAGE, however, when I do something like the lines below, there seems
to be some slashes getting lost. The result is that the directory slash
between bin and ${Platform} is getting lost.
What is strangest, is the fact that if I then run cmake again, it gets
it right the second time (assuming I didn't delete the cmake cache file
nor any other biproducts)
SET (BuildDIR ${CMAKE_CACHEFILE_DIR}/../bin/${PLATFORM})
SET (EXECUTABLE_OUTPUT_PATH ${BuildDIR})
....
Linking CXX executable binLinux-x86_64/genomeSIMLA
/usr/bin/ld: cannot open output file binLinux-x86_64/genomeSIMLA: No
such file or directory
collect2: ld returned 1 exit status
make[2]: *** [binLinux-x86_64/genomeSIMLA] Error 1
Is it that I'm using the ../bin to place the products? I don't want them
in my build directory.
Thanks for any suggestions,
eric
More information about the CMake
mailing list