[CMake] MinGW platform modules for C/CXX and Fortran

2010-02-18 Thread Gerald Hofmann
Hi *

I'm trying to fix some apparently incomplete modules for mingw cross 
compilation on a Linux/Mac host. Im using a gcc/gfortran cross compiler 
toolchain to build for win32 and win64 from a complex C/Fortran mixed language 
project.

As far as I found out, for the C/CXX sources, cmake uses 
Platform/Windows-gcc.cmake for basic settings. For Fortran sources I found some 
include rules in CMakeFortranInformation.cmake, but as far as I can see there 
is no matching Windows-GNU-Fortran module yet. If no Fortran settings are 
defined, cmake uses C flags for Fortran as well. But something seems to be 
incomplete here.

For the Fortran part I created the missing Windows-GNU-Fortran.cmake myself. 
The file is correctly included by CMakeFortranInformation.cmake (by setting up 
the file name using platform and compiler ID). With my settings I am able to 
build Windows targets with Win-style suffix (dll, lib). I will post the module 
for a review as soon as it is finally tested.

Please give me some pointers to help me fixing the MinGW modules:

- Do I understand the basics for the compiler/platform module naming and 
including right? Would it be an option to provide Windows-GNU-C, 
Windows-GNU-CXX and Windows-GNU-Fortran modules instead of Windows-gcc 
(apparently not matching the general naming scheme)?

- Is there a good reason why platform-specific prefix/postfix settings are 
provided by a compiler-specific module? Is there a better place for 
platform-specific settings applicable to all compilers?

- Should the mingw target not better prefer Windows library prefix/postfix 
settings over Unix style lib prefix and .a suffix?

Thank you in advance!

Gerry

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] MinGW platform modules for C/CXX and Fortran

2010-02-18 Thread Alexander Neundorf
On Thursday 18 February 2010, Gerald Hofmann wrote:
 Hi *
...
 Please give me some pointers to help me fixing the MinGW modules:

 - Do I understand the basics for the compiler/platform module naming and
 including right? Would it be an option to provide Windows-GNU-C,
 Windows-GNU-CXX and Windows-GNU-Fortran modules instead of Windows-gcc
 (apparently not matching the general naming scheme)?

I think so. Windows-gcc is the old style, OS-compiler_ID-language is 
supported since CMake 2.6.0 I think.

Alex
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake