diff options
-rw-r--r-- | Modules/CMakeDetermineCCompiler.cmake | 2 | ||||
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 2 | ||||
-rw-r--r-- | Modules/CMakeFindEclipseCDT4.cmake | 2 | ||||
-rw-r--r-- | Modules/Compiler/IAR.cmake | 5 | ||||
-rw-r--r-- | Modules/ExternalProject.cmake | 30 | ||||
-rw-r--r-- | Modules/FindHDF5.cmake | 4 | ||||
-rw-r--r-- | Modules/FindMatlab.cmake | 6 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmExtraCodeBlocksGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 4 | ||||
-rw-r--r-- | Source/cmExtraSublimeTextGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.cxx | 2 | ||||
-rw-r--r-- | Tests/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Tests/CPackComponents/Issue 7470.html | 4 | ||||
-rw-r--r-- | Tests/CTestLimitDashJ/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/ExternalProjectSourceSubdir/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/ExternalProjectSourceSubdir/Example/subdir/CMakeLists.txt | 2 |
17 files changed, 71 insertions, 24 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index 73d9fb3..c566f39 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -105,7 +105,7 @@ if(NOT CMAKE_C_COMPILER_ID_RUN) CMAKE_C_COMPILER_ID_PLATFORM_CONTENT) # The IAR compiler produces weird output. - # See https://cmake.org/Bug/view.php?id=10176#c19598 + # See https://gitlab.kitware.com/cmake/cmake/issues/10176#note_153591 list(APPEND CMAKE_C_COMPILER_ID_VENDORS IAR) set(CMAKE_C_COMPILER_ID_VENDOR_FLAGS_IAR ) set(CMAKE_C_COMPILER_ID_VENDOR_REGEX_IAR "IAR .+ Compiler") diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 063b68e..fb4155b 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -97,7 +97,7 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN) CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT) # The IAR compiler produces weird output. - # See https://cmake.org/Bug/view.php?id=10176#c19598 + # See https://gitlab.kitware.com/cmake/cmake/issues/10176#note_153591 list(APPEND CMAKE_CXX_COMPILER_ID_VENDORS IAR) set(CMAKE_CXX_COMPILER_ID_VENDOR_FLAGS_IAR ) set(CMAKE_CXX_COMPILER_ID_VENDOR_REGEX_IAR "IAR .+ Compiler") diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake index 5bf738a..e158a73 100644 --- a/Modules/CMakeFindEclipseCDT4.cmake +++ b/Modules/CMakeFindEclipseCDT4.cmake @@ -35,7 +35,7 @@ function(_FIND_ECLIPSE_VERSION) if(NOT DEFINED CMAKE_ECLIPSE_VERSION) if(CMAKE_ECLIPSE_EXECUTABLE) - # use REALPATH to resolve symlinks (http://public.kitware.com/Bug/view.php?id=13036) + # use REALPATH to resolve symlinks (https://gitlab.kitware.com/cmake/cmake/issues/13036) get_filename_component(_REALPATH_CMAKE_ECLIPSE_EXECUTABLE "${CMAKE_ECLIPSE_EXECUTABLE}" REALPATH) get_filename_component(_ECLIPSE_DIR "${_REALPATH_CMAKE_ECLIPSE_EXECUTABLE}" PATH) file(GLOB _ECLIPSE_FEATURE_DIR "${_ECLIPSE_DIR}/features/org.eclipse.platform*") diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake index 8c6c3f6..8c45276 100644 --- a/Modules/Compiler/IAR.cmake +++ b/Modules/Compiler/IAR.cmake @@ -1,6 +1,6 @@ # This file is processed when the IAR compiler is used for a C or C++ file # Documentation can be downloaded here: http://www.iar.com/website1/1.0.1.0/675/1/ -# The initial feature request is here: https://cmake.org/Bug/view.php?id=10176 +# The initial feature request is here: https://gitlab.kitware.com/cmake/cmake/issues/10176 # It also contains additional links and information. if(_IAR_CMAKE_LOADED) @@ -39,7 +39,8 @@ endif() if(NOT IAR_TARGET_ARCHITECTURE) message(FATAL_ERROR "The IAR compiler for this architecture is not yet supported " - " by CMake. Please go to https://cmake.org/Bug and enter a feature request there.") + "by CMake. Please go to https://gitlab.kitware.com/cmake/cmake/issues " + "and enter a feature request there.") endif() set(CMAKE_LINKER "${CMAKE_IAR_LINKER}" CACHE FILEPATH "The IAR linker" FORCE) diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index fc01976..5ea309f 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -98,6 +98,8 @@ Create custom targets to build projects in external trees ``SOURCE_DIR <dir>`` Source dir to be used for build + ``SOURCE_SUBDIR <dir>`` + Path to source CMakeLists.txt relative to ``SOURCE_DIR`` ``CONFIGURE_COMMAND <cmd>...`` Build tree configuration command ``CMAKE_COMMAND /.../cmake`` @@ -236,6 +238,11 @@ Create custom targets to build projects in external trees interpreted with respect to the build directory corresponding to the source directory in which ``ExternalProject_Add`` is invoked. + If ``SOURCE_SUBDIR`` is set and no ``CONFIGURE_COMMAND`` is specified, the + configure command will run CMake using the ``CMakeLists.txt`` located in the + relative path specified by ``SOURCE_SUBDIR``, relative to the ``SOURCE_DIR``. + If no ``SOURCE_SUBDIR`` is given, ``SOURCE_DIR`` is used. + If ``SOURCE_DIR`` is explicitly set to an existing directory the project will be built from it. Otherwise a download step must be specified using one of the ``DOWNLOAD_COMMAND``, ``CVS_*``, ``SVN_*``, or ``URL`` @@ -287,8 +294,8 @@ Create custom targets to build projects in external trees The command line, comment, working directory, and byproducts of every standard and custom step are processed to replace tokens ``<SOURCE_DIR>``, - ``<BINARY_DIR>``, ``<INSTALL_DIR>``, and ``<TMP_DIR>`` with - corresponding property values. + ``<SOURCE_SUBDIR>``, ``<BINARY_DIR>``, ``<INSTALL_DIR>``, and ``<TMP_DIR>`` + with corresponding property values. Any builtin step that specifies a ``<step>_COMMAND cmd...`` or custom step that specifies a ``COMMAND cmd...`` may specify additional command @@ -1065,6 +1072,13 @@ function(_ep_set_directories name) endif() set_property(TARGET ${name} PROPERTY _EP_${VAR}_DIR "${${var}_dir}") endforeach() + get_property(source_subdir TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR) + if(NOT source_subdir) + set_property(TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR ".") + elseif(IS_ABSOLUTE "${source_subdir}") + message(FATAL_ERROR + "External project ${name} has non-relative SOURCE_SUBDIR!") + endif() if(build_in_source) get_property(source_dir TARGET ${name} PROPERTY _EP_SOURCE_DIR) set_property(TARGET ${name} PROPERTY _EP_BINARY_DIR "${source_dir}") @@ -1096,7 +1110,7 @@ macro(_ep_replace_location_tags target_name) set(vars ${ARGN}) foreach(var ${vars}) if(${var}) - foreach(dir SOURCE_DIR BINARY_DIR INSTALL_DIR TMP_DIR DOWNLOADED_FILE) + foreach(dir SOURCE_DIR SOURCE_SUBDIR BINARY_DIR INSTALL_DIR TMP_DIR DOWNLOADED_FILE) get_property(val TARGET ${target_name} PROPERTY _EP_${dir}) string(REPLACE "<${dir}>" "${val}" ${var} "${${var}}") endforeach() @@ -2148,7 +2162,7 @@ endfunction() # TODO: Make sure external projects use the proper compiler function(_ep_add_configure_command name) - ExternalProject_Get_Property(${name} source_dir binary_dir tmp_dir) + ExternalProject_Get_Property(${name} source_dir source_subdir binary_dir tmp_dir) # Depend on other external projects (file-level). set(file_deps) @@ -2226,12 +2240,16 @@ function(_ep_add_configure_command name) endif() endif() - list(APPEND cmd "${source_dir}") + if(source_subdir STREQUAL ".") + list(APPEND cmd "${source_dir}") + else() + list(APPEND cmd "${source_dir}/${source_subdir}") + endif() endif() # If anything about the configure command changes, (command itself, cmake # used, cmake args or cmake generator) then re-run the configure step. - # Fixes issue http://public.kitware.com/Bug/view.php?id=10258 + # Fixes issue https://gitlab.kitware.com/cmake/cmake/issues/10258 # if(NOT EXISTS ${tmp_dir}/${name}-cfgcmd.txt.in) file(WRITE ${tmp_dir}/${name}-cfgcmd.txt.in "cmd='\@cmd\@'\n") diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index a898386..5e0996c 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -639,7 +639,7 @@ if( NOT HDF5_FOUND ) if(UNIX AND HDF5_USE_STATIC_LIBRARIES) # According to bug 1643 on the CMake bug tracker, this is the # preferred method for searching for a static library. - # See https://cmake.org/Bug/view.php?id=1643. We search + # See https://gitlab.kitware.com/cmake/cmake/issues/1643. We search # first for the full static library name, but fall back to a # generic search on the name if the static search fails. set( THIS_LIBRARY_SEARCH_DEBUG @@ -676,7 +676,7 @@ if( NOT HDF5_FOUND ) if(UNIX AND HDF5_USE_STATIC_LIBRARIES) # According to bug 1643 on the CMake bug tracker, this is the # preferred method for searching for a static library. - # See https://cmake.org/Bug/view.php?id=1643. We search + # See https://gitlab.kitware.com/cmake/cmake/issues/1643. We search # first for the full static library name, but fall back to a # generic search on the name if the static search fails. set( THIS_LIBRARY_SEARCH_DEBUG diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 956dad2..46285aa 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -1287,7 +1287,11 @@ set(Matlab_EXTERN_LIBRARY_DIR ${Matlab_ROOT_DIR}/extern/lib/${_matlab_bin_prefix}${_matlab_current_suffix}) if(WIN32) - set(_matlab_lib_dir_for_search ${Matlab_EXTERN_LIBRARY_DIR}/microsoft) + if(MINGW) + set(_matlab_lib_dir_for_search ${Matlab_EXTERN_LIBRARY_DIR}/mingw64) + else() + set(_matlab_lib_dir_for_search ${Matlab_EXTERN_LIBRARY_DIR}/microsoft) + endif() set(_matlab_lib_prefix_for_search "lib") else() set(_matlab_lib_dir_for_search ${Matlab_BINARIES_DIR}) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 8d950fd..ac1ae03 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 6) -set(CMake_VERSION_PATCH 20160816) +set(CMake_VERSION_PATCH 20160817) #set(CMake_VERSION_RC 1) diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 3a9bb9b..0ded17a 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -750,7 +750,7 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand( if (generator == "NMake Makefiles") { // For Windows ConvertToOutputPath already adds quotes when required. // These need to be escaped, see - // http://public.kitware.com/Bug/view.php?id=13952 + // https://gitlab.kitware.com/cmake/cmake/issues/13952 std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile); command += " /NOLOGO /f "; command += makefileName; @@ -758,7 +758,7 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand( command += target; } else if (generator == "MinGW Makefiles") { // no escaping of spaces in this case, see - // http://public.kitware.com/Bug/view.php?id=10014 + // https://gitlab.kitware.com/cmake/cmake/issues/10014 std::string makefileName = makefile; command += " -f \""; command += makefileName; diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 8091bcf..7a277c0 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -404,8 +404,8 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() if (this->IsOutOfSourceBuild) { // create a linked resource to CMAKE_SOURCE_DIR // (this is not done anymore for each project because of - // http://public.kitware.com/Bug/view.php?id=9978 and because I found it - // actually quite confusing in bigger projects with many directories and + // https://gitlab.kitware.com/cmake/cmake/issues/9978 and because I found + // it actually quite confusing in bigger projects with many directories and // projects, Alex std::string sourceLinkedResourceName = "[Source directory]"; diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index b6bad60..5c909c8 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -302,7 +302,7 @@ std::string cmExtraSublimeTextGenerator::BuildMakeCommand( std::string makefileName; if (generator == "MinGW Makefiles") { // no escaping of spaces in this case, see - // http://public.kitware.com/Bug/view.php?id=10014 + // https://gitlab.kitware.com/cmake/cmake/issues/10014 makefileName = makefile; } else { makefileName = cmSystemTools::ConvertToOutputPath(makefile); diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 7efb333..28bd992 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -126,7 +126,7 @@ static void GetCompileDefinitionsAndDirectories( std::vector<std::string> includeDirs; cmLocalGenerator* localGen = target->GetLocalGenerator(); // Get the include dirs for this target, without stripping the implicit - // include dirs off, see http://public.kitware.com/Bug/view.php?id=13667 + // include dirs off, see https://gitlab.kitware.com/cmake/cmake/issues/13667 localGen->GetIncludeDirectories(includeDirs, target, "CXX", config, false); incs = cmJoin(includeDirs, ";"); diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 2d234db..6f1805b 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1464,6 +1464,18 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ExternalProjectSubdir") + add_test(NAME ExternalProjectSourceSubdir + COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/ExternalProjectSourceSubdir" + "${CMake_BINARY_DIR}/Tests/ExternalProjectSourceSubdir" + ${build_generator_args} + --build-project ExternalProjectSourceSubdir + --force-new-ctest-process + --build-options ${build_options} + ) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ExternalProjectSourceSubdir") + add_test(ExternalProjectLocal ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/ExternalProjectLocal" diff --git a/Tests/CPackComponents/Issue 7470.html b/Tests/CPackComponents/Issue 7470.html index 12df2c8..c2a1688 100644 --- a/Tests/CPackComponents/Issue 7470.html +++ b/Tests/CPackComponents/Issue 7470.html @@ -3,7 +3,7 @@ The install rule for this file demonstrates the problem described in<br/> CMake issue #7470:<br/> <br/> -<a href="http://public.kitware.com/Bug/view.php?id=7470"> -http://public.kitware.com/Bug/view.php?id=7470</a><br/> +<a href="https://gitlab.kitware.com/cmake/cmake/issues/7470"> +https://gitlab.kitware.com/cmake/cmake/issues/7470</a><br/> </body> </html> diff --git a/Tests/CTestLimitDashJ/CMakeLists.txt b/Tests/CTestLimitDashJ/CMakeLists.txt index 0c5950c..92d743f 100644 --- a/Tests/CTestLimitDashJ/CMakeLists.txt +++ b/Tests/CTestLimitDashJ/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.8) project(CTestLimitDashJ NONE) -# This file demonstrates http://public.kitware.com/Bug/view.php?id=12904 +# This file demonstrates https://gitlab.kitware.com/cmake/cmake/issues/12904 # when configured with CMake 2.8.10.2 and earlier, and when running # "ctest -j 4" in the resulting build tree. This example is hard-coded # to assume -j 4 just to reproduce the issue easily. Adjust the diff --git a/Tests/ExternalProjectSourceSubdir/CMakeLists.txt b/Tests/ExternalProjectSourceSubdir/CMakeLists.txt new file mode 100644 index 0000000..4688acf --- /dev/null +++ b/Tests/ExternalProjectSourceSubdir/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.6) +project(ExternalProjectSourceSubdir NONE) +include(ExternalProject) + +ExternalProject_Add(Example + SOURCE_SUBDIR subdir + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Example + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/Example + INSTALL_COMMAND "" + ) diff --git a/Tests/ExternalProjectSourceSubdir/Example/subdir/CMakeLists.txt b/Tests/ExternalProjectSourceSubdir/Example/subdir/CMakeLists.txt new file mode 100644 index 0000000..bbc3ca0 --- /dev/null +++ b/Tests/ExternalProjectSourceSubdir/Example/subdir/CMakeLists.txt @@ -0,0 +1,2 @@ +cmake_minimum_required(VERSION 3.0) +project(empty) |