Problem 1357 - CMake fails claiming '-- Include directory "/usr/include" does not exist'
Summary: CMake fails claiming '-- Include directory "/usr/include" does not exist'
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: cmake (show other problems)
Version: 9.4
Hardware: All Linux
: P5 normal
Assignee: Ben Morgan
URL:
Depends on:
Blocks:
 
Reported: 2012-09-20 01:02 CEST by Fabian Kislat
Modified: 2012-09-24 15:15 CEST (History)
0 users

See Also:


Attachments
Output from cmake (2.15 KB, text/plain)
2012-09-20 01:02 CEST, Fabian Kislat
Details
Patch to strip enclosing quotation marks from include paths (477 bytes, patch)
2012-09-20 01:03 CEST, Fabian Kislat
Details | Diff

Note You need to log in before you can comment on or make changes to this problem.
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.