[CMake] Testing with multiple Fortran compilers

2018-04-12 Thread William Clodius
I have been using CMake with gfortran for a number of years, and now want test my code with ifort. I want to switch easily switch between compilers. My CMakeLists.txt file is based on the fortran example from make.org an appears to have most of the infrastructure needed, but I don’t understand h

[CMake] find_package and get_target_property

2018-04-12 Thread Saad Khattak
Hi, I am successfully able to find a package using find_package(LibA) but I cannot do a get_target_property on the package as I get the error: get_target_property() called with non-existent target "LibA" How do I go about the target properties for a package? - Saad -- Powered by www.kitware.c

[CMake] FetchContent and multiple CMake projects

2018-04-12 Thread Saad Khattak
Hi, I have many independent CMake projects and most projects have external dependencies. Most of the projects have the same dependency e.g. Catch testing library. Each library uses FetchContent so that it can be built independently by simply cloning its github repository, configuring and generati

Re: [CMake] Ninja Fortran on XL

2018-04-12 Thread Ephi Sinowitz (BLOOMBERG/ 919 3RD A)
Unfortunately there is no way I can see to control the output directory. It is always the current working directory. From: brad.k...@kitware.com At: 04/12/18 09:42:58To: Ephi Sinowitz (BLOOMBERG/ 919 3RD A ) , cmake@cmake.org Subject: Re: [CMake] Ninja Fortran on XL On 04/12/2018 08:22 AM, Ep

Re: [CMake] Order of IMPORTED target include directories

2018-04-12 Thread Brad King
On 04/10/2018 01:50 PM, Ephi Sinowitz (BLOOMBERG/ 919 3RD A) wrote: > I would like to ensure that all include directories propagated from > IMPORTED targets come after the include directories propagated from > non-imported targets. On gcc the includes from IMPORTED targets are > marked with -isyste

Re: [CMake] .d dependency files for ninja

2018-04-12 Thread Brad King
On 02/08/2017 04:05 PM, Ephi Sinowitz (BLOOMBERG/ 731 LEX) wrote: > cmake creates these files for gcc compiler using the -MMD -MMF > compiler flags but does not do so for AIX xlc and Sun CC > Is this a known issue? Is there a workaround? This simply means no one has added support for these compile

Re: [CMake] Ninja Fortran on XL

2018-04-12 Thread Brad King
On 04/12/2018 08:22 AM, Ephi Sinowitz (BLOOMBERG/ 919 3RD A) wrote: > CMake expects the PREPROCESSED_SOURCE output to be in the form > -pp.f and XL does not allow you to control that. The output> is > always of the form F.f > > Is there anything I can do here like putting redirection or two > com

Re: [CMake] CMake 3.11 Fortran submodule parallel compilation fails for a single target

2018-04-12 Thread Zaak Beekman
Just FYI. I found an OK work around in that issue. On Thu, Apr 12, 2018 at 9:22 AM Brad King wrote: > On 04/11/2018 01:44 PM, Zaak Beekman wrote: > > I thought that CMake had Fortran submodule support as of 3.8 or 3.10. > > CMake 3.7 added support to the Fortran dependency scanner to tolerate >

Re: [CMake] CMake 3.11 Fortran submodule parallel compilation fails for a single target

2018-04-12 Thread Brad King
On 04/11/2018 01:44 PM, Zaak Beekman wrote: > I thought that CMake had Fortran submodule support as of 3.8 or 3.10. CMake 3.7 added support to the Fortran dependency scanner to tolerate the *syntax* of submodules. Only the main modules are handled for dependencies though. Unfortunately we still

[CMake] Ninja Fortran on XL

2018-04-12 Thread Ephi Sinowitz (BLOOMBERG/ 919 3RD A)
Trying to get this to work by setting a proper CMAKE_Fortran_PREPROCESS_SOURCE variable. Here is GNU_Fortran for reference. set(CMAKE_Fortran_PREPROCESS_SOURCE " -cpp-E -o ") The analogous switch for -E in XL is -d -qnoobject. However, CMake expects the PREPROCESSED_SOURCE output to b