View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009765CMakeCMakepublic2009-10-22 12:332009-10-22 17:40
ReporterJames Sutherland 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0009765: configure_file behaves differently on Mac and Linux
DescriptionI 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.
Additional InformationThe attached file is a very simple project that reproduces this behavior. On Mac it functions as expected, on Linux, it does not.
TagsNo tags attached.
Attached Fileszip file icon MyProject.zip [^] (2,724 bytes) 2009-10-22 12:33

 Relationships

  Notes
(0018199)
Bill Hoffman (manager)
2009-10-22 17:40

OK, so in CVS and 2.8 this works. For 2.6 and below you have to specify the full path to the output file, or it uses the current directory that cmake was run in.

 Issue History
Date Modified Username Field Change
2009-10-22 12:33 James Sutherland New Issue
2009-10-22 12:33 James Sutherland File Added: MyProject.zip
2009-10-22 17:40 Bill Hoffman Note Added: 0018199
2009-10-22 17:40 Bill Hoffman Status new => closed
2009-10-22 17:40 Bill Hoffman Resolution open => won't fix


Copyright © 2000 - 2018 MantisBT Team