| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0005436 | CMake | CMake | public | 2007-07-31 06:58 | 2016-06-10 14:30 | ||||
| Reporter | Yegor Yefremov | ||||||||
| Assigned To | Bill Hoffman | ||||||||
| Priority | low | Severity | minor | Reproducibility | always | ||||
| Status | closed | Resolution | moved | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0005436: ADD_CUSTOM_COMMAND unused custom commands are not reported to the user | ||||||||
| Description | If add_custom_command is placed before the target itself, there is no warning or error message, when executing "cmake .". The custom target will not created, when executing make. As soon as add_custom_target is placed after the target itself, the custom target will be created. The following CMakeLists.txt was used to test this behavior (test.c is also attached): project (TEST) # sources set (SRCS test.c) #custom target add_custom_command (TARGET test POST_BUILD COMMENT "Creating tags" COMMAND mkdir tags WORKING_DIRECTORY ${TEST_SOURCE_DIR}) # executables add_executable (test ${SRCS}) | ||||||||
| Additional Information | From Brad King: In cmMakefile::AddCustomCommandToTarget, this code appears: // Find the target to which to add the custom command. cmTargets::iterator ti = this->Targets.find(target); if(ti != this->Targets.end()) { ... } There is no else block. There should be an else block that uses IssueMessage to complain that the target doesn't exist. You'll have to create a policy to make this an error. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0041378) 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. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2008-10-10 10:36 | Bill Hoffman | Summary | ADD_CUSTOM_COMMAND no dependencies check => ADD_CUSTOM_COMMAND unused custom commands are not reported to the user |
| 2008-10-10 10:36 | Bill Hoffman | Additional Information Updated | |
| 2016-06-10 14:27 | Kitware Robot | Note Added: 0041378 | |
| 2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved |
| 2016-06-10 14:27 | Kitware Robot | Resolution | open => moved |
| 2016-06-10 14:30 | Kitware Robot | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |