summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeDetermineSystem.cmake6
-rw-r--r--Modules/FindQt4.cmake16
-rw-r--r--Modules/GetPrerequisites.cmake56
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CTest/cmCTestGIT.cxx4
-rw-r--r--Source/cmComputeLinkInformation.cxx2
-rw-r--r--Source/cmDocumentGeneratorExpressions.h1
-rw-r--r--Source/cmGeneratorExpression.cxx12
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx18
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx2
-rw-r--r--Source/cmTarget.cxx13
-rw-r--r--Source/cmTarget.h2
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt2
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/consumer.cpp8
-rw-r--r--Tests/CMakeCommands/target_include_directories/CMakeLists.txt6
-rw-r--r--Tests/CMakeCommands/target_link_libraries/CMakeLists.txt8
-rw-r--r--Tests/CMakeLists.txt1
-rw-r--r--Tests/CTestUpdateGIT.cmake.in10
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt2
19 files changed, 93 insertions, 78 deletions
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index c7f9c32..20c1541 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -73,7 +73,11 @@ if(CMAKE_HOST_UNIX)
else()
if(CMAKE_HOST_WIN32)
set (CMAKE_HOST_SYSTEM_NAME "Windows")
- set (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITECTURE}")
+ if (ENV{PROCESSOR_ARCHITEW6432})
+ set (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITEW6432}")
+ else()
+ set (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITECTURE}")
+ endif()
endif()
endif()
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 078c031..f25e121 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -965,13 +965,17 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
macro(_qt4_add_target_depends_internal _QT_MODULE _PROPERTY)
if (TARGET Qt4::${_QT_MODULE})
foreach(_DEPEND ${ARGN})
- if (NOT TARGET Qt4::Qt${_DEPEND})
- message(FATAL_ERROR "_qt4_add_target_depends invoked with invalid arguments")
+ set(_VALID_DEPENDS)
+ if (TARGET Qt4::Qt${_DEPEND})
+ list(APPEND _VALID_DEPENDS Qt4::Qt${_DEPEND})
endif()
- set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
- ${_PROPERTY}
- "Qt4::Qt${_DEPEND}"
- )
+ if (_VALID_DEPENDS)
+ set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
+ ${_PROPERTY}
+ "${_VALID_DEPENDS}"
+ )
+ endif()
+ set(_VALID_DEPENDS)
endforeach()
endif()
endmacro()
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 8f2754e..18f449d 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -5,6 +5,7 @@
#
# It uses various tools to obtain the list of required shared library files:
# dumpbin (Windows)
+# objdump (MinGW on Windows)
# ldd (Linux/Unix)
# otool (Mac OSX)
# The following functions are provided by this module:
@@ -567,6 +568,17 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
message("warning: target '${target}' does not exist...")
endif()
+ set(gp_cmd_paths ${gp_cmd_paths}
+ "C:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
+ "C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
+ "C:/Program Files/Microsoft Visual Studio 8/VC/BIN"
+ "C:/Program Files (x86)/Microsoft Visual Studio 8/VC/BIN"
+ "C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/BIN"
+ "C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/BIN"
+ "/usr/local/bin"
+ "/usr/bin"
+ )
+
# <setup-gp_tool-vars>
#
# Try to choose the right tool by default. Caller can set gp_tool prior to
@@ -574,14 +586,28 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
#
if("${gp_tool}" STREQUAL "")
set(gp_tool "ldd")
+
if(APPLE)
set(gp_tool "otool")
endif()
+
if(WIN32 AND NOT UNIX) # This is how to check for cygwin, har!
- set(gp_tool "dumpbin")
+ find_program(gp_dumpbin "dumpbin" PATHS ${gp_cmd_paths})
+ if(gp_dumpbin)
+ set(gp_tool "dumpbin")
+ else() # Try harder. Maybe we're on MinGW
+ set(gp_tool "objdump")
+ endif()
endif()
endif()
+ find_program(gp_cmd ${gp_tool} PATHS ${gp_cmd_paths})
+
+ if(NOT gp_cmd)
+ message(STATUS "warning: could not find '${gp_tool}' - cannot analyze prerequisites...")
+ return()
+ endif()
+
set(gp_tool_known 0)
if("${gp_tool}" STREQUAL "ldd")
@@ -612,30 +638,22 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
set(ENV{VS_UNICODE_OUTPUT} "") # Block extra output from inside VS IDE.
endif()
+ if("${gp_tool}" STREQUAL "objdump")
+ set(gp_cmd_args "-p")
+ set(gp_regex "^\t*DLL Name: (.*\\.[Dd][Ll][Ll])${eol_char}$")
+ set(gp_regex_error "")
+ set(gp_regex_fallback "")
+ set(gp_regex_cmp_count 1)
+ set(gp_tool_known 1)
+ endif()
+
if(NOT gp_tool_known)
message(STATUS "warning: gp_tool='${gp_tool}' is an unknown tool...")
message(STATUS "CMake function get_prerequisites needs more code to handle '${gp_tool}'")
- message(STATUS "Valid gp_tool values are dumpbin, ldd and otool.")
+ message(STATUS "Valid gp_tool values are dumpbin, ldd, objdump and otool.")
return()
endif()
- set(gp_cmd_paths ${gp_cmd_paths}
- "C:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
- "C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
- "C:/Program Files/Microsoft Visual Studio 8/VC/BIN"
- "C:/Program Files (x86)/Microsoft Visual Studio 8/VC/BIN"
- "C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/BIN"
- "C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/BIN"
- "/usr/local/bin"
- "/usr/bin"
- )
-
- find_program(gp_cmd ${gp_tool} PATHS ${gp_cmd_paths})
-
- if(NOT gp_cmd)
- message(STATUS "warning: could not find '${gp_tool}' - cannot analyze prerequisites...")
- return()
- endif()
if("${gp_tool}" STREQUAL "dumpbin")
# When running dumpbin, it also needs the "Common7/IDE" directory in the
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 33dd6a2..34c0bc3 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 10)
-set(CMake_VERSION_TWEAK 20130304)
+set(CMake_VERSION_TWEAK 20130305)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index 2c1a0af..5b34491 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -68,7 +68,7 @@ std::string cmCTestGIT::GetWorkingRevision()
{
// Run plumbing "git rev-list" to get work tree revision.
const char* git = this->CommandLineTool.c_str();
- const char* git_rev_list[] = {git, "rev-list", "-n", "1", "HEAD", 0};
+ const char* git_rev_list[] = {git, "rev-list", "-n", "1", "HEAD", "--", 0};
std::string rev;
OneLineParser out(this, "rl-out> ", rev);
OutputLogger err(this->Log, "rl-err> ");
@@ -639,7 +639,7 @@ void cmCTestGIT::LoadModifications()
this->RunChild(git_update_index, &ui_out, &ui_err);
// Use 'git diff-index' to get modified files.
- const char* git_diff_index[] = {git, "diff-index", "-z", "HEAD", 0};
+ const char* git_diff_index[] = {git, "diff-index", "-z", "HEAD", "--", 0};
DiffParser out(this, "di-out> ");
OutputLogger err(this->Log, "di-err> ");
this->RunChild(git_diff_index, &out, &err);
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 84714f3..896b50a 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1816,7 +1816,7 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
(outputRuntime && this->Target->HaveInstallTreeRPATH() &&
linking_for_install);
bool use_build_rpath =
- (outputRuntime && this->Target->HaveBuildTreeRPATH() &&
+ (outputRuntime && this->Target->HaveBuildTreeRPATH(this->Config) &&
!linking_for_install);
bool use_link_rpath =
outputRuntime && linking_for_install &&
diff --git a/Source/cmDocumentGeneratorExpressions.h b/Source/cmDocumentGeneratorExpressions.h
index 8b80a8a..76a60c3 100644
--- a/Source/cmDocumentGeneratorExpressions.h
+++ b/Source/cmDocumentGeneratorExpressions.h
@@ -37,7 +37,6 @@
"target in the same buildsystem. Expands to the empty string " \
"otherwise.\n" \
" $<TARGET_FILE:tgt> = main file (.exe, .so.1.2, .a)\n" \
- " $<TARGET_DEFINED:tgt> = '1' if tgt is a target, else '0'\n" \
" $<TARGET_LINKER_FILE:tgt> = file used to link (.a, .lib, .so)\n" \
" $<TARGET_SONAME_FILE:tgt> = file with soname (.so.3)\n" \
"where \"tgt\" is the name of a target. " \
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 34d80ec..7ea58fa 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -302,12 +302,20 @@ void cmGeneratorExpression::Split(const std::string &input,
if (!part.empty())
{
std::string::size_type startPos = input.rfind(";", pos);
- if (startPos != pos - 1 && startPos >= lastPos)
+ if (startPos == std::string::npos)
+ {
+ preGenex = part;
+ part = "";
+ }
+ else if (startPos != pos - 1 && startPos >= lastPos)
{
part = input.substr(lastPos, startPos - lastPos);
preGenex = input.substr(startPos + 1, pos - startPos - 1);
}
- cmSystemTools::ExpandListArgument(part.c_str(), output);
+ if(!part.empty())
+ {
+ cmSystemTools::ExpandListArgument(part.c_str(), output);
+ }
}
pos += 2;
int nestingLevel = 1;
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 63d4126..e2d8777 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -291,22 +291,6 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
} configurationTestNode;
-static const struct TargetDefinedNode : public cmGeneratorExpressionNode
-{
- TargetDefinedNode() {}
-
- virtual int NumExpectedParameters() const { return 1; }
-
- std::string Evaluate(const std::vector<std::string> &parameters,
- cmGeneratorExpressionContext *context,
- const GeneratorExpressionContent *,
- cmGeneratorExpressionDAGChecker *) const
- {
- return context->Makefile->FindTargetToUse(parameters.front().c_str())
- ? "1" : "0";
- }
-} targetDefinedNode;
-
//----------------------------------------------------------------------------
static const char* targetPropertyTransitiveWhitelist[] = {
"INTERFACE_INCLUDE_DIRECTORIES"
@@ -969,8 +953,6 @@ cmGeneratorExpressionNode* GetNode(const std::string &identifier)
return &buildInterfaceNode;
else if (identifier == "INSTALL_INTERFACE")
return &installInterfaceNode;
- else if (identifier == "TARGET_DEFINED")
- return &targetDefinedNode;
else if (identifier == "INSTALL_PREFIX")
return &installPrefixNode;
return 0;
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index fbddc53..2222a0e 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2110,6 +2110,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
debugStr = "NO";
}
+ buildSettings->AddAttribute("COMBINE_HIDPI_IMAGES",
+ this->CreateString("YES"));
buildSettings->AddAttribute("GCC_GENERATE_DEBUGGING_SYMBOLS",
this->CreateString(debugStr));
buildSettings->AddAttribute("GCC_OPTIMIZATION_LEVEL",
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 717cfc8..f38b16e 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4253,10 +4253,15 @@ void cmTarget::SetPropertyDefault(const char* property,
}
//----------------------------------------------------------------------------
-bool cmTarget::HaveBuildTreeRPATH()
+bool cmTarget::HaveBuildTreeRPATH(const char *config)
{
- return (!this->GetPropertyAsBool("SKIP_BUILD_RPATH") &&
- !this->LinkLibraries.empty());
+ if (this->GetPropertyAsBool("SKIP_BUILD_RPATH"))
+ {
+ return false;
+ }
+ std::vector<std::string> libs;
+ this->GetDirectLinkLibraries(config, libs, this);
+ return !libs.empty();
}
//----------------------------------------------------------------------------
@@ -4327,7 +4332,7 @@ bool cmTarget::NeedRelinkBeforeInstall(const char* config)
// If either a build or install tree rpath is set then the rpath
// will likely change between the build tree and install tree and
// this target must be relinked.
- return this->HaveBuildTreeRPATH() || this->HaveInstallTreeRPATH();
+ return this->HaveBuildTreeRPATH(config) || this->HaveInstallTreeRPATH();
}
//----------------------------------------------------------------------------
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index e659baf..0e6dd42 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -401,7 +401,7 @@ public:
*/
bool NeedRelinkBeforeInstall(const char* config);
- bool HaveBuildTreeRPATH();
+ bool HaveBuildTreeRPATH(const char *config);
bool HaveInstallTreeRPATH();
/** Return true if builtin chrpath will work for this target */
diff --git a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
index 8a4437b..6d0e646 100644
--- a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
@@ -18,7 +18,5 @@ add_executable(consumer
target_compile_definitions(consumer
PRIVATE $<TARGET_PROPERTY:target_compile_definitions,INTERFACE_COMPILE_DEFINITIONS>
- $<$<TARGET_DEFINED:notdefined>:SHOULD_NOT_BE_DEFINED>
- $<$<TARGET_DEFINED:target_compile_definitions>:SHOULD_BE_DEFINED>
-DDASH_D_DEFINE
)
diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
index 1a46aa5..a391114 100644
--- a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
+++ b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
@@ -11,14 +11,6 @@
#error Expected MY_INTERFACE_DEFINE
#endif
-#ifdef SHOULD_NOT_BE_DEFINED
-#error Unexpected SHOULD_NOT_BE_DEFINED
-#endif
-
-#ifndef SHOULD_BE_DEFINED
-#error Expected SHOULD_BE_DEFINED
-#endif
-
#ifndef DASH_D_DEFINE
#error Expected DASH_D_DEFINE
#endif
diff --git a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
index c2da175..c03f0f8 100644
--- a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
@@ -30,12 +30,12 @@ target_include_directories(target_include_directories
PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/poison"
)
target_include_directories(target_include_directories
- BEFORE PUBLIC "$<$<TARGET_DEFINED:target_include_directories>:${CMAKE_CURRENT_BINARY_DIR}/cure>"
+ BEFORE PUBLIC "$<$<STREQUAL:$<TARGET_PROPERTY:target_include_directories,TYPE>,EXECUTABLE>:${CMAKE_CURRENT_BINARY_DIR}/cure>"
)
-# Has no effect because the target is not defined:
+# Has no effect because the target type is not SHARED_LIBRARY:
target_include_directories(target_include_directories
- BEFORE PUBLIC "$<$<TARGET_DEFINED:notdefined>:${CMAKE_CURRENT_BINARY_DIR}/poison>"
+ BEFORE PUBLIC "$<$<STREQUAL:$<TARGET_PROPERTY:target_include_directories,TYPE>,SHARED_LIBRARY>:${CMAKE_CURRENT_BINARY_DIR}/poison>"
)
add_executable(consumer
diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
index 19ee59f..b13c13d 100644
--- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
@@ -103,7 +103,7 @@ target_compile_definitions(depG INTERFACE
)
add_executable(targetC targetC.cpp)
-# Creates a generator expression for include directories like
-# $<$<TARGET_DEFINED:$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:depG>>:\
-# $<TARGET_PROPERTY:$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:depG>,INTERFACE_INCLUDE_DIRECTORIES>>
-target_link_libraries(targetC $<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:depG>)
+# The TARGET_PROPERTY expression is duplicated below to test that there is no
+# shortcutting of the evaluation by returning an empty string.
+set(_exe_test $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>)
+target_link_libraries(targetC $<$<AND:${_exe_test},${_exe_test}>:depG>)
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 13c2aad..8c7b87c 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -287,6 +287,7 @@ if(BUILD_TESTING)
# run test for BundleUtilities on supported platforms/compilers
if(MSVC OR
+ MINGW OR
CMAKE_SYSTEM_NAME MATCHES "Linux" OR
CMAKE_SYSTEM_NAME MATCHES "Darwin")
if(NOT "${CMAKE_TEST_GENERATOR}" STREQUAL "Watcom WMake")
diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in
index 0c01291..f6939de 100644
--- a/Tests/CTestUpdateGIT.cmake.in
+++ b/Tests/CTestUpdateGIT.cmake.in
@@ -76,6 +76,8 @@ run_child(WORKING_DIRECTORY ${TOP}/module
# Import initial content into the repository.
message("Importing content...")
create_content(import)
+file(WRITE ${TOP}/import/HEAD "HEAD\n")
+file(WRITE ${TOP}/import/master "master\n")
# Import the content into the repository.
run_child(WORKING_DIRECTORY ${TOP}/import
@@ -157,19 +159,19 @@ update_content(user-source files_added files_removed dirs_added)
if(dirs_added)
run_child(
WORKING_DIRECTORY ${TOP}/user-source
- COMMAND ${GIT} add ${dirs_added}
+ COMMAND ${GIT} add -- ${dirs_added}
)
endif()
run_child(
WORKING_DIRECTORY ${TOP}/user-source
- COMMAND ${GIT} add ${files_added}
+ COMMAND ${GIT} add -- ${files_added}
)
run_child(
WORKING_DIRECTORY ${TOP}/user-source
- COMMAND ${GIT} rm ${files_removed}
+ COMMAND ${GIT} rm -- ${files_removed}
)
run_child(WORKING_DIRECTORY ${TOP}/user-source/module
- COMMAND ${GIT} checkout master
+ COMMAND ${GIT} checkout master --
)
run_child(
WORKING_DIRECTORY ${TOP}/user-source
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index ae938cd..c00ef82 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -149,7 +149,7 @@ set_property(TARGET testLibRequired APPEND PROPERTY
$<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired5,INTERFACE_INCLUDE_DIRECTORIES>>
$<INSTALL_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired6,INTERFACE_INCLUDE_DIRECTORIES>>
# Test that the below is non-fatal
- $<$<TARGET_DEFINED:not_a_target>:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>>
+ $<$<STREQUAL:one,two>:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>>
)
set_property(TARGET testLibRequired APPEND PROPERTY