[Cmake] Re: 5 questions

Bill Hoffman bill.hoffman at kitware.com
Mon Mar 31 17:00:49 EST 2003


At 04:13 PM 3/31/2003, Francis Larrivée wrote:
>1) Here are the C++ compilers I need to work with:
>
>        Cygwin  g++
>        Linux   g++
>        Win32           Watcom C/C++
>                        Borland C/C++
>                        Intel  C/C++
>                        Microsoft Visual C++ 7.0
>
>Could you please let me know how to setup Cmake to support these compilers
>in command line mode?
You can specifiy the generator on the command line with a -G"...".
I belive we have done all of the above, except for Watcom.


>2) Is it possible to support Fortran compilers in Cmake? I need to support
>the following Fortran compilers :
>
>        CygWin  G77
>        Watcom  Fortran
>        Intel   Fortran

Right now, cmake does not support fortran directly.   You would
have to use a custom command to do this.   See the FAQ entry
about building LaTex.   Fortran would have to be done in a similar way.
For real fotran support, the depend generator and the makefile generators
would have to be changed.

>3) Is it easy to add new Cmake target. For example, I would like to use
>Cmake with a document generator like “Doxygen”. How should I proceed?
>

The ADD_CUSTOM_COMMAND would be the way.


>4) Is there a way to specify build in debug mode or in release mode?

With visual studio 6 and 7, you can do it from the IDE.
With the make based makefiles, you specify debug or release
with cmake.  See the CMAKE_BUILD_TYPE cache entry.


>5) Do you know how I could setup Cmake in order to use one single “make” to
>perform make operations.
>
>        I don’t want to use a “make” for Borland, a different for watcom, a
>different for g++, etc. I would like to use only the “make” from GNU for all
>my compilers.

Right now that is not possible.    There are some issues having to do with paths.
The compilers require and support different path types.   g++/gmake with cygwin
supports/expects cygwin paths.   cl will not support cygwin paths.   


>And I would be glad to contribute this work to cmake.

Sounds great, we would be happy to incorporate your additions once they are tested.
For 5, you will want to start in Source/cmake.cxx and add the UnixMakefileGenerator
as an option for all the builds, and see how far you get.


-Bill


>Thanks
>--------------------------------------------
>Francis Larrivée, Technicien en informatique
>INRS-ETE
>2800 rue Einstein, suite 020
>Case Postale 7500
>Québec, Québec
>G1V 4C7 CANADA
>
>tel: (418) 654-3762     fax: (418) 654-2600
>e-mail: Francis_Larrivee at inrs-ete.uquebec.ca
>--------------------------------------------






More information about the CMake mailing list