View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016092CMakeCMakepublic2016-05-03 05:102016-06-10 14:31
ReporterAntonio 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformDesktop PCOSWindowsOS Version7
Product Version 
Target VersionFixed in Version 
Summary0016092: Module CheckIncludeFile should notify in case of compiler flag errors
Description(Problem was first mentioned in mailing list 2 weeks ago, although there was no feedback)

CheckIncludeFile will return "header not found" if some wrong compiler flags is set (not accepted by the compiler).

I noticed the problem when having a "check include" failure even if I was certain the include file should be found in the include paths I had set.
When I hacked into:
CheckIncludeFile.cmake
this line:
message(STATUS "OUTPUT=${OUTPUT}")
it turned out the problem was not in including file, but in the flags that
were passed to the compiler, causing a failure that the module interprets as "the header could not be found".

I think an error message should be printed instead in this case.
This could be handled in 2 ways:
a) Either checking first of all if, with the given flags, the compiler will
succeed in compiling a source file containing JUST an empty main function.
For efficiency, this check might even be done AFTER the first try_compile
fails.
b) Or, in case of failure, checking that the error returned is JUST the
cannot find error message.

Option a) seems to have the advantage of being extremely easy to implement, although might introduce some overhead.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0042997)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2016-05-03 05:10 Antonio New Issue
2016-06-10 14:29 Kitware Robot Note Added: 0042997
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team