[CMake] Fortran dependency scanning

Tim Gallagher tim.gallagher at gatech.edu
Tue Mar 29 18:05:45 EDT 2011


They are listed as dependencies for the target, ie:

add_executable(myexe Module1.F90) 

or

add_executable(myexe Module2.F90) 

depending on whether OPTION1 is defined or not (really, there's an option(USE_OPTION1) etc). 

The actual project is way more complicated than this -- we store the files to be processed in variables so it really looks like 

add_executable(myexe ${MY_SRC_FILES})

and I checked the variable and the correct module file is there but it's not being built in the correct order.

Tim

----- Original Message -----
From: "Brad King" <brad.king at kitware.com>
To: gtg085x at mail.gatech.edu
Cc: "Tim Gallagher" <tim.gallagher at gatech.edu>, cmake at cmake.org
Sent: Tuesday, March 29, 2011 5:13:56 PM
Subject: Re: [CMake] Fortran dependency scanning

On 03/29/2011 11:53 AM, Tim Gallagher wrote:
> Hi,
> 
> We ran into an issue using CMake with our fortran project. We have constructions such as:
> 
> ...
> #ifdef OPTION1
>   USE Module1
> #else
>   USE Module2
> #endif
> ...
> 
> It's not actually finding modules as dependencies. Any thoughts?

Are those modules provided by other sources in the same target or
other targets to which this target links?

-Brad


More information about the CMake mailing list