Hi everybody, what use is the "flags" out-parameter in cmLocalGenerator::GetTargetFlags? It is only ever set for targets of type EXECUTABLE and is filled based on the *linker language* of the target.
I really do not see any use for this information, and indeed the flag seems unused in the cmake code base, except for the Ninja generator, where that may or may not make sense (probably not). Can the flag get removed altogether and the method get renamed to GetTargetLinkerFlags? Maybe it could return the linker language instead, that is a piece of data that is more important in its context IMHO. While discussing this method: How about moving the method to cmTargetGenerator? That would get rid of the target parameter. That is where I would actually look for information on targets. Which brings me back to my original question: How can I find the compiler flags in use for a cmSourceFile/cmGeneratorTarget? The only place that I found that seems to do what I want is cmCommonTargetGenerator::GetFlags. Or is that concerned about cmake internal flags that need to get mapped to compiler flags later? Is there another copy of that code in a place more convenient to use or do I need to create that? cmCommonTargetGenerator does caching of results. Should this be also done for cmLocalGenerator::GetTargetFlags, etc? Best Regards, Tobias -- Tobias Hunger, Senior Software Engineer | The Qt Company The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho. Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers