Unfortunately, if I write in that way, it say that cmake-gui isnt’ a known internal or exeternal command etc
Then open it from the Windows start menu, it should be part of CMake
It looks like that I don’t have Cmake in the start menù
and in the programs directory too
Maybe, do I have to install something more than Visual Studio?
Maybe this one https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-windows-x86_64.msi ?
So I don’t know where your CMake is coming from (maybe Visual Studio), but I would advise you to find a way to get CMake-Gui, it will be very useful.
I installed cmake
and i did cmake-gui .
this is the log
>
> Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
> HepMC3 Build type not specified, use: Release
> HepMC3: HEPMC3_ENABLE_SEARCH ON
> HepMC3: HEPMC3_ENABLE_ROOTIO OFF
> HepMC3: HEPMC3_ENABLE_PYTHON ON
> HepMC3: HEPMC3_PYTHON_VERSIONS 2.X,3.X
> HepMC3: HEPMC3_ENABLE_TEST OFF
> HepMC3: HEPMC3_BUILD_DOCS OFF
> HepMC3: HEPMC3_BUILD_EXAMPLES OFF
> HepMC3: HEPMC3_INSTALL_INTERFACES OFF
> HepMC3: HEPMC3_ROOTIO_INSTALL_LIBDIR lib
> HepMC3: HEPMC3_CXX_STANDARD 11
> HepMC3: CMAKE_CXX_COMPILER_ID MSVC
> HepMC3: CMAKE_CXX_FLAGS /DWIN32 /D_WINDOWS /W3 /GR /EHsc /bigobj /wd4267 /wd4244 /wd4477 /MD /O2 /Ob2 /DNDEBUG
> HepMC3: CMAKE_C_COMPILER_ID MSVC
> Could NOT find Python2 (missing: Python2_LIBRARIES Python2_INCLUDE_DIRS Interpreter Development.Module) (Required is at least version "2")
> Reason given by package:
> Interpreter: Wrong version for the interpreter "C:/Users/faust/AppData/Local/Programs/Python/Python39/python.exe"
>
> HepMC3 python: Python version 2.X not found. Python bindings for version 2.X disabled.
> HepMC3 python: Python verson 3.X found in C:/Users/faust/AppData/Local/Programs/Python/Python39/python.exe. Python bindings generation is possible.
> HepMC3 python: Tweak HEPMC3_Python_SITEARCH39 option to set the installation path for the python39 bindings.
> HepMC3 python: HEPMC3_Python_SITEARCH39 defaults to lib/3.9.2
> HepMC3 python: WARNING: The installation path of the python modules is HEPMC3_Python_SITEARCH=lib/3.9.2.
> HepMC3 python: WARNING: The installation path of the python modules is outside of the global instalation path CMAKE_INSTALL_PREFIX=C:/Program Files/HepMC3-install.
> HepMC3 python: WARNING: You can use the HEPMC3_Python_SITEARCH39 variable to set the desired installation path for the Python39 modules.
> Configuring done
> Generating done
but Cmake can’t still find HepMC… I don’t know…
So you’re telling me that HepMC doesn’t find HepMC? What you show me if the screenshot for HepMC. You should specify that in Geant4 (or did I miss something?)
So…do I have to type cmake-gui . in the simulation directory?
You should know. You told me cmake doesn’t find HepMC, but when did cmake complain about that? When doing what?
Ok I explain better:
I’ve the directories
C:\Program Files\geant4_10_07_p01 : Geant4 sources downloaded from geant website
C:\Program Files\geant4_10_07_p01_build : Here I built Geant
C:\Program Files\geant4_10_07_p01_install : Here I installed Geant
C:\Program Files\HepMC3: HepMC sources downloaded from HepMC website
C:\Program Files\HepMC3-build : Here I built HepMC
C:\Program Files\HepMC3-install: Here I installed HepMC
C:\B1: Main directory of my simulation
C:\B1\B1-build: Here I must build my simulation
Then I lunch the commands
cd “C:/B1/B1-build”
cmake -DGeant4_DIR="C:\Program Files\geant4_10_07_p01_install\lib\Geant4-10.7.1" "C:\B1"
and I get the errore due to missing HepMC
so geant can’t build the simulation…
then in which directory should I cd and how should I sed the cmake-gui?
So you have two choices, in C:/B1/B1-build:
- type:
and obviously replacecmake -DGeant4_DIR="C:\Program Files\geant4_10_07_p01_install\lib\Geant4-10.7.1" -DHEPMC_INCLUDE_DIR="C:\Program Files\HepMC3-install\include" -DHEPMC_LIBRARIES="HepMC libraries""HepMC libraries"by the required libraries and adjust the correct include directory. - open CMake-GUI in the directory and use the GUI to fill those variables.
As a more general comment I think you should try things out by yourself at some point, it’s a good way of learning…
Thank you…it looks like that this way works…or better…I have errors during the run but I think they are because of I don’t know which libraries I’ve to inlcude then I just wrote -DHEPMC_LIBRARIES="HepMC libraries" …so I’ve to try
Right, but it’s not my simulation…it’s the simulation of my supervisor’s collegue… My supervisor asked me to help his collegue making the simulations…but I never used HepMC in my Geant4 simulations, so I don’t know how to use it…and you know…supervisors always want works in few times…
I also tried the cmake-gui . method and now it looks like that it find hepmc, but later I get the same error that I got using the first method…then maybe it’s a problem related to Geant…so, thank you @bellenot…now I’ve to solve the Geant problem!
Yes, I know, don’t worry ![]()
You’re welcome! And good luck with it, I’m sure you will find the solution
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.





