summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/generator/MSYS Makefiles.rst10
-rw-r--r--Help/generator/MinGW Makefiles.rst11
-rw-r--r--Help/release/dev/install-EXPORT-absolute-prefix.rst9
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmExportInstallFileGenerator.cxx57
-rw-r--r--Source/cmExportInstallFileGenerator.h4
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx2
-rw-r--r--Source/cmTarget.cxx11
-rw-r--r--Source/kwsys/SharedForward.h.in16
-rw-r--r--Tests/CFBundleTest/VerifyResult.cmake9
-rw-r--r--Tests/CMakeLists.txt5
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt15
-rw-r--r--Tests/ExportImport/Export/include/abs/1a/testLibAbs1a.h1
-rw-r--r--Tests/ExportImport/Export/include/abs/1b/testLibAbs1b.h1
-rw-r--r--Tests/ExportImport/Export/include/abs/testLibAbs1.h1
-rw-r--r--Tests/ExportImport/Export/testLibAbs1.c1
-rw-r--r--Tests/ExportImport/Import/A/CMakeLists.txt10
-rw-r--r--Tests/ExportImport/Import/A/imp_testExeAbs1.c15
-rw-r--r--Utilities/Release/dash2win64_release.cmake7
-rw-r--r--Utilities/Release/dashmacmini5_release.cmake11
-rwxr-xr-xbootstrap2
21 files changed, 129 insertions, 71 deletions
diff --git a/Help/generator/MSYS Makefiles.rst b/Help/generator/MSYS Makefiles.rst
index 0b89126..f7cfa44 100644
--- a/Help/generator/MSYS Makefiles.rst
+++ b/Help/generator/MSYS Makefiles.rst
@@ -1,7 +1,11 @@
MSYS Makefiles
--------------
-Generates MSYS makefiles.
+Generates makefiles for use with MSYS ``make`` under the MSYS shell.
-The makefiles use /bin/sh as the shell. They require msys to be
-installed on the machine.
+Use this generator in a MSYS shell prompt and using ``make`` as the build
+tool. The generated makefiles use ``/bin/sh`` as the shell to launch build
+rules. They are not compatible with a Windows command prompt.
+
+To build under a Windows command prompt, use the
+:generator:`MinGW Makefiles` generator.
diff --git a/Help/generator/MinGW Makefiles.rst b/Help/generator/MinGW Makefiles.rst
index ed4ccdd..9fe5fe3 100644
--- a/Help/generator/MinGW Makefiles.rst
+++ b/Help/generator/MinGW Makefiles.rst
@@ -1,7 +1,12 @@
MinGW Makefiles
---------------
-Generates a make file for use with mingw32-make.
+Generates makefiles for use with ``mingw32-make`` under a Windows command
+prompt.
-The makefiles generated use cmd.exe as the shell. They do not require
-msys or a unix shell.
+Use this generator under a Windows command prompt with MinGW in the ``PATH``
+and using ``mingw32-make`` as the build tool. The generated makefiles use
+``cmd.exe`` as the shell to launch build rules. They are not compatible with
+MSYS or a unix shell.
+
+To build under the MSYS shell, use the :generator:`MSYS Makefiles` generator.
diff --git a/Help/release/dev/install-EXPORT-absolute-prefix.rst b/Help/release/dev/install-EXPORT-absolute-prefix.rst
new file mode 100644
index 0000000..1b2a01c
--- /dev/null
+++ b/Help/release/dev/install-EXPORT-absolute-prefix.rst
@@ -0,0 +1,9 @@
+install-EXPORT-absolute-prefix
+------------------------------
+
+* The :command:`install(EXPORT)` command now works with an absolute
+ ``DESTINATION`` even if targets in the export set are installed
+ with a destination or usage requirements specified relative to the
+ install prefix. The value of the :variable:`CMAKE_INSTALL_PREFIX`
+ variable is hard-coded into the installed export file as the base
+ for relative references.
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 0c23b82..a33b82997 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 1)
-set(CMake_VERSION_PATCH 20141218)
+set(CMake_VERSION_PATCH 20141222)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 23180f1..3f5866a 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -69,13 +69,24 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
this->GenerateExpectedTargetsCode(os, expectedTargets);
}
- // Add code to compute the installation prefix relative to the
- // import file location.
+ // Set an _IMPORT_PREFIX variable for import location properties
+ // to reference if they are relative to the install prefix.
+ std::string installPrefix =
+ this->IEGen->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_PREFIX");
const char* installDest = this->IEGen->GetDestination();
- if(!cmSystemTools::FileIsFullPath(installDest))
+ if(cmSystemTools::FileIsFullPath(installDest))
{
- std::string installPrefix =
- this->IEGen->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_PREFIX");
+ // The export file is being installed to an absolute path so the
+ // package is not relocatable. Use the configured install prefix.
+ os <<
+ "# The installation prefix configured by this project.\n"
+ "set(_IMPORT_PREFIX \"" << installPrefix << "\")\n"
+ "\n";
+ }
+ else
+ {
+ // Add code to compute the installation prefix relative to the
+ // import file location.
std::string absDest = installPrefix + "/" + installDest;
std::string absDestS = absDest + "/";
os << "# Compute the installation prefix relative to this file.\n"
@@ -106,9 +117,6 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
dest = cmSystemTools::GetFilenamePath(dest);
}
os << "\n";
-
- // Import location properties may reference this variable.
- this->ImportPrefix = "${_IMPORT_PREFIX}/";
}
std::vector<std::string> missingTargets;
@@ -209,12 +217,9 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
<< "\n";
// Cleanup the import prefix variable.
- if(!this->ImportPrefix.empty())
- {
- os << "# Cleanup temporary variables.\n"
- << "set(_IMPORT_PREFIX)\n"
- << "\n";
- }
+ os << "# Cleanup temporary variables.\n"
+ << "set(_IMPORT_PREFIX)\n"
+ << "\n";
this->GenerateImportedFileCheckLoop(os);
bool result = true;
@@ -394,11 +399,7 @@ cmExportInstallFileGenerator
if(!cmSystemTools::FileIsFullPath(dest.c_str()))
{
// The target is installed relative to the installation prefix.
- if(this->ImportPrefix.empty())
- {
- this->ComplainAboutImportPrefix(itgen);
- }
- value = this->ImportPrefix;
+ value = "${_IMPORT_PREFIX}/";
}
value += dest;
value += "/";
@@ -508,24 +509,6 @@ cmExportInstallFileGenerator
return namespaces;
}
-
-//----------------------------------------------------------------------------
-void
-cmExportInstallFileGenerator
-::ComplainAboutImportPrefix(cmInstallTargetGenerator* itgen)
-{
- const char* installDest = this->IEGen->GetDestination();
- cmOStringStream e;
- e << "install(EXPORT \""
- << this->IEGen->GetExportSet()->GetName()
- << "\") given absolute "
- << "DESTINATION \"" << installDest << "\" but the export "
- << "references an installation of target \""
- << itgen->GetTarget()->GetName() << "\" which has relative "
- << "DESTINATION \"" << itgen->GetDestination() << "\".";
- cmSystemTools::Error(e.str().c_str());
-}
-
//----------------------------------------------------------------------------
void
cmExportInstallFileGenerator
diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h
index b851ad5..6f86ac9 100644
--- a/Source/cmExportInstallFileGenerator.h
+++ b/Source/cmExportInstallFileGenerator.h
@@ -83,14 +83,10 @@ protected:
std::set<std::string>& importedLocations
);
- void ComplainAboutImportPrefix(cmInstallTargetGenerator* itgen);
-
std::string InstallNameDir(cmTarget* target, const std::string& config);
cmInstallExportGenerator* IEGen;
- std::string ImportPrefix;
-
// The import file generated for each configuration.
std::map<std::string, std::string> ConfigImportFiles;
};
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index de6e915..6a480a9 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1925,7 +1925,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
{
buildSettings->AddAttribute("LIBRARY_STYLE",
this->CreateString("BUNDLE"));
- if (target.GetPropertyAsBool("BUNDLE"))
+ if (target.IsCFBundleOnApple())
{
// It turns out that a BUNDLE is basically the same
// in many ways as an application bundle, as far as
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 865a824..94a6de3 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4057,15 +4057,8 @@ void cmTarget::GetFullNameInternal(const std::string& config,
if(this->IsCFBundleOnApple())
{
- fw_prefix = this->GetOutputName(config, false);
- fw_prefix += ".";
- const char *ext = this->GetProperty("BUNDLE_EXTENSION");
- if (!ext)
- {
- ext = "bundle";
- }
- fw_prefix += ext;
- fw_prefix += "/Contents/MacOS/";
+ fw_prefix = this->GetCFBundleDirectory(config, false);
+ fw_prefix += "/";
targetPrefix = fw_prefix.c_str();
targetSuffix = 0;
}
diff --git a/Source/kwsys/SharedForward.h.in b/Source/kwsys/SharedForward.h.in
index c6f345f..f22fa58 100644
--- a/Source/kwsys/SharedForward.h.in
+++ b/Source/kwsys/SharedForward.h.in
@@ -65,6 +65,15 @@
See the comments below for specific explanations of each macro.
*/
+/* Disable -Wcast-qual warnings since they are too hard to fix in a
+ cross-platform way. */
+#if defined(__clang__) && defined(__has_warning)
+# if __has_warning("-Wcast-qual")
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wcast-qual"
+# endif
+#endif
+
/*--------------------------------------------------------------------------*/
/* Full path to the directory in which this executable is built. Do
@@ -917,6 +926,13 @@ static int @KWSYS_NAMESPACE@_shared_forward_to_real(int argc, char** argv_in)
return 1;
}
+/* Restore warning stack. */
+#if defined(__clang__) && defined(__has_warning)
+# if __has_warning("-Wcast-qual")
+# pragma clang diagnostic pop
+# endif
+#endif
+
#else
# error "@KWSYS_NAMESPACE@/SharedForward.h should be included only once."
#endif
diff --git a/Tests/CFBundleTest/VerifyResult.cmake b/Tests/CFBundleTest/VerifyResult.cmake
index e622900..e637bb1 100644
--- a/Tests/CFBundleTest/VerifyResult.cmake
+++ b/Tests/CFBundleTest/VerifyResult.cmake
@@ -14,13 +14,10 @@ message(STATUS "CTEST_CONFIGURATION_TYPE='${CTEST_CONFIGURATION_TYPE}'")
message(STATUS "dir='${dir}'")
message(STATUS "gen='${gen}'")
-if(gen MATCHES "Make" OR
- "${CTEST_CONFIGURATION_TYPE}" STREQUAL "" OR
- "${CTEST_CONFIGURATION_TYPE}" STREQUAL "." OR
- "${CTEST_CONFIGURATION_TYPE}" STREQUAL "NoConfig")
- set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest")
-else()
+if(gen STREQUAL "Xcode")
set(expected_filename "${dir}/${CTEST_CONFIGURATION_TYPE}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest")
+else()
+ set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest")
endif()
if(NOT EXISTS "${expected_filename}")
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 250e966..8528042 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1931,16 +1931,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest")
- add_test(CFBundleTest ${CMAKE_CTEST_COMMAND}
+ add_test(NAME CFBundleTest COMMAND ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/CFBundleTest"
"${CMake_BINARY_DIR}/Tests/CFBundleTest"
--build-two-config
${build_generator_args}
--build-project CFBundleTest
+ --build-config $<CONFIGURATION>
--build-options ${build_options}
--test-command
- ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=\${CTEST_CONFIGURATION_TYPE}
+ ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=$<CONFIGURATION>
-Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest
-Dgen=${CMAKE_GENERATOR}
-P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake)
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index febdfe6..e130eca 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -508,3 +508,18 @@ export(TARGETS testExe2 testLib4 testLib5 testLib6 testExe3 testExe2lib
)
add_subdirectory(Interface)
+
+#-----------------------------------------------------------------------------
+# Install export with absolute destination but relative pieces.
+add_library(testLibAbs1 STATIC testLibAbs1.c)
+target_include_directories(testLibAbs1 INTERFACE
+ "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/abs/1a;include/abs/1b>"
+ )
+install(
+ TARGETS testLibAbs1
+ EXPORT expAbs
+ ARCHIVE DESTINATION lib
+ INCLUDES DESTINATION include/abs
+ )
+install(DIRECTORY include/abs DESTINATION include)
+install(EXPORT expAbs NAMESPACE expAbs_ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/expAbs)
diff --git a/Tests/ExportImport/Export/include/abs/1a/testLibAbs1a.h b/Tests/ExportImport/Export/include/abs/1a/testLibAbs1a.h
new file mode 100644
index 0000000..4421227
--- /dev/null
+++ b/Tests/ExportImport/Export/include/abs/1a/testLibAbs1a.h
@@ -0,0 +1 @@
+#define testLibAbs1a
diff --git a/Tests/ExportImport/Export/include/abs/1b/testLibAbs1b.h b/Tests/ExportImport/Export/include/abs/1b/testLibAbs1b.h
new file mode 100644
index 0000000..00a2a29
--- /dev/null
+++ b/Tests/ExportImport/Export/include/abs/1b/testLibAbs1b.h
@@ -0,0 +1 @@
+#define testLibAbs1b
diff --git a/Tests/ExportImport/Export/include/abs/testLibAbs1.h b/Tests/ExportImport/Export/include/abs/testLibAbs1.h
new file mode 100644
index 0000000..19d80a5
--- /dev/null
+++ b/Tests/ExportImport/Export/include/abs/testLibAbs1.h
@@ -0,0 +1 @@
+extern int testLibAbs1(void);
diff --git a/Tests/ExportImport/Export/testLibAbs1.c b/Tests/ExportImport/Export/testLibAbs1.c
new file mode 100644
index 0000000..34aec75
--- /dev/null
+++ b/Tests/ExportImport/Export/testLibAbs1.c
@@ -0,0 +1 @@
+int testLibAbs1(void) { return 0; }
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index eb0bbf8..9450c82 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -96,6 +96,16 @@ foreach(c DEBUG RELWITHDEBINFO)
endforeach()
#-----------------------------------------------------------------------------
+include(${CMAKE_INSTALL_PREFIX}/lib/expAbs/expAbs.cmake)
+
+add_executable(imp_testExeAbs1
+ imp_testExeAbs1.c
+ )
+target_link_libraries(imp_testExeAbs1
+ expAbs_testLibAbs1
+ )
+
+#-----------------------------------------------------------------------------
# Create a custom target to generate a header for the libraries below.
# Drive the header generation through an indirect chain of imported
# target dependencies.
diff --git a/Tests/ExportImport/Import/A/imp_testExeAbs1.c b/Tests/ExportImport/Import/A/imp_testExeAbs1.c
new file mode 100644
index 0000000..069c3f0
--- /dev/null
+++ b/Tests/ExportImport/Import/A/imp_testExeAbs1.c
@@ -0,0 +1,15 @@
+#include "testLibAbs1.h"
+#include "testLibAbs1a.h"
+#include "testLibAbs1b.h"
+#ifndef testLibAbs1a
+# error "testLibAbs1a not defined"
+#endif
+#ifndef testLibAbs1b
+# error "testLibAbs1b not defined"
+#endif
+int main()
+{
+ return 0
+ + testLibAbs1()
+ ;
+}
diff --git a/Utilities/Release/dash2win64_release.cmake b/Utilities/Release/dash2win64_release.cmake
index 848e2f4..345870b 100644
--- a/Utilities/Release/dash2win64_release.cmake
+++ b/Utilities/Release/dash2win64_release.cmake
@@ -7,8 +7,13 @@ set(CPACK_BINARY_GENERATORS "NSIS ZIP")
set(CPACK_SOURCE_GENERATORS "ZIP")
set(MAKE_PROGRAM "make")
set(MAKE "${MAKE_PROGRAM} -j8")
+if(CMAKE_CREATE_VERSION STREQUAL "nightly")
+ set(CMAKE_USE_OPENSSL OFF)
+else()
+ set(CMAKE_USE_OPENSSL ON)
+endif()
set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_USE_OPENSSL:BOOL=ON
+CMAKE_USE_OPENSSL:BOOL=${CMAKE_USE_OPENSSL}
CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
CMAKE_Fortran_COMPILER:FILEPATH=FALSE
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
diff --git a/Utilities/Release/dashmacmini5_release.cmake b/Utilities/Release/dashmacmini5_release.cmake
index 6c9b8f4..910fcbd 100644
--- a/Utilities/Release/dashmacmini5_release.cmake
+++ b/Utilities/Release/dashmacmini5_release.cmake
@@ -8,16 +8,21 @@ set(MAKE "${MAKE_PROGRAM} -j5")
set(CPACK_BINARY_GENERATORS "DragNDrop TGZ TZ")
set(CPACK_SOURCE_GENERATORS "TGZ TZ")
set(CPACK_DMG_FORMAT "UDBZ") #build using bzip2 for smaller package size
+if(CMAKE_CREATE_VERSION STREQUAL "nightly")
+ set(CMAKE_USE_OPENSSL OFF)
+else()
+ set(CMAKE_USE_OPENSSL ON)
+endif()
set(INITIAL_CACHE "
-CMAKE_USE_OPENSSL:BOOL=ON
+CMAKE_USE_OPENSSL:BOOL=${CMAKE_USE_OPENSSL}
OPENSSL_CRYPTO_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libcrypto.a
OPENSSL_INCLUDE_DIR:PATH=/Users/kitware/openssl-1.0.1g-install/include
OPENSSL_SSL_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libssl.a
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_OSX_ARCHITECTURES:STRING=x86_64
-CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.5
+CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6
CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
-CPACK_SYSTEM_NAME:STRING=Darwin64-universal
+CPACK_SYSTEM_NAME:STRING=Darwin-x86_64
BUILD_QtDialog:BOOL=TRUE
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE
QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Support/qt-4.8.0/install/bin/qmake
diff --git a/bootstrap b/bootstrap
index 94bed0e..fe051e1 100755
--- a/bootstrap
+++ b/bootstrap
@@ -145,7 +145,7 @@ if ${cmake_system_linux}; then
cmake_machine_parisc=true
fi
elif ${cmake_system_hpux}; then
- if !(uname -m | grep ia64 >/dev/null 2>&1); then
+ if uname -m | grep ia64 >/dev/null 2>&1; then : ; else
cmake_machine_parisc=true
fi
fi