Problem 1200 - Geant4 is not usable from the build tree
Summary: Geant4 is not usable from the build tree
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: cmake (show other problems)
Version: 9.4
Hardware: All All
: P3 enhancement
Assignee: Ben Morgan
URL:
Depends on:
Blocks:
 
Reported: 2011-04-21 16:21 CEST by Ben Morgan
Modified: 2011-06-23 04:25 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Ben Morgan 2011-04-21 16:21:14 CEST
The CMake build of Geant4 requires installation before it can be used - in the sense of building an application that links to the built libraries that exist in the build tree. This functionality would be useful for developers who need to build testing applications.
Comment 1 Ben Morgan 2011-04-21 16:27:27 CEST
In the short term we'll adapt the current 'geant4.sh' shell script and GNU make system so that these are generated in the build tree. Sourcing the script will point the needed variables to the build (and where needed, source) tree so that application builds can use these transparently.

Longer term, we'll add full CMake config scripts to make this even easier:

http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file
Comment 2 Ben Morgan 2011-06-20 05:00:38 CEST
Partially fixed in cmake-V09-04-05 which will generate environment setup scripts to configure the build tree of Geant4 for use by the old GNU Make toolchain.

Work on the CMake Geant4Config solution is not feature complete yet, so won't mark as RESOLVED FIXED until then.
Comment 3 Ben Morgan 2011-06-23 04:24:50 CEST
Fully fixed in tag cmake-V09-04-08

Geant4Config.cmake allows use from build or install tree.
geant4-environment-config.(c)sh allows use of old GNU make toolchain from build and install tree
geant4-config provides correct information on either build or install tree

Documented in cmake/INSTALL.g4cmake