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 1bf070ea14b1dfab4d70b1debbd9e5d6b9c2fcb9 (commit) via 80e652f5cc279715ff57e1c64c6e5c460b201db4 (commit) via 43558156d451b605bb9a3d14d53a3896ea98d73a (commit) from 14668d1346619005d94b3c1777acb85abb0a4a57 (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=1bf070ea14b1dfab4d70b1debbd9e5d6b9c2fcb9 commit 1bf070ea14b1dfab4d70b1debbd9e5d6b9c2fcb9 Merge: 14668d1 80e652f Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Wed Jul 31 18:41:06 2013 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Jul 31 18:41:06 2013 -0400 Merge topic 'INCLUDES-DESTINATION-no-config' into next 80e652f Export: Process generator expressions from INCLUDES DESTINATION. 4355815 cmTarget: Add NAME property http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80e652f5cc279715ff57e1c64c6e5c460b201db4 commit 80e652f5cc279715ff57e1c64c6e5c460b201db4 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Wed Jul 31 16:40:35 2013 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Thu Aug 1 00:37:25 2013 +0200 Export: Process generator expressions from INCLUDES DESTINATION. Configuration sensitive expressions are not permitted. diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 5b351bc..ef336ea 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -287,11 +287,33 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( const char *propName = "INTERFACE_INCLUDE_DIRECTORIES"; const char *input = target->GetProperty(propName); - if (!input && tei->InterfaceIncludeDirectories.empty()) + + cmListFileBacktrace lfbt; + cmGeneratorExpression ge(lfbt); + + std::string dirs = tei->InterfaceIncludeDirectories; + this->ReplaceInstallPrefix(dirs); + cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(dirs); + std::string exportDirs = cge->Evaluate(target->GetMakefile(), 0, + false, target); + + if (cge->GetHadContextSensitiveCondition()) + { + cmMakefile* mf = target->GetMakefile(); + cmOStringStream e; + e << "Target \"" << target->GetName() << "\" is installed with " + "INCLUDES DESTINATION set to a context sensitive path. Paths which " + "depend on the configuration, policy values or the link interface are " + "not supported. Consider using target_include_directories instead."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } + + if (!input && exportDirs.empty()) { return; } - if ((input && !*input) && tei->InterfaceIncludeDirectories.empty()) + if ((input && !*input) && exportDirs.empty()) { // Set to empty properties[propName] = ""; @@ -300,7 +322,7 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( std::string includes = (input?input:""); const char* sep = input ? ";" : ""; - includes += sep + tei->InterfaceIncludeDirectories; + includes += sep + exportDirs; std::string prepro = cmGeneratorExpression::Preprocess(includes, preprocessRule, true); diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 1910f8c..b5b2027 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -99,7 +99,6 @@ macro(add_include_lib _libName) set_property(TARGET ${_libName} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/${_libName}>" - "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/${_libName}>" ) if (NOT "${ARGV1}" STREQUAL "NO_HEADER") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${_libName}/${_libName}.h" "// no content\n") @@ -188,8 +187,7 @@ install(FILES DESTINATION include/testSharedLibRequired ) set_property(TARGET testSharedLibRequired APPEND PROPERTY - INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/testSharedLibRequired>" - "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>" + INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>" ) set_property(TARGET testSharedLibRequired APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS USING_TESTSHAREDLIBREQUIRED @@ -273,18 +271,24 @@ set_property(TARGET cmp0022OLD APPEND PROPERTY LINK_INTERFACE_LIBRARIES testLib3 add_library(noIncludesInterface empty.cpp) install(TARGETS testLibRequired - testLibIncludeRequired1 - testLibIncludeRequired2 - testLibIncludeRequired3 - testLibIncludeRequired4 - testLibIncludeRequired5 - testLibIncludeRequired6 - testSharedLibRequired - noIncludesInterface EXPORT RequiredExp DESTINATION lib INCLUDES DESTINATION installIncludesTest - $<INSTALL_PREFIX>/installIncludesTest2) + $<INSTALL_PREFIX>/installIncludesTest2 + ) +install(TARGETS + testLibIncludeRequired1 + testLibIncludeRequired2 + testLibIncludeRequired3 + testLibIncludeRequired4 + testLibIncludeRequired5 + testLibIncludeRequired6 + testSharedLibRequired + noIncludesInterface + EXPORT RequiredExp DESTINATION lib + INCLUDES DESTINATION + $<INSTALL_PREFIX>/include/$<TARGET_PROPERTY:NAME> +) install(EXPORT RequiredExp NAMESPACE Req:: FILE testLibRequiredTargets.cmake DESTINATION lib/cmake/testLibRequired) file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest") diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake b/Tests/RunCMake/include_directories/RunCMakeTest.cmake index 520dd44..f0704f4 100644 --- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake +++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake @@ -9,3 +9,4 @@ run_cmake(RelativePathInInterface) run_cmake(ImportedTarget) run_cmake(RelativePathInGenex) run_cmake(CMP0021) +run_cmake(install_config) diff --git a/Tests/RunCMake/include_directories/install_config-result.txt b/Tests/RunCMake/include_directories/install_config-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/include_directories/install_config-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/include_directories/install_config-stderr.txt b/Tests/RunCMake/include_directories/install_config-stderr.txt new file mode 100644 index 0000000..ac7b7b0 --- /dev/null +++ b/Tests/RunCMake/include_directories/install_config-stderr.txt @@ -0,0 +1,5 @@ +CMake Error in CMakeLists.txt: + Target "foo" is installed with INCLUDES DESTINATION set to a context + sensitive path. Paths which depend on the configuration, policy values or + the link interface are not supported. Consider using + target_include_directories instead. diff --git a/Tests/RunCMake/include_directories/install_config.cmake b/Tests/RunCMake/include_directories/install_config.cmake new file mode 100644 index 0000000..46c626c --- /dev/null +++ b/Tests/RunCMake/include_directories/install_config.cmake @@ -0,0 +1,6 @@ + +enable_language(CXX) + +add_executable(foo empty.cpp) +install(TARGETS foo EXPORT fooTargets DESTINATION . INCLUDES DESTINATION include/$<CONFIGURATION>) +install(EXPORT fooTargets DESTINATION lib/cmake) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=43558156d451b605bb9a3d14d53a3896ea98d73a commit 43558156d451b605bb9a3d14d53a3896ea98d73a Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Wed Jul 31 13:16:29 2013 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Thu Aug 1 00:36:11 2013 +0200 cmTarget: Add NAME property In generator expression contexts, this can be used to determine the name of the head target in the evaluation. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 560f07c..667c685 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -945,6 +945,11 @@ void cmTarget::DefineProperties(cmake *cm) "OSX_ARCHITECTURES."); cm->DefineProperty + ("NAME", cmProperty::TARGET, + "Logical name for the target.", + "Read-only logical name for the target as used by CMake."); + + cm->DefineProperty ("EXPORT_NAME", cmProperty::TARGET, "Exported name for target files.", "This sets the name for the IMPORTED target generated when it this " @@ -2971,7 +2976,13 @@ void cmTarget::SetProperty(const char* prop, const char* value) { return; } - + if (strcmp(prop, "NAME") == 0) + { + cmOStringStream e; + e << "NAME property is read-only\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str().c_str()); + return; + } if(strcmp(prop,"INCLUDE_DIRECTORIES") == 0) { cmListFileBacktrace lfbt; @@ -3038,6 +3049,13 @@ void cmTarget::AppendProperty(const char* prop, const char* value, { return; } + if (strcmp(prop, "NAME") == 0) + { + cmOStringStream e; + e << "NAME property is read-only\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str().c_str()); + return; + } if(strcmp(prop,"INCLUDE_DIRECTORIES") == 0) { cmListFileBacktrace lfbt; @@ -4053,6 +4071,11 @@ const char *cmTarget::GetProperty(const char* prop, return 0; } + if (strcmp(prop, "NAME") == 0) + { + return this->GetName(); + } + // Watch for special "computed" properties that are dependent on // other properties or variables. Always recompute them. if(this->GetType() == cmTarget::EXECUTABLE || ----------------------------------------------------------------------- Summary of changes: Source/cmExportFileGenerator.cxx | 28 +++++++++++++++++-- Source/cmTarget.cxx | 25 +++++++++++++++++- Tests/ExportImport/Export/CMakeLists.txt | 28 +++++++++++-------- .../include_directories/RunCMakeTest.cmake | 1 + .../install_config-result.txt} | 0 .../include_directories/install_config-stderr.txt | 5 +++ .../include_directories/install_config.cmake | 6 ++++ 7 files changed, 77 insertions(+), 16 deletions(-) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => include_directories/install_config-result.txt} (100%) create mode 100644 Tests/RunCMake/include_directories/install_config-stderr.txt create mode 100644 Tests/RunCMake/include_directories/install_config.cmake hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits