| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0014706 | CMake | CMake | public | 2014-01-17 15:11 | 2014-06-02 08:38 | ||||
| Reporter | Luis Vega | ||||||||
| Assigned To | |||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||
| Status | closed | Resolution | no change required | ||||||
| Platform | Linux | OS | Ubuntu | OS Version | 13.10 | ||||
| Product Version | CMake 2.8.11.2 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0014706: Sources compiled multiple times when building with make, multiple jobs, and targets with common dependencies | ||||||||
| Description | A source file will be compiled multiple times when the following combination of conditions are met: -Using gnu make to build the project. -Two targets that have a common dependency are specified to the make command. -Using multiple jobs. If targets "foo" and "bar" depend on target "dep" and a build command is issued as: make -j foo bar Then "dep" sources will be compiled twice. | ||||||||
| Steps To Reproduce | Create library target "dep" Create executable target "foo" and link to "dep" Create executable target "bar" and link to "dep" Create gnu makefiles with cmake Issue build command as: make -j foo bar Output will show that each "dep" source was compiled twice (once per target that depends on "dep"). | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0034955) Brad King (manager) 2014-01-17 15:23 |
Passing multiple levels to the top-level "make -j" invocation was only recently made to work with GNU make (and not yet in a release). See issue 0014312. For now just use "make -j foo && make -j bar". Sources are compiled once for each target that contains them by design. Each target may use different flags. If you want the same source in multiple executables then use a static library to build them. |
|
(0036086) Robert Maynard (manager) 2014-06-02 08:38 |
Closing resolved issues that have not been updated in more than 4 months. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2014-01-17 15:11 | Luis Vega | New Issue | |
| 2014-01-17 15:11 | Luis Vega | File Added: example.tar.gz | |
| 2014-01-17 15:23 | Brad King | Note Added: 0034955 | |
| 2014-01-17 15:23 | Brad King | Status | new => resolved |
| 2014-01-17 15:23 | Brad King | Resolution | open => no change required |
| 2014-06-02 08:38 | Robert Maynard | Note Added: 0036086 | |
| 2014-06-02 08:38 | Robert Maynard | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |