View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013293CMakeCMakepublic2012-06-11 18:442012-11-05 14:33
ReporterMichael.jeulinl 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product VersionCMake 2.8.8 
Target VersionFixed in Version 
Summary0013293: INTERNAL: Cache value overwritten without a FORCE option set.
DescriptionOn INTERNAL type, the cache value is overwritten without a FORCE option set.
Steps To Reproducecmake_minimum_required(VERSION 2.8.8)

#
# From CMake 2.8.8 documentation:
#
# If <type> is INTERNAL, then the <value> is always written into the cache, replacing any values
# existing in the cache. If it is not a cache variable, then this always writes into the current
# makefile. The FORCE option will overwrite the cache value removing any changes by the user.
#

project(testSetInternal)

message(STATUS "0-Foo:${Foo}")
set(Foo TrueFoo CACHE STRING "Foo value" FORCE)
message(STATUS "1-Foo:${Foo}")
set(Foo Foo CACHE STRING "Foo value")
message(STATUS "2-Foo:${Foo}")

message(STATUS "0-Bar:${Bar}")
set(Bar TrueBar CACHE INTERNAL "Bar value" FORCE)
message(STATUS "1-Bar:${Bar}")
set(Bar Bar CACHE INTERNAL "Bar value")
message(STATUS "2-Bar:${Bar}")
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0029664)
Brad King (manager)
2012-06-12 08:08

How is this a bug? The documentation you quote explains exactly the behavior you report. This is by design and has always been the case since CMake started. INTERNAL entries are not available for the user to edit in the GUI so there is no need to preserve user-set values. Please post to the mailing list instead of the issue tracker if you have further questions.
(0031448)
David Cole (manager)
2012-11-05 14:33

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

 Issue History
Date Modified Username Field Change
2012-06-11 18:44 Michael.jeulinl New Issue
2012-06-12 08:08 Brad King Note Added: 0029664
2012-06-12 08:08 Brad King Status new => resolved
2012-06-12 08:08 Brad King Resolution open => no change required
2012-11-05 14:33 David Cole Note Added: 0031448
2012-11-05 14:33 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team