Problem 1357

Summary: CMake fails claiming '-- Include directory "/usr/include" does not exist'
Product: Geant4 Reporter: Fabian Kislat <fkislat>
Component: cmakeAssignee: Ben Morgan <Ben.Morgan>
Status: CLOSED FIXED    
Severity: normal    
Priority: P5    
Version: 9.4   
Hardware: All   
OS: Linux   
Attachments: Output from cmake
Patch to strip enclosing quotation marks from include paths

Description Fabian Kislat 2012-09-20 01:02:26 CEST
Created attachment 187 [details]
Output from cmake

On my machine (Gentoo Linux) compiling Geant4-9.4 (patch 3) fails during the cmake phase with the attached output.

The reason is that in cmake/Modules/ResolveCompilerPaths.cmake include flags of the form -I"/usr/include" (i.e. with quotes) are considered, but before testing the existence of that path, the quotes are not removed (and of course "/usr/include" with quotes does not exist).
Comment 1 Fabian Kislat 2012-09-20 01:03:47 CEST
Created attachment 188 [details]
Patch to strip enclosing quotation marks from include paths

The attached patch fixed the problem.
Comment 2 Ben Morgan 2012-09-24 15:14:46 CEST
Hi Fabian,

Thanks for the report and patch - now applied on SVN (tag cmake-V09-05-45). If there is a further patch to 9.4, your fix will go in. It will also go in 9.5 and the new 9.6, although these use a new FindCLHEP module that doesn't rely on ResolveCompilerPaths, but it's useful should we need it in future!

You may also want to report the issue to the upstream author:

https://github.com/jedbrown/cmake-modules/blob/master/ResolveCompilerPaths.cmake

Thanks again for the report and patch!

Ben.