[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6424-g5cc2e25
Stephen Kelly
steveire at gmail.com
Thu Dec 26 08:27:16 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 5cc2e25ce2bca64b3d02cc93b0f1ea02c0ce03ef (commit)
via 07e5ff968d0557c3f97fe7148f67b0bde6cca3f1 (commit)
via be291ae4828f7e3cb6b9ec278a64e4303499a2d6 (commit)
from 1dd50a66d06b4f041e0be0381b6a0ef47ac95ef2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5cc2e25ce2bca64b3d02cc93b0f1ea02c0ce03ef
commit 5cc2e25ce2bca64b3d02cc93b0f1ea02c0ce03ef
Merge: 1dd50a6 07e5ff9
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Dec 26 08:27:14 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Dec 26 08:27:14 2013 -0500
Merge topic 'minor-cleanups' into next
07e5ff9 cmTarget: Don't update IMPORTED target compilation properties
be291ae Run the add_compile_options command unit test.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07e5ff968d0557c3f97fe7148f67b0bde6cca3f1
commit 07e5ff968d0557c3f97fe7148f67b0bde6cca3f1
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Dec 26 14:11:23 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Dec 26 14:26:01 2013 +0100
cmTarget: Don't update IMPORTED target compilation properties
The include_directories() and add_compile_options() commands
should not append to the corresponding target property for IMPORTED
targets. This is already the case for add_definitions().
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 30a1557..6883f57 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4045,8 +4045,8 @@ cmMakefile::AddImportedTarget(const char* name, cmTarget::TargetType type,
// Create the target.
cmsys::auto_ptr<cmTarget> target(new cmTarget);
target->SetType(type, name);
- target->SetMakefile(this);
target->MarkAsImported();
+ target->SetMakefile(this);
// Add to the set of available imported targets.
this->ImportedTargets[name] = target.get();
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 39d9819..7f8bdb7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -330,34 +330,36 @@ void cmTarget::SetMakefile(cmMakefile* mf)
// Save the backtrace of target construction.
this->Makefile->GetBacktrace(this->Internal->Backtrace);
- // Initialize the INCLUDE_DIRECTORIES property based on the current value
- // of the same directory property:
- const std::vector<cmValueWithOrigin> parentIncludes =
- this->Makefile->GetIncludeDirectoriesEntries();
-
- for (std::vector<cmValueWithOrigin>::const_iterator it
- = parentIncludes.begin(); it != parentIncludes.end(); ++it)
+ if (!this->IsImported())
{
- this->InsertInclude(*it);
- }
+ // Initialize the INCLUDE_DIRECTORIES property based on the current value
+ // of the same directory property:
+ const std::vector<cmValueWithOrigin> parentIncludes =
+ this->Makefile->GetIncludeDirectoriesEntries();
- const std::set<cmStdString> parentSystemIncludes =
- this->Makefile->GetSystemIncludeDirectories();
+ for (std::vector<cmValueWithOrigin>::const_iterator it
+ = parentIncludes.begin(); it != parentIncludes.end(); ++it)
+ {
+ this->InsertInclude(*it);
+ }
+ const std::set<cmStdString> parentSystemIncludes =
+ this->Makefile->GetSystemIncludeDirectories();
- for (std::set<cmStdString>::const_iterator it
- = parentSystemIncludes.begin();
- it != parentSystemIncludes.end(); ++it)
- {
- this->SystemIncludeDirectories.insert(*it);
- }
+ for (std::set<cmStdString>::const_iterator it
+ = parentSystemIncludes.begin();
+ it != parentSystemIncludes.end(); ++it)
+ {
+ this->SystemIncludeDirectories.insert(*it);
+ }
- const std::vector<cmValueWithOrigin> parentOptions =
- this->Makefile->GetCompileOptionsEntries();
+ const std::vector<cmValueWithOrigin> parentOptions =
+ this->Makefile->GetCompileOptionsEntries();
- for (std::vector<cmValueWithOrigin>::const_iterator it
- = parentOptions.begin(); it != parentOptions.end(); ++it)
- {
- this->InsertCompileOption(*it);
+ for (std::vector<cmValueWithOrigin>::const_iterator it
+ = parentOptions.begin(); it != parentOptions.end(); ++it)
+ {
+ this->InsertCompileOption(*it);
+ }
}
if (this->GetType() != INTERFACE_LIBRARY)
diff --git a/Tests/CMakeCommands/add_compile_options/CMakeLists.txt b/Tests/CMakeCommands/add_compile_options/CMakeLists.txt
index 1652cf6..995b32c 100644
--- a/Tests/CMakeCommands/add_compile_options/CMakeLists.txt
+++ b/Tests/CMakeCommands/add_compile_options/CMakeLists.txt
@@ -12,3 +12,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
"DO_GNU_TESTS"
)
endif()
+
+add_compile_options(-rtti)
+add_library(imp UNKNOWN IMPORTED)
+get_target_property(_res imp COMPILE_OPTIONS)
+if (_res)
+ message(SEND_ERROR "add_compile_options populated the COMPILE_OPTIONS target property")
+endif()
diff --git a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
index 900dbd0..14d40aa 100644
--- a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
@@ -25,3 +25,10 @@ target_compile_definitions(consumer
target_compile_definitions(consumer
PRIVATE
)
+
+add_definitions(-DSOME_DEF)
+add_library(imp UNKNOWN IMPORTED)
+get_target_property(_res imp COMPILE_DEFINITIONS)
+if (_res)
+ message(SEND_ERROR "add_definitions populated the COMPILE_DEFINITIONS target property")
+endif()
diff --git a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
index 8a564c7..661bbaa 100644
--- a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
@@ -62,3 +62,10 @@ target_include_directories(consumer
target_include_directories(consumer
SYSTEM PRIVATE
)
+
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+add_library(imp UNKNOWN IMPORTED)
+get_target_property(_res imp INCLUDE_DIRECTORIES)
+if (_res)
+ message(SEND_ERROR "include_directories populated the INCLUDE_DIRECTORIES target property")
+endif()
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be291ae4828f7e3cb6b9ec278a64e4303499a2d6
commit be291ae4828f7e3cb6b9ec278a64e4303499a2d6
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Dec 26 14:24:24 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Dec 26 14:24:24 2013 +0100
Run the add_compile_options command unit test.
This has not been executed since it was added in
commit a984f325 (Introduce add_compile_options command., 2013-06-04).
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 5ea604f..1d573c6 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2168,6 +2168,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
--output-log "${CMake_BINARY_DIR}/Tests/CTestConfig/ScriptWithArgs.log"
)
+ ADD_TEST_MACRO(CMakeCommands.add_compile_options add_compile_options)
ADD_TEST_MACRO(CMakeCommands.target_link_libraries target_link_libraries)
ADD_TEST_MACRO(CMakeCommands.target_include_directories target_include_directories)
ADD_TEST_MACRO(CMakeCommands.target_compile_definitions target_compile_definitions)
-----------------------------------------------------------------------
Summary of changes:
Source/cmMakefile.cxx | 2 +-
Source/cmTarget.cxx | 48 ++++++++++---------
.../add_compile_options/CMakeLists.txt | 7 +++
.../target_compile_definitions/CMakeLists.txt | 7 +++
.../target_include_directories/CMakeLists.txt | 7 +++
Tests/CMakeLists.txt | 1 +
6 files changed, 48 insertions(+), 24 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list