... | ... | @@ -89,8 +89,35 @@ fi |
|
|
You can source this script before starting to work with your Geant4 project or
|
|
|
add these lines in your .bash_profile to get the environment set automatically when you log in.
|
|
|
|
|
|
## Comiling Geant4 10.6.3
|
|
|
|
|
|
Make sure you not have previous geant4 definition in environment variables and path. qt tools mast be in you path and you need define **PKG_CONFIG_PATH**
|
|
|
variable to allow cmake find qt correctly.
|
|
|
```
|
|
|
export PKG_CONFIG_PATH=/usr/local/opt/qt/lib/pkgconfig
|
|
|
export PATH="/usr/local/opt/qt/bin:$PATH
|
|
|
```
|
|
|
Now you dir download geant4 via git or tarball and follow standard
|
|
|
cmake installation procedure. In this repository you can found script
|
|
|
`build-geant4-1063-macos.sh`
|
|
|
with i use for installation. Tested on MacOS (10.15.7) Catalina with Xcode and Command Line Tools for Xcode 12.2 installed.
|
|
|
*Note. The default TLS model in Geant4 set to __initial-exec__ make provide some instability and slow-less of QtGui, i has better results with -DGEANT4_BUILD_TLS_MODEL=auto.*
|
|
|
|
|
|
See e.g. https://chao-tic.github.io/blog/2018/12/25/tls for information about TLS modelles in C++
|
|
|
|
|
|
Before compiling the examples you need setup the environment for geant4.
|
|
|
```
|
|
|
if [ -x /usr/local/geant4/10.6.3/bin/geant4.sh ]; then
|
|
|
. /usr/local/geant4/10.6.3/bin/geant4.sh
|
|
|
# Need this if other Geant4 installed in /usr/local
|
|
|
export CMAKE_PREFIX_PATH=/usr/local/bin/geant/10.6.3/lib/Geant4-10.6.3
|
|
|
fi
|
|
|
'''
|
|
|
|
|
|
## Testing of installation
|
|
|
|
|
|
**N.B.** use `setup_env_10_6_3.sh` if you compile geant4 locally.
|
|
|
|
|
|
### 1. Open new Terminal window
|
|
|
|
|
|
### 2. Source `setup_env.sh` if not done with `.bash_profile`
|
... | ... | |