Problem 1683

Summary: Bug in Geant4InterfaceOptions.cmake?
Product: Geant4 Reporter: lukek06
Component: cmakeAssignee: Ben Morgan <Ben.Morgan>
Status: CLOSED FIXED    
Severity: trivial    
Priority: P5    
Version: 10.0   
Hardware: All   
OS: All   

Description lukek06 2014-10-29 15:17:42 CET
While I install Geant4 10.00.p02 on my mac(yosemite), the following error occurs:

CMake Error at cmake/Modules/Geant4InterfaceOptions.cmake:220 (message):
  could not find X11 Xmu library and/or headers
Call Stack (most recent call first):
  CMakeLists.txt:83 (include)

At that time XQuartz was installed, so I had X11 library and headers.
So I tried to look at "Geant4InterfaceOptions.cmake" which returned error message. In that file,

209     set(X11_LIB_SEARCH_PATH
210         /usr/pkg/xorg/lib
211         /usr/X11R6/lib
212         /usr/X11R7/lib
213         /usr/openwin/lib
214         /opt/X11/lib
215         )
216 
217     find_path(X11_Xmu_INCLUDE_PATH X11/Xmu/Xmu.h ${X11_INC_SEARCH_PATH})
218     find_library(X11_Xmu_LIBRARY Xmu ${X11_SEARCH_PATH})
219     if(NOT X11_Xmu_LIBRARY OR NOT X11_Xmu_INCLUDE_PATH)
220       message(FATAL_ERROR "could not find X11 Xmu library and/or headers")
221     endif()

I thought X11_LIB_SEARCH_PATH in line 209 should be matched with X11_SEARCH_PATH in the line 218, and changed that line as follow:

218     find_library(X11_Xmu_LIBRARY Xmu ${X11_LIB_SEARCH_PATH})

After this change, the error message was gone and now I can successfully execute examples.

I wonder if this is bug in grant4 source file or just my problem
Thank you.
Comment 1 Ben Morgan 2014-12-17 07:39:42 CET
Fixed in tag cmake-V10-01-02, will be in first patch for 10.1. Fix in 10.0 depends on future patches.