Problem 2303 - Building Geant4 with Qt fails with CMake 3.8 due to missing AUTOMOC paths
Summary: Building Geant4 with Qt fails with CMake 3.8 due to missing AUTOMOC paths
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: cmake (show other problems)
Version: 10.7
Hardware: All All
: P4 minor
Assignee: Ben Morgan
URL:
Depends on:
Blocks:
 
Reported: 2020-12-17 18:00 CET by Ben Morgan
Modified: 2021-01-26 11:12 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Ben Morgan 2020-12-17 18:00:37 CET
As reported on Discourse, and confirmed:

https://geant4-forum.web.cern.ch/t/opengl-cmake-automoc-problem/4128

Geant4 10.7 will fail to build Qt modules (OpenGL etc) due to Automoc (CMake Autogen) failing to pick up required Geant4 headers. This appears to be due to a bug in CMake 3.8, or missing configuration in Geant4 for this CMake version. Whilst investigation continues, there are two possible patches:

1. Use CMake 3.9 or newer, where this problem appears resolved
2. Copy the offending headers from the `include` directories to the corresponding `src` directory for the module. This does not affect the build otherwise (`include` has priority over `src`) and resolves the issue.

A permanent fix will be investigated.
Comment 1 Ben Morgan 2021-01-26 11:12:23 CET
Patch made on development master, back ported to 10.7 patches so will be in 10.7.1 release. Resolution is to require CMake 3.9 or newer with Qt.