Re: [CMake] Fortran project compiling with -isystem causing error

2015-03-26 Thread Hugh Sorby

Thanks Brad,

I looked at the documentation for gfortran and it says (before asking 
about my problem, I also read the CMake documentation but failed to 
comprehend it properly)


|-isystem|dir
   Searchdirfor header files, after all directories specified by-Ibut
   before the standard system directories. Mark it as a system
   directory, so that it gets the same special treatment as is applied
   to the standard system directories. Ifdirbegins with|=|, then
   the|=|will be replaced by the sysroot prefix; see--sysrootand-isysroot.

and

|-I|dir
   These affect interpretation of the|INCLUDE|directive (as well as of
   the|#include|directive of thecpppreprocessor).

   Also note that the general behavior of-Iand|INCLUDE|is pretty much
   the same as of-Iwith|#include|in thecpppreprocessor, with regard to
   looking forheader.gccfiles and other such things.

   This path is also used to search for.modfiles when previously
   compiled modules are required by a|USE|statement.

   SeeOptions for Directory Search
   
,
   for information on the-Ioption.

I guess their documentation should be more explicit and say that 
-isystem dirs are not searched for .mod files.  The documentation as it 
stands implies to me that -isystem is the same as -I but for ordering.


Again thanks,
Hugh.

On 03/27/15 02:35, Brad King wrote:

On 03/25/2015 08:26 PM, Hugh Sorby wrote:

|-- ex
|   |-- CMakeLists.txt
|   `-- use_mod.f90
|-- ex-build
|-- install
|-- modsrc
|   |-- CMakeLists.txt
|   `-- a.f90
`-- modsrc-build

Thanks for the detailed example.  It was trivial to reproduce the
issue with that!

Since this commit:

  Always consider includes from IMPORTED targets to be SYSTEM.
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a63fcbcb

which was first included in CMake 3.0, include directories taken
from imported targets are treated as SYSTEM automatically.  You
can avoid it with a target property on the imported target:

  http://www.cmake.org/cmake/help/v3.2/prop_tgt/NO_SYSTEM_FROM_IMPORTED.html

Doing that will workaround the problem.  I think the real issue
is that we cannot reliably use -isystem with gfortran at all
because it won't look in such paths for module files.  I've
fixed that here:

  GNU: Do not use -isystem with gfortran
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8e7a104

Thanks,
-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://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Fortran project compiling with -isystem causing error

2015-03-26 Thread Brad King
On 03/25/2015 08:26 PM, Hugh Sorby wrote:
> |-- ex
> |   |-- CMakeLists.txt
> |   `-- use_mod.f90
> |-- ex-build
> |-- install
> |-- modsrc
> |   |-- CMakeLists.txt
> |   `-- a.f90
> `-- modsrc-build

Thanks for the detailed example.  It was trivial to reproduce the
issue with that!

Since this commit:

 Always consider includes from IMPORTED targets to be SYSTEM.
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a63fcbcb

which was first included in CMake 3.0, include directories taken
from imported targets are treated as SYSTEM automatically.  You
can avoid it with a target property on the imported target:

 http://www.cmake.org/cmake/help/v3.2/prop_tgt/NO_SYSTEM_FROM_IMPORTED.html

Doing that will workaround the problem.  I think the real issue
is that we cannot reliably use -isystem with gfortran at all
because it won't look in such paths for module files.  I've
fixed that here:

 GNU: Do not use -isystem with gfortran
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8e7a104

Thanks,
-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://public.kitware.com/mailman/listinfo/cmake


[CMake] CMake Course April 22, 2015

2015-03-26 Thread Bill Hoffman
Kitware is hosting a CMake training course, titled “Project Lifecycle 
Management with the CMake Family of Tools,” in Clifton Park, NY. The 
course will be held on April 22, 2015. Through the course, you will 
learn how to create a build system for your C/C++/Fortran project using 
CMake, CPack, CTest, and CDash.


This course covers in-depth how CMake works and how you can efficiently 
write CMake scripts for small to large projects. The course also covers 
unit testing with CTest, packaging with CPack and continuous integration 
with CDash. Additional details and registration information are 
available on the Kitware website.


-Bill
--

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

Re: [CMake] CMP0054 and CMake Modules

2015-03-26 Thread Domen Vrankar
> do i make something wrong or is this an Error in FindMFC which i have to 
> report?

ATM each CMake provided module has to set its own policies otherwise
policies from CMakeLists.txt minimum required version setting are
used.
Please file a bug report.

Thanks,
Domen
-- 

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


[CMake] CMP0054 and CMake Modules

2015-03-26 Thread Jörg Kreuzberger
Updated to cmake 3.2.1 from 3.0.0 and got several hints due to POLICY CMP0054 
(handling of quoted variables)

i set the policy to new and changed my local cmake files.

But i also got a warning from CMake Modules like FindMFC.cmake (Line 39).

do i make something wrong or is this an Error in FindMFC which i have to report?

Can i assume that ALL Modules provided with normal cmake install support this 
policy with NEW?
Currently i get no warning from other modules if policy is unset.
i also assume i can change the policy during cmake processing?

(e.g. set the behaviour to old, include FindMFC.cmake, set the behaviour to new 
and do the rest of my CMakeLists.txt)

Thanks for any support,
Joerg

-- 

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