View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007218CMakeCMakepublic2008-06-20 08:252016-06-10 14:30
ReporterNils Gladitz 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0007218: add_custom_command output file's folder not created by nmake makefile
DescriptionWhen generating vs2005 project files output directories are created when using add_custom_command. When using the nmake generator output directories are not created from within the generated makefiles.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0012429)
Bill Hoffman (manager)
2008-06-20 08:37

Can you give an example of this?
(0012433)
Nils Gladitz (developer)
2008-06-20 09:21

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/foo/test.txt
    COMMAND cp ARGS ${CMAKE_CURRENT_SOURCE_DIR}/bar.txt ${CMAKE_CURRENT_BINARY_DIR}/foo/test.txt
    MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/bar.txt
)

add_custom_target(data ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/foo/test.txt)

This is a condensed/modified example of what I was doing.

The source directory contains a file bar.txt.

My custom command takes bar.txt from the source directory and generates test.txt in the ${CMAKE_CURRENT_BINARY_DIR}/foo directory.

When using the MSVC2005 generator the ${CMAKE_CURRENT_BINARY_DIR}/foo directory is created prior to the custom command being executed.

When using the NMake Makefiles generator the ${CMAKE_CURRENT_BINARY_DIR}/foo directory is not created and the command fails (can't create a file in a non existing directory).
(0012434)
Bill Hoffman (manager)
2008-06-20 09:27

OK, visual studio must be doing this for us. You could use the file(MAKE_DIRECTORY [directory1 directory2 ...]) during cmake time to create the directory.
(0030524)
Brad King (manager)
2012-08-13 10:37

Sending issues I'm not actively working on to the backlog to await someone with time for them.

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it:

 http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on.
(0041432)
Kitware Robot (administrator)
2016-06-10 14:27

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
2008-06-20 08:25 Nils Gladitz New Issue
2008-06-20 08:37 Bill Hoffman Note Added: 0012429
2008-06-20 08:37 Bill Hoffman Status new => assigned
2008-06-20 08:37 Bill Hoffman Assigned To => Bill Hoffman
2008-06-20 09:21 Nils Gladitz Note Added: 0012433
2008-06-20 09:27 Bill Hoffman Note Added: 0012434
2008-09-11 12:01 Bill Hoffman Assigned To Bill Hoffman => Brad King
2012-08-13 10:37 Brad King Status assigned => backlog
2012-08-13 10:37 Brad King Note Added: 0030524
2016-06-10 14:27 Kitware Robot Note Added: 0041432
2016-06-10 14:27 Kitware Robot Status backlog => resolved
2016-06-10 14:27 Kitware Robot Resolution open => moved
2016-06-10 14:30 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team