[CMake] Adding module CheckFortranCompilerFlag.cmake (Nicolas Bock)

Zaak Beekman zbeekman at gmail.com
Fri Jan 30 09:59:38 EST 2015


Great! I would certainly like this functionality to be officially added to
CMake and in the mean time will use your module... speaking of which, it
seems that it was scrubbed from the digest email, or not originally
attached. Can you please send it to me?
On Thu, Jan 29, 2015 at 8:42 PM <cmake-request at cmake.org> wrote:

> Send CMake mailing list submissions to
>         cmake at cmake.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://public.kitware.com/mailman/listinfo/cmake
> or, via email, send a message with subject or body 'help' to
>         cmake-request at cmake.org
>
> You can reach the person managing the list at
>         cmake-owner at cmake.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of CMake digest..."
>
>
> Today's Topics:
>
>    1. Re: Generated files? (Chris Johnson)
>    2. Adding module CheckFortranCompilerFlag.cmake (Nicolas Bock)
>    3. Re: automoc autorcc (Norbert Pfeiler)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 29 Jan 2015 14:36:05 -0600
> From: Chris Johnson <cxjohnson at gmail.com>
> Cc: "cmake at cmake.org" <cmake at cmake.org>
> Subject: Re: [CMake] Generated files?
> Message-ID:
>         <CAKZJW488C7Ug6kGzYg3eNRM=xNqK94W3b9PGVzJtRm5i2STa2w at mail.gm
> ail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Thanks; I appreciate the suggestions.
>
> One thing that jumped out is the thought that foreach() is executed at
> "configuration" time, not "run" time.  To me, that was counter-intuitive,
> but makes more sense once more thoroughly considered.
>
> But I have to admit, I've never seen anything in the documentation which
> lists all of the commands which execute at configuration time, and which
> are executed at run time.  Is there such documentation?  A link to it would
> be great.
>
> On Thu, Jan 29, 2015 at 9:51 AM, Thompson, KT <kgt at lanl.gov> wrote:
>
> >  Hi Chris,
> >
> >
> >
> > Why not use a foreach loop? Something like this?
> >
> >
> >
> > add_executable(myprog myprog.cpp)
> >
> > set( files file001 fiile002 ?)
> >
> > foreach( file in files)
> >
> >     add_custom_command(OUTPUT ${file}.out
> >
> >         COMMAND /bin/cp ${CMAKE_CURRENT_SOURCE_DIR}/${file}.in .
> >
> >         COMMAND myprog ${file}.in ${file}.out
> >
> >         DEPENDS ${file}.in myprog.cpp
> >
> >     )
> >
> > endforeach()
> >
> >
> >
> > For portability, you might want to use ?${CMAKE_COMMAND} ?E
> > copy_if_different? in place of ?/bin/cp? and CMAKE_CURRENT_BINARY_DIR in
> > place of ?.?
> >
> >
> >
> > -kt
> >
> >
> >
> > *From:* CMake [mailto:cmake-bounces at cmake.org] *On Behalf Of *Chris
> > Johnson
> > *Sent:* Thursday, January 29, 2015 8:09 AM
> > *To:* cmake at cmake.org
> > *Subject:* [CMake] Generated files?
> >
> >
> >
> > ?I am looking for suggestions on how to solve the following problem.  I
> > need a solution which is easy to understand and safe from future
> > maintenance errors.
> >
> >
> >
> > There is a project directory with one C++ program and a large number of
> > "input" data files.
> >
> >
> >
> > The C++ program needs to be compiled, and then run against each of the
> > input files to generate an output file of the same base name but with a
> > different output suffix.  E.g. from the command line it might be:
> >
> >
> >
> >     % myprog  file001.in  file001.out
> >
> >
> >
> > Finally, the output files need to be installed in the proper location.
> >
> >
> >
> > For one input file, it might look like this:
> >
> >
> >
> >     add_executable(myprog myprog.cpp)
> >
> >     add_custom_command(OUTPUT file001.out
> >
> >         COMMAND /bin/cp ${CMAKE_CURRENT_SOURCE_DIR}/file001.in .
> >
> >         COMMAND myprog file001.in file001.out
> >
> >         DEPENDS files001.in myprog.cpp
> >
> >     )
> >
> >     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/file001.out DESTINATION
> > share/docs)
> >
> >
> >
> >
> >
> > Listing all of the input files in my CMakeLists.txt file is not a
> problem,
> > but it would be nice to avoid having to list the corresponding output
> files.
> >
> >
> >
> > How can I build a CMakeLists.txt file which will succinctly handle this
> > situation?
> >
> >
> >
> > --
> >
> > Thanks,
> >
> > ..chris?
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://public.kitware.com/pipermail/cmake/attachments/20150
> 129/e171c6df/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 29 Jan 2015 16:15:47 -0700
> From: Nicolas Bock <nicolasbock at gmail.com>
> To: "cmake at cmake.org" <cmake at cmake.org>
> Subject: [CMake] Adding module CheckFortranCompilerFlag.cmake
> Message-ID:
>         <CAPMKG4AfM9+qwaF_2eOhfvJ23tHUeDuEZ552+w26F-HH+xvJ9w at mail.
> gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
> please find attached for potential inclusion into CMake a new Module
> that tests Fortran compiler flags. It is a modified copy of the
> existing CheckCCompilerFlag.cmake module.
>
> Thanks,
>
> nick
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: CheckFortranCompilerFlag.cmake
> Type: text/x-cmake
> Size: 3099 bytes
> Desc: not available
> URL: <http://public.kitware.com/pipermail/cmake/attachments/20150
> 129/2c91681a/attachment-0001.bin>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 30 Jan 2015 02:41:28 +0100
> From: Norbert Pfeiler <norbert.pfeiler+cmake at gmail.com>
> To: Stephen Kelly <steveire at gmail.com>
> Cc: cmake at cmake.org
> Subject: Re: [CMake] automoc autorcc
> Message-ID:
>         <CAJECh4+5s4V4PQa13iRFqVOSOh7ids0zPKZTrKdajrLEV1HJ2g at mail.
> gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> >
> > > When i use qt5_add_resources and some of my resources change they get
> > > recompiled during the next invocation of my build tool. Whereas when i
> > use
> > > cmakes autorcc this is not the case.
> > This was fixed in CMake 3.1.
>
>
> Well, I?m using CMake 3.1.1, so apparently it?s not.
>
> > Secondly, with qt5_wrap_cpp every file gets processed in parallel ? well,
> > > because they don?t depend on each other. In contrast, automoc mocs
> > > everything in sequence (for one target) which is a noticeable
> bottleneck
> > > on an 8 core machine.
> > This was part of the original design of the automoc feature. Maybe it
> could
> > be done better, but as far as I know, no one is working on it.
>
>
> Ok, sad to hear.
>
> Best, Norbert.
>
> 2015-01-29 21:26 GMT+01:00 Stephen Kelly <steveire at gmail.com>:
>
> > Norbert Pfeiler wrote:
> >
> > > Hello,
> > > i?m curious about 2 things and therefore wanted to ask:
> > >
> > > When i use qt5_add_resources and some of my resources change they get
> > > recompiled during the next invocation of my build tool. Whereas when i
> > use
> > > cmakes autorcc this is not the case.
> >
> > This was fixed in CMake 3.1.
> >
> > >
> > > Secondly, with qt5_wrap_cpp every file gets processed in parallel ?
> well,
> > > because they don?t depend on each other. In contrast, automoc mocs
> > > everything in sequence (for one target) which is a noticeable
> bottleneck
> > > on an 8 core machine.
> >
> > This was part of the original design of the automoc feature. Maybe it
> could
> > be done better, but as far as I know, no one is working on it.
> >
> > Thanks,
> >
> > Steve.
> >
> >
> > --
> >
> > 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
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://public.kitware.com/pipermail/cmake/attachments/20150
> 130/54f2085c/attachment.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> --
>
> 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/opensou
> rce/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
> ------------------------------
>
> End of CMake Digest, Vol 129, Issue 46
> **************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150130/dc40c9c4/attachment.html>


More information about the CMake mailing list