View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014701CMakeCMakepublic2014-01-15 05:172014-06-02 08:38
ReporterAndreas Pakulat 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product VersionCMake 2.8.12.1 
Target VersionFixed in Version 
Summary0014701: check_include_file never re-runs because it use the variable as cache
DescriptionWhen using check_include_file to verify a certain header can be used, the result of the try_compile is cached by check_include_file using the same variable that is passed in to check_include_file. This means a second run of cmake will not run the try-compile again because the variable is already defined and hence the check at the top of check_include_file goes into the else branch.

This breaks the common idiom of running cmake for a project to find out which dependencies might be missing, then installing needed dependencies and simply re-run cmake (without deleting the build directory). In addition this is rather hard to debug for someone that just uses a project and is not overly familiar with CMake.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0034944)
Brad King (manager)
2014-01-15 09:48

The caching is by design. The try_compile checks can be expensive and there are often a lot of them. It is common practice to use a fresh build tree each time or at least "rm -rf CMakeCache.txt CMakeFiles" to re-run checks.
(0036080)
Robert Maynard (manager)
2014-06-02 08:38

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2014-01-15 05:17 Andreas Pakulat New Issue
2014-01-15 09:48 Brad King Note Added: 0034944
2014-01-15 09:48 Brad King Status new => resolved
2014-01-15 09:48 Brad King Resolution open => won't fix
2014-06-02 08:38 Robert Maynard Note Added: 0036080
2014-06-02 08:38 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team