[cmake-developers] [CMake 0013293]: INTERNAL: Cache value overwritten without a FORCE option set.

Mantis Bug Tracker mantis at public.kitware.com
Mon Jun 11 18:44:54 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=13293 
====================================================================== 
Reported By:                Michael.jeulinl
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13293
Category:                   CMake
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-06-11 18:44 EDT
Last Modified:              2012-06-11 18:44 EDT
====================================================================== 
Summary:                    INTERNAL: Cache value overwritten without a FORCE
option set.
Description: 
On INTERNAL type, the cache value is overwritten without a FORCE option set.

Steps to Reproduce: 
cmake_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}")
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-06-11 18:44 Michael.jeulinlNew Issue                                    
======================================================================




More information about the cmake-developers mailing list