MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0008833 | CMake | CMake | public | 2009-04-02 04:08 | 2016-06-10 14:30 |
Reporter | Tobias Rudolph | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | OS | OS Version | |||
Product Version | CMake-2-6 | ||||
Target Version | Fixed in Version | ||||
Summary | 0008833: Xcode projects need to be build twice to capture changes in template files | ||||
Description | I have a problem with compiled CUDA source code and the Xcode generator. (The CUDA sources are compiled with the "NVIDIA (R) Cuda compiler driver" into C-code) The behavior can be demonstrated using this simple example: I have a file called "main.template": ---- #include <iostream> int main() { std::cout << "Hello world!\n"; return 0; } ---- my CMakeLists.txt looks like this: ---- project( XcodeTest ) cmake_minimum_required( VERSION 2.6 ) get_filename_component( TEMPLATE main.template ABSOLUTE ) add_custom_command( OUTPUT main.cpp COMMAND cp ARGS ${TEMPLATE} main.cpp DEPENDS main.template ) set_source_files_properties( main.cpp PROPERTIES GENERATED TRUE ) add_executable( program main.cpp main.template ) ---- As you can see, when a rebuild is done, the template gets copied to "main.cpp" which in turn is compiled and linked. This works great in Xcode. But, whenever I change the template, i.e. my CUDA sources, I have to run the build twice to make the changes appear in the test program. It looks like the custom command is executed during the first run and the generated file gets compiled in the second. | ||||
Steps To Reproduce | |||||
Additional Information | Example project attached. cmake version 2.6-patch 3 | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | XcodeTest.tar.gz (649) 2009-04-02 04:08 https://public.kitware.com/Bug/file/2149/XcodeTest.tar.gz QtBug.zip (3,089) 2009-04-30 10:55 https://public.kitware.com/Bug/file/2201/QtBug.zip | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2009-04-02 04:08 | Tobias Rudolph | New Issue | |||
2009-04-02 04:08 | Tobias Rudolph | File Added: XcodeTest.tar.gz | |||
2009-04-30 10:54 | Daniel Blezek | Note Added: 0016270 | |||
2009-04-30 10:55 | Daniel Blezek | File Added: QtBug.zip | |||
2009-09-14 15:25 | Bill Hoffman | Status | new => assigned | ||
2009-09-14 15:25 | Bill Hoffman | Assigned To | => Brad King | ||
2009-09-17 10:42 | Brad King | Note Added: 0017588 | |||
2012-08-13 10:37 | Brad King | Status | assigned => backlog | ||
2012-08-13 10:37 | Brad King | Note Added: 0030534 | |||
2016-06-10 14:27 | Kitware Robot | Note Added: 0041534 | |||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|