On 25.09.2012 14:53, Mantis Bug Tracker wrote:
The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=13559 ======================================================================
There is the code below in the ninja generator, which doesn't use "real" but "order-only" dependency (order-only dependency: "build when needed, don't rebuild on changes" http://martine.github.com/ninja/manual.html#ref_dependencies) Isn't this wrong at all? // Ensure that the target dependencies are built before any source file in // the target, using order-only dependencies. cmNinjaDeps orderOnlyDeps; this->GetLocalGenerator()->AppendTargetDepends(this->Target, orderOnlyDeps); if(const char* objectDeps = source->GetProperty("OBJECT_DEPENDS")) { std::vector<std::string> depList; cmSystemTools::ExpandListArgument(objectDeps, depList); std::transform(depList.begin(), depList.end(), std::back_inserter(orderOnlyDeps), MapToNinjaPath()); } // Add order-only dependencies on custom command outputs. for(std::vector<cmSourceFile*>::const_iterator si = this->GeneratorTarget->CustomCommands.begin(); si != this->GeneratorTarget->CustomCommands.end(); ++si) { cmCustomCommand const* cc = (*si)->GetCustomCommand(); const std::vector<std::string>& ccoutputs = cc->GetOutputs(); std::transform(ccoutputs.begin(), ccoutputs.end(), std::back_inserter(orderOnlyDeps), MapToNinjaPath()); } // If the source file is GENERATED and does not have a custom command // (either attached to this source file or another one), assume that one of // the target dependencies, OBJECT_DEPENDS or header file custom commands // will rebuild the file. if (source->GetPropertyAsBool("GENERATED") && !source->GetCustomCommand() && !this->GetGlobalGenerator()->HasCustomCommandOutput(sourceFileName)) { this->GetGlobalGenerator()->AddAssumedSourceDependencies(sourceFileName, orderOnlyDeps); -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
