Brad, Thanks for the reply. After hunting around some more, I discovered the source file properties OBJECT_DEPENDS and OBJECT_OUTPUTS. I have yet to experiment with these, but I am wondering if CMake's automatic dependency resolution will populate these properties. If so I could get dependency information from there.
(I am trying to setup flymake targets for emacs which don't (re)compile anything, but rather run the compilers with the compile time warning flags and -syntax-only flags. Modules and dependency resolution in Fortran is the main impediment here and if I can come up with a sane solution I may implement it as a CMake module and share it with others.) -Zaak Izaak Beekman =================================== (301)244-9367 Princeton University Doctoral Candidate Mechanical and Aerospace Engineering [email protected] UMD-CP Visiting Graduate Student Aerospace Engineering [email protected] [email protected] On Mon, Feb 3, 2014 at 11:46 AM, Brad King <[email protected]> wrote: > On 01/30/2014 05:43 PM, Zaak Beekman wrote: > > I noticed that output_required_files is deprecated. > > Yes, it has been marked as such since CMake 2.8.5: > > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5cf4ff6e > http://www.cmake.org/Bug/view.php?id=12214 > > but was out of favor long before that. It was a rudimentary > scanner and did not support Fortran the way CMake's scanner > used by Makefile generator does. > > The modern dependency scanner is an internal implementation > detail and is not exposed through a public interface. We do > not want to expose it publicly because that would limit future > refactoring. > > > Is there a way to determine the dependencies of a Fortran source > > file that I can then manipulate in a CMakeLists.txt file? Fortran > > dependency resolution is a pain, and I need to determine > > dependencies for a custom target. > > While the scanner output is not directly accessible you can tell > CMake to treat dependencies for a custom command as it would > a particular language source compilation. The IMPLICIT_DEPENDS > option to add_custom_command may work: > > add_custom_command(... > COMMAND ...command that runs compiler... > IMPLICIT_DEPENDS Fortran > ) > > but only with Makefile generators. > > -Brad > >
-- 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://www.cmake.org/mailman/listinfo/cmake
