[Cmake-commits] CMake branch, next, updated. v2.8.6-2090-g7ac4f0e
Brad King
brad.king at kitware.com
Thu Dec 1 16:05:13 EST 2011
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 7ac4f0ef2f2ab32f72f55bba1b2b947bb44fd9d9 (commit)
via fea3e84ee3670e2d6b333d844ea431cf6f193e67 (commit)
via 363d3962c476a6018c0be9fde18f347816034b97 (commit)
from d8cc11ea00615b8aed62d0cbe12ef602cd3aa1ae (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=7ac4f0ef2f2ab32f72f55bba1b2b947bb44fd9d9
commit 7ac4f0ef2f2ab32f72f55bba1b2b947bb44fd9d9
Merge: d8cc11e fea3e84
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 1 16:05:10 2011 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Dec 1 16:05:10 2011 -0500
Merge topic 'export-final-location' into next
fea3e84 export(): Document undefined behavior of location properties
363d396 Factor out target location undefined behavior helper macro
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fea3e84ee3670e2d6b333d844ea431cf6f193e67
commit fea3e84ee3670e2d6b333d844ea431cf6f193e67
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 1 15:41:19 2011 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 1 16:00:12 2011 -0500
export(): Document undefined behavior of location properties
Since the export() command needs to know the final location of a target
in the build tree we cannot allow properties affecting the location or
name of a target file to be set after the target is passed to export().
Fix a violation of this rule in the SimpleInstall test.
diff --git a/Source/cmExportCommand.h b/Source/cmExportCommand.h
index f33e9e2..eb19d2e 100644
--- a/Source/cmExportCommand.h
+++ b/Source/cmExportCommand.h
@@ -13,6 +13,7 @@
#define cmExportCommand_h
#include "cmCommand.h"
+#include "cmDocumentLocationUndefined.h"
class cmExportBuildFileGenerator;
@@ -80,6 +81,7 @@ public:
"should never be installed. "
"See the install(EXPORT) command to export targets from an "
"installation tree."
+ CM_LOCATION_UNDEFINED_BEHAVIOR("passing it to this command")
"\n"
" export(PACKAGE <name>)\n"
"Store the current build directory in the CMake user package registry "
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt
index 564db9f..378b529 100644
--- a/Tests/SimpleInstall/CMakeLists.txt
+++ b/Tests/SimpleInstall/CMakeLists.txt
@@ -173,6 +173,12 @@ ELSE(STAGE2)
TARGET_LINK_LIBRARIES(SimpleInstall test1 test2 test4)
SET(install_target SimpleInstall)
+ SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES OUTPUT_NAME SimpleInstExe)
+ # Disable VERSION test until it is implemented in the Xcode generator.
+ IF(NOT XCODE)
+ SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES VERSION 1.2)
+ ENDIF(NOT XCODE)
+
# Make sure the test executable can run from the install tree.
SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/MyTest/lib)
@@ -293,11 +299,6 @@ ELSE(STAGE2)
ADDITIONAL_MAKE_CLEAN_FILES
"${CMAKE_INSTALL_PREFIX}/InstallScriptOut.cmake;${CMAKE_INSTALL_PREFIX}/InstallScript4Out.cmake")
- SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES OUTPUT_NAME SimpleInstExe)
- # Disable VERSION test until it is implemented in the Xcode generator.
- IF(NOT XCODE)
- SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES VERSION 1.2)
- ENDIF(NOT XCODE)
SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES PRE_INSTALL_SCRIPT
${CMAKE_CURRENT_SOURCE_DIR}/PreInstall.cmake)
SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES POST_INSTALL_SCRIPT
diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt
index 564db9f..378b529 100644
--- a/Tests/SimpleInstallS2/CMakeLists.txt
+++ b/Tests/SimpleInstallS2/CMakeLists.txt
@@ -173,6 +173,12 @@ ELSE(STAGE2)
TARGET_LINK_LIBRARIES(SimpleInstall test1 test2 test4)
SET(install_target SimpleInstall)
+ SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES OUTPUT_NAME SimpleInstExe)
+ # Disable VERSION test until it is implemented in the Xcode generator.
+ IF(NOT XCODE)
+ SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES VERSION 1.2)
+ ENDIF(NOT XCODE)
+
# Make sure the test executable can run from the install tree.
SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/MyTest/lib)
@@ -293,11 +299,6 @@ ELSE(STAGE2)
ADDITIONAL_MAKE_CLEAN_FILES
"${CMAKE_INSTALL_PREFIX}/InstallScriptOut.cmake;${CMAKE_INSTALL_PREFIX}/InstallScript4Out.cmake")
- SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES OUTPUT_NAME SimpleInstExe)
- # Disable VERSION test until it is implemented in the Xcode generator.
- IF(NOT XCODE)
- SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES VERSION 1.2)
- ENDIF(NOT XCODE)
SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES PRE_INSTALL_SCRIPT
${CMAKE_CURRENT_SOURCE_DIR}/PreInstall.cmake)
SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES POST_INSTALL_SCRIPT
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=363d3962c476a6018c0be9fde18f347816034b97
commit 363d3962c476a6018c0be9fde18f347816034b97
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 1 15:41:01 2011 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 1 15:58:47 2011 -0500
Factor out target location undefined behavior helper macro
Move CM_LOCATION_UNDEFINED_BEHAVIOR into a dedicated header. Add a
parameter to describe the action that leads to the undefined target
location.
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 2aa32d8..b5115b7 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -162,6 +162,7 @@ SET(SRCS
cmDocumentationSection.cxx
cmDocumentCompileDefinitions.h
cmDocumentGeneratorExpressions.h
+ cmDocumentLocationUndefined.h
cmDocumentVariables.cxx
cmDynamicLoader.cxx
cmDynamicLoader.h
diff --git a/Source/cmDocumentLocationUndefined.h b/Source/cmDocumentLocationUndefined.h
new file mode 100644
index 0000000..d1be77a
--- /dev/null
+++ b/Source/cmDocumentLocationUndefined.h
@@ -0,0 +1,24 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#ifndef cmDocumentLocationUndefined_h
+#define cmDocumentLocationUndefined_h
+
+#define CM_LOCATION_UNDEFINED_BEHAVIOR(action) \
+ "\n" \
+ "Do not set properties that affect the location of a target after " \
+ action ". These include properties whose names match " \
+ "\"(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIRECTORY)(_<CONFIG>)?\" " \
+ "or \"(IMPLIB_)?(PREFIX|SUFFIX)\". " \
+ "Failure to follow this rule is not diagnosed and leaves the location " \
+ "of the target undefined."
+
+#endif
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index d021990..7e02a39 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -17,6 +17,7 @@
#include "cmGlobalGenerator.h"
#include "cmComputeLinkInformation.h"
#include "cmDocumentCompileDefinitions.h"
+#include "cmDocumentLocationUndefined.h"
#include "cmListFileCache.h"
#include "cmGeneratorExpression.h"
#include <cmsys/RegularExpression.hxx>
@@ -584,15 +585,6 @@ void cmTarget::DefineProperties(cmake *cm)
"value is the default. "
"See documentation of CMAKE_<LANG>_LINKER_PREFERENCE variables.");
-#define CM_LOCATION_UNDEFINED_BEHAVIOR \
- "\n" \
- "Do not set properties that affect the location of the target after " \
- "reading this property. These include properties whose names match " \
- "\"(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIRECTORY)(_<CONFIG>)?\" " \
- "or \"(IMPLIB_)?(PREFIX|SUFFIX)\". " \
- "Failure to follow this rule is not diagnosed and leaves the location " \
- "of the target undefined."
-
cm->DefineProperty
("LOCATION", cmProperty::TARGET,
"Read-only location of a target on disk.",
@@ -612,7 +604,7 @@ void cmTarget::DefineProperties(cmake *cm)
"In CMake 2.8.4 and above add_custom_command recognizes generator "
"expressions to refer to target locations anywhere in the command. "
"Therefore this property is not needed for creating custom commands."
- CM_LOCATION_UNDEFINED_BEHAVIOR);
+ CM_LOCATION_UNDEFINED_BEHAVIOR("reading this property"));
cm->DefineProperty
("LOCATION_<CONFIG>", cmProperty::TARGET,
@@ -626,7 +618,7 @@ void cmTarget::DefineProperties(cmake *cm)
"arbitrary available configuration. "
"Use the MAP_IMPORTED_CONFIG_<CONFIG> property to map imported "
"configurations explicitly."
- CM_LOCATION_UNDEFINED_BEHAVIOR);
+ CM_LOCATION_UNDEFINED_BEHAVIOR("reading this property"));
cm->DefineProperty
("LINK_DEPENDS", cmProperty::TARGET,
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeLists.txt | 1 +
Source/cmDocumentLocationUndefined.h | 24 ++++++++++++++++++++++++
Source/cmExportCommand.h | 2 ++
Source/cmTarget.cxx | 14 +++-----------
Tests/SimpleInstall/CMakeLists.txt | 11 ++++++-----
Tests/SimpleInstallS2/CMakeLists.txt | 11 ++++++-----
6 files changed, 42 insertions(+), 21 deletions(-)
create mode 100644 Source/cmDocumentLocationUndefined.h
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list