diff options
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/CPack/cmCPackDocumentVariables.cxx | 2 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 15 | ||||
-rw-r--r-- | Tests/IncludeDirectories/CMP0021/CMakeLists.txt | 14 | ||||
-rw-r--r-- | Tests/IncludeDirectories/CMP0021/includes/cmp0021/cmp0021.h | 2 | ||||
-rw-r--r-- | Tests/IncludeDirectories/CMP0021/main.cpp | 11 | ||||
-rw-r--r-- | Tests/IncludeDirectories/CMakeLists.txt | 4 |
7 files changed, 44 insertions, 6 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 02b6b0f..3db3d9e 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ set(CMake_VERSION_MAJOR 2) set(CMake_VERSION_MINOR 8) set(CMake_VERSION_PATCH 11) -set(CMake_VERSION_TWEAK 20130820) +set(CMake_VERSION_TWEAK 20130826) #set(CMake_VERSION_RC 1) diff --git a/Source/CPack/cmCPackDocumentVariables.cxx b/Source/CPack/cmCPackDocumentVariables.cxx index 1dfaaf9..8b16ae9 100644 --- a/Source/CPack/cmCPackDocumentVariables.cxx +++ b/Source/CPack/cmCPackDocumentVariables.cxx @@ -28,7 +28,7 @@ void cmCPackDocumentVariables::DefineVariables(cmake* cm) " the so-called top level directory. The purpose of" " is to include (set to 1 or ON or TRUE) the top level directory" " in the package or not (set to 0 or OFF or FALSE).\n" - "Each CPack generator as a built-in default value for this" + "Each CPack generator has a built-in default value for this" " variable. E.g. Archive generators (ZIP, TGZ, ...) includes" " the top level whereas RPM or DEB don't. The user may override" " the default value by setting this variable.\n" diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 13cd006..147c332 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1617,7 +1617,7 @@ void cmTarget::SetMakefile(cmMakefile* mf) this->IsApple = this->Makefile->IsOn("APPLE"); // Setup default property values. - this->SetPropertyDefault("INSTALL_NAME_DIR", ""); + this->SetPropertyDefault("INSTALL_NAME_DIR", 0); this->SetPropertyDefault("INSTALL_RPATH", ""); this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF"); this->SetPropertyDefault("SKIP_BUILD_RPATH", "OFF"); @@ -3303,7 +3303,10 @@ static void processIncludeDirectories(cmTarget *tgt, if (!noMessage) { tgt->GetMakefile()->IssueMessage(messageType, e.str().c_str()); - return; + if (messageType == cmake::FATAL_ERROR) + { + return; + } } } @@ -4567,6 +4570,10 @@ bool cmTarget::HasMacOSXRpath(const char* config) { install_name_is_rpath = true; } + else if(install_name && use_install_name) + { + return false; + } } else { @@ -5299,18 +5306,18 @@ std::string cmTarget::GetInstallNameDirForInstallTree() if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME")) { std::string dir; + const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR"); if(!this->Makefile->IsOn("CMAKE_SKIP_RPATH") && !this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH")) { - const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR"); if(install_name_dir && *install_name_dir) { dir = install_name_dir; dir += "/"; } } - if(dir.empty() && this->GetPropertyAsBool("MACOSX_RPATH")) + if(!install_name_dir && this->GetPropertyAsBool("MACOSX_RPATH")) { dir = "@rpath/"; } diff --git a/Tests/IncludeDirectories/CMP0021/CMakeLists.txt b/Tests/IncludeDirectories/CMP0021/CMakeLists.txt new file mode 100644 index 0000000..0b9aee8 --- /dev/null +++ b/Tests/IncludeDirectories/CMP0021/CMakeLists.txt @@ -0,0 +1,14 @@ + +cmake_policy(SET CMP0021 OLD) +add_executable(cmp0021exe main.cpp) + +if(NOT CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/includes") + execute_process(COMMAND ${CMAKE_COMMAND} -E + copy_directory + "${CMAKE_CURRENT_SOURCE_DIR}/includes" + "${CMAKE_CURRENT_BINARY_DIR}/includes" + ) +endif() +set_property(TARGET cmp0021exe PROPERTY + INCLUDE_DIRECTORIES includes/cmp0021) diff --git a/Tests/IncludeDirectories/CMP0021/includes/cmp0021/cmp0021.h b/Tests/IncludeDirectories/CMP0021/includes/cmp0021/cmp0021.h new file mode 100644 index 0000000..3d49b31 --- /dev/null +++ b/Tests/IncludeDirectories/CMP0021/includes/cmp0021/cmp0021.h @@ -0,0 +1,2 @@ + +#define CMP0021_DEFINE diff --git a/Tests/IncludeDirectories/CMP0021/main.cpp b/Tests/IncludeDirectories/CMP0021/main.cpp new file mode 100644 index 0000000..f886c46 --- /dev/null +++ b/Tests/IncludeDirectories/CMP0021/main.cpp @@ -0,0 +1,11 @@ + +#include "cmp0021.h" + +#ifndef CMP0021_DEFINE +#error Expected CMP0021_DEFINE +#endif + +int main(int, char **) +{ + return 0; +} diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt index 596a280..35ad8dc 100644 --- a/Tests/IncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/CMakeLists.txt @@ -86,3 +86,7 @@ get_target_property(incs empty_entry_test INCLUDE_DIRECTORIES) if (NOT incs STREQUAL ";/one/two") message(SEND_ERROR "Empty include_directories entry was not ignored.") endif() + +if(NOT CMAKE_GENERATOR STREQUAL Xcode AND NOT CMAKE_GENERATOR STREQUAL Ninja) + add_subdirectory(CMP0021) +endif() |