CFlags such as -DG4VIS_USE_OPENGLXM are returned by geant4-config --cflags but the overall G4VIS_USE is not. I think the geant4-config script should return this. I also found this in the documentation which might be of relevance: >The C-pre-processor macro G4VIS_USE is automatically defined unless the environment variable G4VIS_NONE is set
As reported in the documentation, setting a flag for a specific driver (G4VIS_USE_OPENGLXM in this case) is enough for having the system automatically set G4VIS_USE internally. BTW, configurations based on the old Configure script are no longer supported in release 9.5. You should migrate using CMake instead, which is now the default supported build system.
I am building geant4.9.5.p01 with cmake and then trying to use the geant4-config script to link my code to geant4 with the correct flags and libs. In doing so I run `geant4-config --cflags` to get the cflags my code should be compiled with, this returns: >-DG4INTY_USE_XT -I/usr/include -DG4VIS_USE_OPENGL -DG4UI_USE_TCSH -DG4UI_USE_XM -DG4VIS_USE_OPENGLXM -DG4VIS_USE_RAYTRACERX -DG4VIS_USE_OPENGLX ... However the documentation (as well as previous release usage) states that visualization in code linked to geant4 should be inside G4VIS_USE preprocessor defines. Given the `geant4-config --cflags` returns which visualization is available (e.g. DG4VIS_USE_OPENGLXM) via these cflags it would be helpful that it also return that visualization is available overall via the G4VIS_USE flag. Currently there is no way to know if visualization exists in the installed geant4 as nothing exposes this information directly.
Assigning to cmake component...
G4{UI,VIS}_USE are specific to Geant4 applications, not the toolkit itself. They are used in the supplied examples to demonstrate how to activate/deactivate UI and Vis, but these variables could be anything the developer chooses, for example #ifdef MYAPPNEEDSVIS #include "G4VisExecutive.hh" #endif and, depending on the exact details of the application, you might need more complicated, or even runtime, setup (the documentation does need updating... :-(!). Vis/UI always exists in Geant4, it's the drivers depending on third-party packages which may or may not be present. We are working towards a cleaner system for configuring these, hence the WONTFIX.
>Vis/UI always exists in Geant4 Has the effect of G4(UI/VIS)_NONE been removed now then?
(In reply to comment #5) > >Vis/UI always exists in Geant4 > Has the effect of G4(UI/VIS)_NONE been removed now then? Yes and no. If you're using the GNUmakefile system or CMake, then it's still in force, but should be considered deprecated in the later. In geant4-config it will never be implemented.