Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
0c24570e
Commit
0c24570e
authored
Nov 21, 2008
by
Bill Hoffman
Browse files
BUG: fix issue with -D and cache force
parent
46b9a884
Changes
3
Hide whitespace changes
Inline
Side-by-side
Source/cmMakefile.cxx
View file @
0c24570e
...
...
@@ -1561,7 +1561,8 @@ void cmMakefile::AddDefinition(const char* name, const char* value)
void
cmMakefile
::
AddCacheDefinition
(
const
char
*
name
,
const
char
*
value
,
const
char
*
doc
,
cmCacheManager
::
CacheEntryType
type
)
cmCacheManager
::
CacheEntryType
type
,
bool
force
)
{
const
char
*
val
=
value
;
cmCacheManager
::
CacheIterator
it
=
...
...
@@ -1569,7 +1570,12 @@ void cmMakefile::AddCacheDefinition(const char* name, const char* value,
if
(
!
it
.
IsAtEnd
()
&&
(
it
.
GetType
()
==
cmCacheManager
::
UNINITIALIZED
)
&&
it
.
Initialized
())
{
val
=
it
.
GetValue
();
// if this is not a force, then use the value from the cache
// if it is a force, then use the value being passed in
if
(
!
force
)
{
val
=
it
.
GetValue
();
}
if
(
type
==
cmCacheManager
::
PATH
||
type
==
cmCacheManager
::
FILEPATH
)
{
std
::
vector
<
std
::
string
>::
size_type
cc
;
...
...
Source/cmMakefile.h
View file @
0c24570e
...
...
@@ -264,7 +264,8 @@ public:
///! Add a definition to this makefile and the global cmake cache.
void
AddCacheDefinition
(
const
char
*
name
,
const
char
*
value
,
const
char
*
doc
,
cmCacheManager
::
CacheEntryType
type
);
cmCacheManager
::
CacheEntryType
type
,
bool
force
=
false
);
/**
* Add bool variable definition to the build.
...
...
Source/cmSetCommand.cxx
View file @
0c24570e
...
...
@@ -171,7 +171,7 @@ bool cmSetCommand
this
->
Makefile
->
AddCacheDefinition
(
variable
,
value
.
c_str
(),
docstring
,
type
);
type
,
force
);
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment