[CMake] CMAKE_CURRENT_SOURCE_DIR with different values: bug?

Bruno Nery bnery at isr.ist.utl.pt
Mon Jun 15 05:49:31 EDT 2009


Hello,

   This problem happens when I need to use ${CMAKE_CURRENT_SOURCE_DIR}
inside a script, but for an out-of-source build. When echoed from the
CMakeLists.txt file, it outputs the right value (i.e., the source
folder) However, when echoed from inside the script, it outputs the
build folder name (source folder/build). Attached is a "Hello World"
project that reproduces the bug (if it's really a bug) - could anyone
please verify it? CMake version is 2.4.6.

   Also, does anyone have a suggestion of a workaround for it?

thanks,

--
Bruno Nery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake-bug.tgz
Type: application/x-gzip
Size: 444 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090615/ef242a43/attachment.bin>


More information about the CMake mailing list