[CMake] configure_file behaves differently on Mac and Linux?
James C. Sutherland
James.Sutherland at utah.edu
Wed Oct 21 21:59:41 EDT 2009
I am using configure_file to copy files during the build process. I
have a nested directory structure, that can be represented as:
/rootdir
CMakeLists.txt
/test
CMakeLists.txt
When processing rootdir/test/CMakeLists.txt, I have the following:
#---------------------------
get_filename_component( dir ${CMAKE_CURRENT_LIST_FILE} PATH )
configure_file( ${dir}/blessed.txt blessed.txt COPY_FILE )
#---------------------------
The intention is to copy the file "blessed.txt" from the source tree
to the build tree prior to running a regression test.
On Mac, this works as I intend it to. The file "blessed.txt" is
copied to the "test" subdirectory in the build tree.
On Linux, "blessed.txt" is copied to the top-level directory in the
build tree, NOT to the "test" subdirectory.
Is this a bug, or am I doing something wrong?
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091021/e06e4368/attachment.htm>
More information about the CMake
mailing list