Switching to CMake?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Switching to CMake?

Kip Streithorst
Administrator
All,

I am strongly considering moving the Opticks build system and all
extensions over to CMake instead of our current system of using Visual
Studio on Windows and SCons on Solaris/Linux.

For those of you unfamiliar with CMake, here are the basics:
 1) Run cmake or cmake-gui for the configuration step
 2) At the start of the configuration step, you choose the native
    build system (e.g. generator) you will be using:
       Makefiles
       Visual Studio project files
       Qt Creator project files
       Eclipse CDT project files
       ... many oters
 2) During the configure step, cmake looks for compilers, IDE, third
party libraries that your project uses.
 3) After configuration, you can then generate the files required for
your native build system (e.g. Makefiles, Visual Studio sln and projs,
etc.)
 4) At this point you use the native build system to actually perform
the compile and link.

Why switch to Cmake?
  - A single build system (instead of the two we currently have)
  - Support for more build systems
      - One can use Makefiles on Windows and not use the Visual Studio
IDE
      - One can Qt Creator IDE or Eclipse CDT IDE on
Windows/Linux/Solaris
  - The addition of a configure step
      - Having an explicit configuration step (equivalent to
./configure) on all platforms makes it much easier for developers to
locate and work with 3rd party dependencies

CMake compared to Visual Studio:
 - CMake generates C++ visual studio projects, so intellisense and all
of the other nice features of the IDE continue to work.
 - CMake makes it much easier to work with moc, ui and qrc files.
 - CMake does treat 32-bit and 64-bit as distinct, so you are required
to create a 32-bit solution file and then a separate 64-bit solution
file.

CMake compared to Scons:
  - When using the Makefile generator, CMake will result in faster
compilation times and faster incremental compilation times than Scons.

What other tools did I consider?
  - Waf
  - Autoconf
  - QMake
  - premake

For more details on CMake, see http://www.cmake.org/ and
http://en.wikipedia.org/wiki/CMake
I have been working on a conversion (it is in the early stages):
https://opticks.svn.sourceforge.net/svnroot/opticks/branches/4.7.X/OPTIC
KS-1177/trunk

Looking for feedback,
Kip



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Opticks-devs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opticks-devs
Reply | Threaded
Open this post in threaded view
|

Re: Switching to CMake?

tclarke
Administrator
I think this is worth pursuing. A number of projects have switched to
cmake over the last couple of years with great success. Developers are
often familiar with cmake usage. We may want to think about the
downsides to this as well (you allude to a couple). I suggest you add
this discussion to the agenda for Monday's meeting, perhaps with an
additional read ahead email.

-----Original Message-----
From: Streithorst, Kip [mailto:[hidden email]]
Sent: Wednesday, May 11, 2011 12:13 PM
To: [hidden email]
Subject: [Opticks-devs] Switching to CMake?

All,

I am strongly considering moving the Opticks build system and all
extensions over to CMake instead of our current system of using Visual
Studio on Windows and SCons on Solaris/Linux.

For those of you unfamiliar with CMake, here are the basics:
 1) Run cmake or cmake-gui for the configuration step
 2) At the start of the configuration step, you choose the native
    build system (e.g. generator) you will be using:
       Makefiles
       Visual Studio project files
       Qt Creator project files
       Eclipse CDT project files
       ... many oters
 2) During the configure step, cmake looks for compilers, IDE, third
party libraries that your project uses.
 3) After configuration, you can then generate the files required for
your native build system (e.g. Makefiles, Visual Studio sln and projs,
etc.)
 4) At this point you use the native build system to actually perform
the compile and link.

Why switch to Cmake?
  - A single build system (instead of the two we currently have)
  - Support for more build systems
      - One can use Makefiles on Windows and not use the Visual Studio
IDE
      - One can Qt Creator IDE or Eclipse CDT IDE on
Windows/Linux/Solaris
  - The addition of a configure step
      - Having an explicit configuration step (equivalent to
./configure) on all platforms makes it much easier for developers to
locate and work with 3rd party dependencies

CMake compared to Visual Studio:
 - CMake generates C++ visual studio projects, so intellisense and all
of the other nice features of the IDE continue to work.
 - CMake makes it much easier to work with moc, ui and qrc files.
 - CMake does treat 32-bit and 64-bit as distinct, so you are required
to create a 32-bit solution file and then a separate 64-bit solution
file.

CMake compared to Scons:
  - When using the Makefile generator, CMake will result in faster
compilation times and faster incremental compilation times than Scons.

What other tools did I consider?
  - Waf
  - Autoconf
  - QMake
  - premake

For more details on CMake, see http://www.cmake.org/ and
http://en.wikipedia.org/wiki/CMake
I have been working on a conversion (it is in the early stages):
https://opticks.svn.sourceforge.net/svnroot/opticks/branches/4.7.X/OPTIC
KS-1177/trunk

Looking for feedback,
Kip



This message and any enclosures are intended only for the addressee.
Please  
notify the sender by email if you are not the intended recipient.  If
you are  
not the intended recipient, you may not use, copy, disclose, or
distribute this  
message or its contents or enclosures to any other person and any such
actions  
may be unlawful.  Ball reserves the right to monitor and review all
messages  
and enclosures sent to or from this email address.

------------------------------------------------------------------------
------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Opticks-devs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opticks-devs



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Opticks-devs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opticks-devs