Message: Re: unsetting G4UI_USE_XM when using CMake Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Note Re: unsetting G4UI_USE_XM when using CMake  

Forum: Installation and Configuration
Re: Question unsetting G4UI_USE_XM when using CMake (Neil Fazel)
Date: 21 Mar, 2014
From: Ben Morgan <Ben Morgan>

On Thu, 20 Mar 2014 01:23:21 GMT, Neil Fazel wrote:
> CMake seems intent on building my geant4 application with Xm UI. This is what I've done. In
> CMakeLists.txt, I modified the block
> option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
>   find_package(Geant4 REQUIRED ui_all vis_all)
> else()
>   find_package(Geant4 REQUIRED)
> endif()
> by removing "ui_all". Then I ran cmake followed by make. It didn't work and Xm UI was still launched. Then
> I replaced "ON" to "OFF"; that didn't prevent Xm UI from launching either. When I compile in verbose mode,
> I see -DG4UI_USE_XM as one of the arguments passed to the compiler, so it seems to be ignoring the
> directive in CMakeLists.txt.
> What am I missing here?

The Motif UI and vis are coupled (as is Qt), so if you select vis_all without ui_all then the corresponding UI driver will be compiled in. At runtime, the "best" available drivers will be selected (the UI/Vis experts can comment on that).

If you require finer grain control over which driver your application uses, then in CMake you need to use the full interface of the Geant4Config module, documented in the Installation Guide and Application Developers Guide. The former has examples of using find_package to select specific drivers, and those can be wrapped in option/if/endif blocks to select/deselect given drivers.


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

1 None: Re: unsetting G4UI_USE_XM when using CMake   (Neil Fazel - 22 Mar, 2014)
 Add Message Add Message
to: "Re: unsetting G4UI_USE_XM when using CMake "

 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 ]