You are not using full paths as the args to configure_file...
Why not just this?
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/blessed.txt
${CMAKE_CURRENT_BINARY_DIR}/blessed.txt COPY_FILE )
On Wed, Oct 21, 2009 at 9:59 PM, James C. Sutherland <
[email protected]> wrote:
> 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
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake