mirror of
https://github.com/reactos/CMake.git
synced 2025-02-13 08:06:16 +00:00
Merge topic 'dev/property-append-with-empty-string'
31bd83e set_property: Do not remove a property when APPENDing nothing
This commit is contained in:
commit
e31c4bd9a6
@ -84,12 +84,14 @@ bool cmSetPropertyCommand
|
||||
{
|
||||
doing = DoingNone;
|
||||
this->AppendMode = true;
|
||||
this->Remove = false;
|
||||
this->AppendAsString = false;
|
||||
}
|
||||
else if(*arg == "APPEND_STRING")
|
||||
{
|
||||
doing = DoingNone;
|
||||
this->AppendMode = true;
|
||||
this->Remove = false;
|
||||
this->AppendAsString = true;
|
||||
}
|
||||
else if(doing == DoingNames)
|
||||
@ -160,7 +162,7 @@ bool cmSetPropertyCommand::HandleGlobalMode()
|
||||
}
|
||||
if(this->AppendMode)
|
||||
{
|
||||
cm->AppendProperty(name, value, this->AppendAsString);
|
||||
cm->AppendProperty(name, value ? value : "", this->AppendAsString);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -226,7 +228,7 @@ bool cmSetPropertyCommand::HandleDirectoryMode()
|
||||
}
|
||||
if(this->AppendMode)
|
||||
{
|
||||
mf->AppendProperty(name, value, this->AppendAsString);
|
||||
mf->AppendProperty(name, value ? value : "", this->AppendAsString);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -225,6 +225,7 @@ if(BUILD_TESTING)
|
||||
ADD_TEST_MACRO(ObjectLibrary UseCshared)
|
||||
ADD_TEST_MACRO(NewlineArgs NewlineArgs)
|
||||
ADD_TEST_MACRO(SetLang SetLang)
|
||||
ADD_TEST_MACRO(EmptyProperty EmptyProperty)
|
||||
ADD_TEST_MACRO(ExternalOBJ ExternalOBJ)
|
||||
ADD_TEST_MACRO(LoadCommand LoadedCommand)
|
||||
ADD_TEST_MACRO(LinkDirectory bin/LinkDirectory)
|
||||
|
9
Tests/EmptyProperty/CMakeLists.txt
Normal file
9
Tests/EmptyProperty/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
||||
project (EmptyProperty)
|
||||
|
||||
set_property(DIRECTORY APPEND
|
||||
PROPERTY
|
||||
COMPILE_DEFINITIONS)
|
||||
|
||||
include(CTest)
|
||||
|
||||
add_executable(EmptyProperty EmptyProperty.cxx)
|
1
Tests/EmptyProperty/EmptyProperty.cxx
Normal file
1
Tests/EmptyProperty/EmptyProperty.cxx
Normal file
@ -0,0 +1 @@
|
||||
int main(void) { return 0; }
|
Loading…
x
Reference in New Issue
Block a user