View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006337CMakeCMakepublic2008-02-13 12:252008-10-01 17:00
ReporterBrandon Van Every 
Assigned ToBill Hoffman 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006337: cmake -P crashes on configure_file
DescriptionIt is documented that cmake -P does not have a configuration stage or a cache. However in CMake 2.4.8, if a cmake -P script attempts to execute a configure_file command, the error message says that CMake has not been built correctly. This is worrisome. Run the following script twice with cmake -P to reproduce:

set(input ${CMAKE_SOURCE_DIR}/a.txt)
if(EXISTS ${input})
  set(output ${CMAKE_BINARY_DIR}/b.txt)
  if(EXISTS ${output})
    message("${output} already exists")
  else(EXISTS ${output})
    configure_file(${input} ${output})
  endif(EXISTS ${output})
else(EXISTS ${input})
  file(WRITE ${input} "This is some text")
  message("Created ${input}")
  message("Can't use output of file(WRITE ...) for configure_file")
  message("Re-run script")
endif(EXISTS ${input})

C:\devel\src\cbugs\configure>cmake -P configure_file.cmake
Created C:/devel/src/cbugs/configure/a.txt
Can't use output of file(WRITE ...) for configure_file
Re-run script

C:\devel\src\cbugs\configure>cmake -P configure_file.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be
 built correctly.
Missing variable is:

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
Alex Neundorf (developer)
2008-02-13 14:08

Can you please check how it behaves with cmake cvs ?

Brandon Van Every (reporter)
2008-02-13 17:54

Interesting. Under CMake 2.5-20080213 it dies silently. No messages, either from my message() calls or from error diagnostics. No configure_file output either.
Alex Neundorf (developer)
2008-02-14 15:50

Can you get a backtrace ?

- Issue History
Date Modified Username Field Change
2008-02-13 12:25 Brandon Van Every New Issue
2008-02-13 14:08 Alex Neundorf Note Added: 0010482
2008-02-13 17:54 Brandon Van Every Note Added: 0010489
2008-02-14 15:50 Alex Neundorf Note Added: 0010500
2008-02-15 10:28 Bill Hoffman Status new => assigned
2008-02-15 10:28 Bill Hoffman Assigned To => Bill Hoffman
2008-10-01 17:00 Bill Hoffman Status assigned => closed
2008-10-01 17:00 Bill Hoffman Resolution open => fixed

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker