Message: using build vs install dir Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question using build vs install dir 

Forum: Installation and Configuration
Date: 05 Oct, 2016
From: Jeremy McCormick <Jeremy McCormick>


I noticed when building a user app that depends on Geant4 that I need to point it to my "build" rather than "install" directory for it to work correctly, at least by default.


cmake -DGeant4_DIR=/path/to/geant4.10.02.p02/build ..

I believe this is because it can find Geant4Config.cmake there in order to get the correct environment into CMake for the package.

I noticed in the Geant4 installation dir that these files are present but not in a location that CMake would find by default:


Because it is only going to look for them in the root directory specified with the Geant4_DIR CMake variable.

Is there some easy way in my application's CMake options or in its CMakeLists.txt that I can tell it to use only the install dir and have it find these config files automatically?

I would prefer not to have to use both the build and install directories as it seems confusing and I might want to clobber the build directory after I'm done with it.

As far as I'm aware, my CMakeLists.txt is following the standard template given in the Geant4 docs.



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

1 Ok: Re: using build vs install dir   (Jeremy McCormick - 05 Oct, 2016)
2 Feedback: Re: using build vs install dir   (Ben Morgan - 06 Oct, 2016)
 Add Message Add Message
to: "using build vs install dir"

 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 ]