Problem Running Basic Example B1

All,

I just installed GEANT4 on my MacBook. The installation appeared to be successful. However, when I tried to run basic example B1 to test the installation, I got the following error:

Jamess-MacBook-Pro:B1-build jamesbowen$ cmake -DGeant4_DIR=/Users/jamesbowen/geant4-install/lib64/Geant4-G4VERSION /Users/jamesbowen/B1
– The C compiler identification is AppleClang 12.0.0.12000032
– The CXX compiler identification is AppleClang 12.0.0.12000032
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found EXPAT: /usr/local/opt/expat/lib/libexpat.dylib (found suitable version “2.2.10”, minimum required is “2.2.9”)
– Found XercesC: /usr/local/lib/libxerces-c.dylib (found suitable version “3.2.3”, minimum required is “3.2.3”)
– Found OpenGL: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework
– Configuring done
– Generating done
– Build files have been written to: /Users/jamesbowen/B1-build
Jamess-MacBook-Pro:B1-build jamesbowen$ make -j4
[ 12%] Building CXX object CMakeFiles/exampleB1.dir/exampleB1.cc.o
[ 25%] Building CXX object CMakeFiles/exampleB1.dir/src/ActionInitialization.cc.o
[ 37%] Building CXX object CMakeFiles/exampleB1.dir/src/DetectorConstruction.cc.o
[ 50%] Building CXX object CMakeFiles/exampleB1.dir/src/EventAction.cc.o
/Users/jamesbowen/B1/exampleB1.cc:33:10: fatal error: ‘G4RunManagerFactory.hh’
file not found
#include “G4RunManagerFactory.hh”
^~~~~~~~~~~~~~~~~~~~~~~~
[ 62%] Building CXX object CMakeFiles/exampleB1.dir/src/PrimaryGeneratorAction.cc.o
[ 75%] Building CXX object CMakeFiles/exampleB1.dir/src/RunAction.cc.o
1 error generated.
make[2]: *** [CMakeFiles/exampleB1.dir/exampleB1.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs…
make[1]: *** [CMakeFiles/exampleB1.dir/all] Error 2
make: *** [all] Error 2
Jamess-MacBook-Pro:B1-build jamesbowen$

I am apparently missing the file G4RunManagerFactory.hh in some library. What do I need to do to correct this?

Could you run make VERBOSE=1 and post the command line that’s being used for compiling exampleB1.cc please? The CMake step looks like it’s found Geant4 o.k., but there’s something weird going on with the include paths. Could you also confirm which version of Geant4 this is?

Thanks for your reply. I am running the latest version available, GEANT4 11.0, which was released last month. When I run “make VERBOSE=1”, this is what happens:

Jamess-MacBook-Pro:B1-build jamesbowen$ make VERBOSE=1
/usr/local/Cellar/cmake/3.22.1/bin/cmake -S/Users/jamesbowen/B1 -B/Users/jamesbowen/B1-build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.22.1/bin/cmake -E cmake_progress_start /Users/jamesbowen/B1-build/CMakeFiles /Users/jamesbowen/B1-build//CMakeFiles/progress.marks
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 all
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/exampleB1.dir/build.make CMakeFiles/exampleB1.dir/depend
cd /Users/jamesbowen/B1-build && /usr/local/Cellar/cmake/3.22.1/bin/cmake -E cmake_depends “Unix Makefiles” /Users/jamesbowen/B1 /Users/jamesbowen/B1 /Users/jamesbowen/B1-build /Users/jamesbowen/B1-build /Users/jamesbowen/B1-build/CMakeFiles/exampleB1.dir/DependInfo.cmake --color=
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/exampleB1.dir/build.make CMakeFiles/exampleB1.dir/build
[ 12%] Building CXX object CMakeFiles/exampleB1.dir/exampleB1.cc.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DG4INTY_USE_QT -DG4LIB_BUILD_DLL -DG4UI_USE_QT -DG4UI_USE_TCSH -DG4VIS_USE_OPENGL -DG4VIS_USE_OPENGLQT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -I/Users/jamesbowen/B1/include -isystem /usr/local/include/Geant4 -isystem /usr/local/opt/expat/include -iframework /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -iframework /usr/local/opt/qt/lib -isystem /usr/local/opt/qt/lib/QtGui.framework/Headers -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/OpenGL.framework/Headers -isystem /usr/local/opt/qt/lib/QtCore.framework/Headers -isystem /usr/local/opt/qt/./mkspecs/macx-clang -isystem /usr/local/opt/qt/lib/QtWidgets.framework/Headers -isystem /usr/local/opt/qt/lib/QtPrintSupport.framework/Headers -isystem /usr/local/opt/qt/lib/QtOpenGL.framework/Headers -isystem /usr/local/include -W -Wall -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wno-variadic-macros -Wshadow -pipe -Qunused-arguments -DGL_SILENCE_DEPRECATION -stdlib=libc++ -pthread -ftls-model=initial-exec -std=c++11 -DNDEBUG -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.15 -fPIC -std=gnu++11 -MD -MT CMakeFiles/exampleB1.dir/exampleB1.cc.o -MF CMakeFiles/exampleB1.dir/exampleB1.cc.o.d -o CMakeFiles/exampleB1.dir/exampleB1.cc.o -c /Users/jamesbowen/B1/exampleB1.cc
/Users/jamesbowen/B1/exampleB1.cc:33:10: fatal error: ‘G4RunManagerFactory.hh’
file not found
#include “G4RunManagerFactory.hh”
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/exampleB1.dir/exampleB1.cc.o] Error 1
make[1]: *** [CMakeFiles/exampleB1.dir/all] Error 2
make: *** [all] Error 2
Jamess-MacBook-Pro:B1-build jamesbowen$

Thanks for the info! The problem is below:

The CMake step has picked up a previous install of Geant4 in /usr/local (I’d guess from Homebrew). When you configured as previously:

does the directory /Users/jamesbowen/geant4-install/lib64/Geant4-G4VERSION really exist? Generally, macOS libraries won’t get installed in lib64 but lib, and G4VERSION should be the real version number.

I made some corrections so that it refers to the actual directory. The command I am giving is now “cmake -DGeant4_DIR=/Users/jamesbowen/geant4-v11.0.0-install/lib64/Geant4-geant4-v11.0.0 /Users/jamesbowen/B1” I also deleted and re-copied and re-made my B1 and B1-build sub-directories in my home directory.

However I am still getting the error. I also ran the command “make VERBOSE=1” afterword. All of this is pasted below.

Jamess-MacBook-Pro:~ jamesbowen$ cp -r /Users/jamesbowen/geant4-v11.0.9/examples/basic/B1 .
cp: /Users/jamesbowen/geant4-v11.0.9/examples/basic/B1: No such file or directory
Jamess-MacBook-Pro:~ jamesbowen$ cp -r /Users/jamesbowen/geant4-v11.0.0/examples/basic/B1 .
Jamess-MacBook-Pro:~ jamesbowen$ mkdir B1-build
Jamess-MacBook-Pro:~ jamesbowen$ cd B1-build/
Jamess-MacBook-Pro:B1-build jamesbowen$ cmake -DGeant4_DIR=/Users/jamesbowen/geant4-v11.0.0-install/lib64/Geant4-geant4-v11.0.0 /Users/jamesbowen/B1
– The C compiler identification is AppleClang 12.0.0.12000032
– The CXX compiler identification is AppleClang 12.0.0.12000032
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found EXPAT: /usr/local/opt/expat/lib/libexpat.dylib (found suitable version “2.2.10”, minimum required is “2.2.9”)
– Found XercesC: /usr/local/lib/libxerces-c.dylib (found suitable version “3.2.3”, minimum required is “3.2.3”)
– Found OpenGL: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework
– Configuring done
– Generating done
– Build files have been written to: /Users/jamesbowen/B1-build
Jamess-MacBook-Pro:B1-build jamesbowen$ ls
CMakeCache.txt exampleB1.in run2.mac
CMakeFiles exampleB1.out vis.mac
Makefile init_vis.mac
cmake_install.cmake run1.mac
Jamess-MacBook-Pro:B1-build jamesbowen$ make -j4
[ 12%] Building CXX object CMakeFiles/exampleB1.dir/exampleB1.cc.o
[ 25%] Building CXX object CMakeFiles/exampleB1.dir/src/ActionInitialization.cc.o
[ 37%] Building CXX object CMakeFiles/exampleB1.dir/src/DetectorConstruction.cc.o
[ 50%] Building CXX object CMakeFiles/exampleB1.dir/src/EventAction.cc.o
/Users/jamesbowen/B1/exampleB1.cc:33:10: fatal error: ‘G4RunManagerFactory.hh’
file not found
#include “G4RunManagerFactory.hh”
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/exampleB1.dir/exampleB1.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs…
make[1]: *** [CMakeFiles/exampleB1.dir/all] Error 2
make: *** [all] Error 2
Jamess-MacBook-Pro:B1-build jamesbowen$ make VERBOSE=1
/usr/local/Cellar/cmake/3.22.1/bin/cmake -S/Users/jamesbowen/B1 -B/Users/jamesbowen/B1-build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.22.1/bin/cmake -E cmake_progress_start /Users/jamesbowen/B1-build/CMakeFiles /Users/jamesbowen/B1-build//CMakeFiles/progress.marks
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 all
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/exampleB1.dir/build.make CMakeFiles/exampleB1.dir/depend
cd /Users/jamesbowen/B1-build && /usr/local/Cellar/cmake/3.22.1/bin/cmake -E cmake_depends “Unix Makefiles” /Users/jamesbowen/B1 /Users/jamesbowen/B1 /Users/jamesbowen/B1-build /Users/jamesbowen/B1-build /Users/jamesbowen/B1-build/CMakeFiles/exampleB1.dir/DependInfo.cmake --color=
Dependencies file “CMakeFiles/exampleB1.dir/src/ActionInitialization.cc.o.d” is newer than depends file “/Users/jamesbowen/B1-build/CMakeFiles/exampleB1.dir/compiler_depend.internal”.
Dependencies file “CMakeFiles/exampleB1.dir/src/DetectorConstruction.cc.o.d” is newer than depends file “/Users/jamesbowen/B1-build/CMakeFiles/exampleB1.dir/compiler_depend.internal”.
Dependencies file “CMakeFiles/exampleB1.dir/src/EventAction.cc.o.d” is newer than depends file “/Users/jamesbowen/B1-build/CMakeFiles/exampleB1.dir/compiler_depend.internal”.
Consolidate compiler generated dependencies of target exampleB1
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/exampleB1.dir/build.make CMakeFiles/exampleB1.dir/build
[ 12%] Building CXX object CMakeFiles/exampleB1.dir/exampleB1.cc.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DG4INTY_USE_QT -DG4LIB_BUILD_DLL -DG4UI_USE_QT -DG4UI_USE_TCSH -DG4VIS_USE_OPENGL -DG4VIS_USE_OPENGLQT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -I/Users/jamesbowen/B1/include -isystem /usr/local/include/Geant4 -isystem /usr/local/opt/expat/include -iframework /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -iframework /usr/local/opt/qt/lib -isystem /usr/local/opt/qt/lib/QtGui.framework/Headers -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/OpenGL.framework/Headers -isystem /usr/local/opt/qt/lib/QtCore.framework/Headers -isystem /usr/local/opt/qt/./mkspecs/macx-clang -isystem /usr/local/opt/qt/lib/QtWidgets.framework/Headers -isystem /usr/local/opt/qt/lib/QtPrintSupport.framework/Headers -isystem /usr/local/opt/qt/lib/QtOpenGL.framework/Headers -isystem /usr/local/include -W -Wall -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wno-variadic-macros -Wshadow -pipe -Qunused-arguments -DGL_SILENCE_DEPRECATION -stdlib=libc++ -pthread -ftls-model=initial-exec -std=c++11 -DNDEBUG -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.15 -fPIC -std=gnu++11 -MD -MT CMakeFiles/exampleB1.dir/exampleB1.cc.o -MF CMakeFiles/exampleB1.dir/exampleB1.cc.o.d -o CMakeFiles/exampleB1.dir/exampleB1.cc.o -c /Users/jamesbowen/B1/exampleB1.cc
/Users/jamesbowen/B1/exampleB1.cc:33:10: fatal error: ‘G4RunManagerFactory.hh’
file not found
#include “G4RunManagerFactory.hh”
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/exampleB1.dir/exampleB1.cc.o] Error 1
make[1]: *** [CMakeFiles/exampleB1.dir/all] Error 2
make: *** [all] Error 2
Jamess-MacBook-Pro:B1-build jamesbowen$

That still doesn’t look like the correct directory, as it should/would be /Users/jamesbowen/geant4-v11.0.0-install/lib/Geant4-11.0.0 by default. It would be better to find the file named Geant4Config.cmake under where you’ve installed Geant4 and pass the directory that’s in as the argument to Geant4_DIR.

Alternately, use CMAKE_PREFIX_PATH, so that if /Users/jamesbowen/geant4-v11.0.0-install is really where Geant4 is installed, do

cmake -DCMAKE_PREFIX_PATH=/Users/jamesbowen/geant4-v11.0.0-install  /Users/jamesbowen/B1

I used the alternate command you gave me, and it worked, thanks!

I then tried to run example B1 by issuing the command “./exampleB1”. It appeared to work at first, but I had some problems at the end. I tried pasting the whole command line, but the GEANT4 forum website flagged it as spam. Here are the last several lines that show the problem:

Visualization setting

/control/execute vis.mac

Macro file for the visualization setting in the initialization phase

of the B1 example when running in interactive mode

Use these open statements to open selected visualization

Use this open statement to create an OpenGL view:

/vis/open OGL 600x600-0+0
/vis/sceneHandler/create OGL
parameter value (OGL) is not listed in the candidate List.
Candidates are: ASCIITree ATree DAWNFILE G4HepRepFile HepRepFile RayTracer VRML2FILE gMocrenFile

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Invoked command has failed - see above. Available graphics systems are (short names):
ATree DAWNFILE HepRepFile RayTracer VRML2FILE gMocrenFile
Error code : 500
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

***** Illegal parameter (0) </vis/open OGL 600x600-0+0> *****

***** Batch is interrupted!! *****

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (500)
Error code : 500
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

***** Illegal parameter (0) </control/execute vis.mac> *****

***** Batch is interrupted!! *****

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (500)
Error code : 500
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Idle>

Hi James

Yes, if you have a long text to paste, better to put it in a txt file and attach, rather than just paste. And when you say “command line” I assume you mean terminal output. Also, if you do paste, please “quote” it (highlight it and click the little icon at the head of the box where you type your problem), because if you don’t, lines beginning with ‘#’ are interpreted as headings (that’s why they are in large bold letters above, which makes it annoying to read).

Well, the clue is in the output.

It means you have not built Geant4 with OpenGL support. Have another look at the Installation Guide to see how to do this. You have to set appropriate cmake option(s).

John

Hi John,

Thanks for your reply. I thought I did build GEANT4 with OpenGL support. In case I missed it though, I re-issued the command “cmake -DCMAKE_INSTALL_PREFIX=/opt/geant4 -DGEANT4_USE_OPENGL_X11=ON /Users/jamesbowen/geant4-v11.0.0”. After running Example B1 again, I still had the same problem. Attached is a text file that shows what happened in my terminal when I attempted the above command.
OpenGL_command.pdf (36.8 KB)

I notice that your list of libraries being built does not include libG4OpenGL. My understanding was that changing CMake options would appropriately trigger building or rebuilding of libraries affected by those options, but that doesn’t seem to be the case here.

I hate to suggest this, but perhaps you need to do a make clean install -j4. That’ll delete your existing build, redo the build from scratch (so time to go get lunch), and then copy the new build to your install area.

mkelsey,

Thanks for your reply. Yes, I believe that was the case when I installed GEANT4 on my iMac a year ago. I am not sure what the problem is here. I might well do the clean install, but I am concerned that the problem will persist.

I agree that’s it’s better to understand the issue so it doesn’t happen again. You might also check using ccmake . with the [t] toggle to see all the OpenGL options. Perhaps it’s not finding the libraries on your system? But then it should fail with an error, and you showed that it didn’t.

mkelsey,

Okay, I did do the “make clean install -j4” command. At the end of this process, I got an error message that looks like it is related to the problem I have been having. The last several lines are pasted below. What do you think? I am at a loss as to why any libraries would be missing.

[100%] Building CXX object source/CMakeFiles/G4physicslists.dir/physics_lists/util/src/G4HadProcesses.cc.o
[100%] Building CXX object source/CMakeFiles/G4physicslists.dir/physics_lists/util/src/G4PhysListUtil.cc.o
[100%] Building CXX object source/CMakeFiles/G4physicslists.dir/physics_lists/util/src/G4WarnPLStatus.cc.o
[100%] Linking CXX shared library …/BuildProducts/lib/libG4physicslists.dylib
[100%] Built target G4physicslists
Install the project…
– Install configuration: “Release”
CMake Error at source/source/externals/clhep/cmake_install.cmake:41 (file):
file INSTALL cannot find
“/Users/jamesbowen/geant4-v11.0.0-build/source/BuildProducts/lib/libG4clhep.dylib”:
No such file or directory.
Call Stack (most recent call first):
source/source/externals/cmake_install.cmake:42 (include)
source/source/cmake_install.cmake:62 (include)
source/cmake_install.cmake:42 (include)
cmake_install.cmake:42 (include)

make: *** [install] Error 1
Jamess-MacBook-Pro:geant4-v11.0.0-build jamesbowen$

That is really weird. The log file snippet shows that it got through 100% of the build, creating all of the libraries. How could the install step not find what it just built? I’m not able to test G4 11.0.0 myself (I’m running a very old Mac, and my LLVM doesn’t support c++17).

James

It looks like you are having real trouble with locating things. You need to understand the concepts of files and directories and how to navigate between them.

More than likely you are picking up an old version of Geant4 libraries. Make sure you install and build in new clean directories and make sure the build of your app refers to these builds.

Perhaps best to eliminate any old versions of Geant4 and its libraries before you start.

John

John,

How do I do that? I already deleted the directories from a previous attempt to install GEANT4 before I downloaded and installed this version. Does a GEANT4 installation put files in any other directory besides geant4-v11.0.0, geant4-v11.0.0-build, and geant4-v11.0.0-install, or rather their counterparts from previous version?

Mmm. Sounds like you’ve done all the right things. And yes, I believe the Geant4 cmake procedure does not place files anywhere except the designated source, build and install directories. This is a puzzle.

Looking back, I notice you had

Is this still the case? Maybe the libraries are in /opt, which could explain why they cannot be found in /Users/jamesbowen/geant4-v11.0.0-build/source/BuildProducts/lib.

Be aware cmake “remembers” the options you give it. It puts them in a file CMakeCache.txt. I am in the habit of deleting this file before a new cmake so that I’m sure what options apply.

John,

With all of these problems, I decided to delete my existing installation, and re-install GEANT4. I deleted the three directories I mentioned earlier before the re-installation. I have now re-installed it. Everything I have done up to this point is straight out of the installation procedure for Unix platforms:Building and Installing from Source — Geant4 Installation Guide 11.0 documentation.

I am now at the point where it is time to enable OpenGL. Before, I tried to do this by going to the directory /Users/jamesbowen/geant4-v11.0.0-build/source, and issuing the following command:

cmake -DCMAKE_INSTALL_PREFIX=/opt/geant4 -DGEANT4_USE_OPENGL_X11=ON /Users/jamesbowen/geant4-v11.0.0

This is the command I have written down in my notes, but I honestly don’t remember where I got it. The Build Options section at the link I pasted above is not too clear about this. Based on what you said, I have a feeling that it was this command that was the source of my problems. Do you have any recommendations on what command I should use to enable OpenGL?

Hi James

Best get all your cmake options together first. You can’t simply “enable” OpenGL afterwards. It has to be requested
-DGEANT4_USE_OPENGL_X11=ON
together with all the other options at the start of a complete installation.

Your procedure (issuing cmake twice) might have had a chance of working because cmake remembers the options from the first cmake, but because you added
-DCMAKE_INSTALL_PREFIX=/opt/geant4
the second time you might have finished up with some libraries in /Users/jamesbowen/geant4-v11.0.0-install and some in /opt/geant4.

Get all your cmake options together and start again with a single cmake with all the options on one line* (followed by make install) and see what happens. Forget /opt/. Stick with
-DCMAKE_INSTALL_PREFIX=/Users/jamesbowen/geant4-v11.0.0-install

John

  • You don’t have to have them on one line. In Unix you can split a line by ending with the “escape” character (a backslash). Or you can use ccmake.

I am big fan of the ccmake terminal (curses) interface. If you run the command ccmake . in your build directory after a build, you can see all of the option settings that were used, and you can navigate (arrow keys) through and change them if you wish.

If you’re using the straight cmake command-line interface, I agree with John that it’s better for you to collect all of your desired option settings into one command and do it at the start (I’ve got a “cmake-g4.sh” script that I use for this purpose, to get the identical settings every time I build a new release).