View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015655CMake(No Category)public2015-07-15 13:422016-06-10 14:31
ReporterJames Bigler 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0015655: file(GENERATE) fails of the destination directory doesn't exist
DescriptionI wanted to use file(GENERATE) to create some files in an output build directory, but these directories don't exist at the time of configure and build so the command fails. These directories are created during build, though so CMake knows about them somehow.

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

file(GENERATE OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIG>/test.out CONTENT "Hello, world")

file(WRITE a.cpp "int main() { return 0; }")
add_executable(a a.cpp)
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0042810)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2015-07-15 13:42 James Bigler New Issue
2016-06-10 14:29 Kitware Robot Note Added: 0042810
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team