Message: Re: Error with GNUMakefile Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Note Re: Error with GNUMakefile 

Forum: Installation and Configuration
Re: None Error with GNUMakefile (Ish Mukul)
Re: None Re: Error with GNUMakefile (John Allison)
Re: Question Re: Error with GNUMakefile (Neil Fazel)
Date: 12 Mar, 2014
From: Ben Morgan <Ben Morgan>

Hi Neil

On Wed, 12 Mar 2014 00:46:16 GMT, Neil Fazel wrote:
> Hi John,
> 
>     When you say "old" way, are there any advantages to switching to cmake? 
> I'm asking because with gmake, everything is in a single directory. With cmake, 
> there is one directory where the source is, another where the build takes place. 
> Not sure what I'm gaining in return.

The separation of source and build into separate directories is a standard practice, and in fact the Geant4 GNUmake system also does this via the G4WORKDIR directory. This technique is helpful as the isolation of the build specific files prevents them from being committed to any version control system by accident. In addition, this isolation allows you to delete the build directory without a risk of deleting source files.

You can also have several builds against the same source tree, without having to reconfigure and rebuild everything each time you change an option. For example, you could have one build directory that is configured to use Geant4 9.6, one using 10.0, and one using 10.0 with multithreading. With Geant4's GNUmake system, you'd need to continually delete, reconfigure the environment and rebuild for every version/config change. With CMake, you configure and build once for each variation, further builds being incremental.

CMake was also selected because of its cross-platform support, easy use and ease of integration of other libraries/applications (e.g. Qt, Boost). This is also why we recommend it for building user applications, but of course your use case(s) may be different. Whilst we do still provide the Geant4 GNUmake system, the intent is to phase this out in favour of just CMake and the geant4-config program (the latter for use in non-CMake systems).

Cheers,

Ben.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Question: Re: Error with GNUMakefile   (Neil Fazel - 12 Mar, 2014)
(_ Note: Re: Error with GNUMakefile   (Ben Morgan - 14 Mar, 2014)
(_ None: Re: Error with GNUMakefile   (Neil Fazel - 14 Mar, 2014)
 Add Message Add Message
to: "Re: Error with GNUMakefile"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]