diff options
28 files changed, 173 insertions, 99 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e979d4f..19d83f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,12 @@ if(NOT DEFINED CMAKE_C_STANDARD AND NOT CMake_NO_C_STANDARD) set(CMAKE_C_STANDARD 11) endif() if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 14) + include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_cstdio.cmake) + if(NOT CMake_CXX14_CSTDIO_BROKEN) + set(CMAKE_CXX_STANDARD 14) + else() + set(CMAKE_CXX_STANDARD 11) + endif() endif() # option to set the internal encoding of CMake to UTF-8 diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 8a345b0..cc2fbb8 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -33,8 +33,10 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION "warning .980: wrong number of actual arguments to intrinsic function .std::basic_" "LINK : warning LNK4089: all references to.*ADVAPI32.dll.*discarded by /OPT:REF" "LINK : warning LNK4089: all references to.*PSAPI.DLL.*discarded by /OPT:REF" + "LINK : warning LNK4089: all references to.*RPCRT4.dll.*discarded by /OPT:REF" "LINK : warning LNK4089: all references to.*SHELL32.dll.*discarded by /OPT:REF" "LINK : warning LNK4089: all references to.*USER32.dll.*discarded by /OPT:REF" + "LINK : warning LNK4089: all references to.*ole32.dll.*discarded by /OPT:REF" "Warning: library was too large for page size.*" "Warning: public.*_archive_.*in module.*archive_*clashes with prior module.*archive_.*" "Warning: public.*BZ2_bz.*in module.*bzlib.*clashes with prior module.*bzlib.*" diff --git a/Help/command/file.rst b/Help/command/file.rst index 2fe7414..bbddd40 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -313,8 +313,12 @@ preserves input file timestamps, and optimizes out a file if it exists at the destination with the same timestamp. Copying preserves input permissions unless explicit permissions or ``NO_SOURCE_PERMISSIONS`` are given (default is ``USE_SOURCE_PERMISSIONS``). + See the :command:`install(DIRECTORY)` command for documentation of -permissions, ``PATTERN``, ``REGEX``, and ``EXCLUDE`` options. +permissions, ``FILES_MATCHING``, ``PATTERN``, ``REGEX``, and +``EXCLUDE`` options. Copying directories preserves the structure +of their content even if options are used to select a subset of +files. The ``INSTALL`` signature differs slightly from ``COPY``: it prints status messages (subject to the :variable:`CMAKE_INSTALL_MESSAGE` variable), diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst index 7f518a6..a5efba6 100644 --- a/Help/command/find_package.rst +++ b/Help/command/find_package.rst @@ -68,7 +68,7 @@ The complete Config mode command signature is:: [NO_CMAKE_PATH] [NO_SYSTEM_ENVIRONMENT_PATH] [NO_CMAKE_PACKAGE_REGISTRY] - [NO_CMAKE_BUILDS_PATH] + [NO_CMAKE_BUILDS_PATH] # Deprecated; does nothing. [NO_CMAKE_SYSTEM_PATH] [NO_CMAKE_SYSTEM_PACKAGE_REGISTRY] [CMAKE_FIND_ROOT_PATH_BOTH | @@ -265,20 +265,14 @@ enabled. PATH -5. Search project build trees recently configured in a :manual:`cmake-gui(1)`. - This can be skipped if ``NO_CMAKE_BUILDS_PATH`` is passed. It is intended - for the case when a user is building multiple dependent projects one - after another. - (This step is implemented only on Windows.) - -6. Search paths stored in the CMake :ref:`User Package Registry`. +5. Search paths stored in the CMake :ref:`User Package Registry`. This can be skipped if ``NO_CMAKE_PACKAGE_REGISTRY`` is passed or by setting the :variable:`CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY` to ``TRUE``. See the :manual:`cmake-packages(7)` manual for details on the user package registry. -7. Search cmake variables defined in the Platform files for the +6. Search cmake variables defined in the Platform files for the current system. This can be skipped if ``NO_CMAKE_SYSTEM_PATH`` is passed:: @@ -286,14 +280,14 @@ enabled. CMAKE_SYSTEM_FRAMEWORK_PATH CMAKE_SYSTEM_APPBUNDLE_PATH -8. Search paths stored in the CMake :ref:`System Package Registry`. +7. Search paths stored in the CMake :ref:`System Package Registry`. This can be skipped if ``NO_CMAKE_SYSTEM_PACKAGE_REGISTRY`` is passed or by setting the :variable:`CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY` to ``TRUE``. See the :manual:`cmake-packages(7)` manual for details on the system package registry. -9. Search paths specified by the ``PATHS`` option. These are typically +8. Search paths specified by the ``PATHS`` option. These are typically hard-coded guesses. .. |FIND_XXX| replace:: find_package diff --git a/Help/release/dev/find_package-no-cmake-gui-paths.rst b/Help/release/dev/find_package-no-cmake-gui-paths.rst new file mode 100644 index 0000000..3914559 --- /dev/null +++ b/Help/release/dev/find_package-no-cmake-gui-paths.rst @@ -0,0 +1,10 @@ +find_package-no-cmake-gui-paths +------------------------------- + +* The :command:`find_package` command no longer considers project + build trees recently configured in a :manual:`cmake-gui(1)`. + This was previously done only on Windows and is now never done. + The ``NO_CMAKE_BUILDS_PATH`` option is now ignored if given + and effectively always on. + Projects may populate the :ref:`User Package Registry` to aid + users building multiple dependent projects one after another. diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index e672e72..cb77fb8 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -1197,18 +1197,17 @@ function(cpack_rpm_generate_package) set(CPACK_RPM_COMPRESSION_TYPE_TMP "") endif() - if(CPACK_PACKAGE_RELOCATABLE) - set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE) - endif() - if(CPACK_RPM_PACKAGE_RELOCATABLE) + if(CPACK_PACKAGE_RELOCATABLE OR CPACK_RPM_PACKAGE_RELOCATABLE) if(CPACK_RPM_PACKAGE_DEBUG) message("CPackRPM:Debug: Trying to build a relocatable package") endif() if(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON")) message("CPackRPM:Warning: CPACK_SET_DESTDIR is set (=${CPACK_SET_DESTDIR}) while requesting a relocatable package (CPACK_RPM_PACKAGE_RELOCATABLE is set): this is not supported, the package won't be relocatable.") + set(CPACK_RPM_PACKAGE_RELOCATABLE FALSE) else() set(CPACK_RPM_PACKAGE_PREFIX ${CPACK_PACKAGING_INSTALL_PREFIX}) # kept for back compatibility (provided external RPM spec files) cpack_rpm_prepare_relocation_paths() + set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE) endif() endif() diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 97bebc0..7cf9d79 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1866,7 +1866,18 @@ function(_ep_add_download_command name) else() _ep_is_dir_empty("${source_dir}" empty) if(${empty}) - message(SEND_ERROR "error: no download info for '${name}' -- please specify existing/non-empty SOURCE_DIR or one of URL, CVS_REPOSITORY and CVS_MODULE, SVN_REPOSITORY, GIT_REPOSITORY, HG_REPOSITORY or DOWNLOAD_COMMAND") + message(SEND_ERROR + "No download info given for '${name}' and its source directory:\n" + " ${source_dir}\n" + "is not an existing non-empty directory. Please specify one of:\n" + " * SOURCE_DIR with an existing non-empty directory\n" + " * URL\n" + " * GIT_REPOSITORY\n" + " * HG_REPOSITORY\n" + " * CVS_REPOSITORY and CVS_MODULE\n" + " * SVN_REVISION\n" + " * DOWNLOAD_COMMAND" + ) endif() endif() diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake index 76f702e..ad0bf98 100644 --- a/Modules/FindFLTK.cmake +++ b/Modules/FindFLTK.cmake @@ -131,21 +131,6 @@ if(NOT FLTK_DIR) /usr/local/fltk /usr/X11R6/include - # Read from the CMakeSetup registry entries. It is likely that - # FLTK will have been recently built. - # TODO: Is this really a good idea? I can already hear the user screaming, "But - # it worked when I configured the build LAST week!" - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10] - # Help the user find it if we cannot. DOC "The ${FLTK_DIR_STRING}" ) diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake index 930acca..154729f 100644 --- a/Modules/FindFLTK2.cmake +++ b/Modules/FindFLTK2.cmake @@ -96,19 +96,6 @@ if(NOT FLTK2_DIR) /usr/local/fltk2 /usr/X11R6/include - # Read from the CMakeSetup registry entries. It is likely that - # FLTK2 will have been recently built. - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9] - [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10] - # Help the user find it if we cannot. DOC "The ${FLTK2_DIR_STRING}" ) diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake index c0d7d8c..b571b16 100644 --- a/Modules/Platform/Windows-GNU.cmake +++ b/Modules/Platform/Windows-GNU.cmake @@ -138,7 +138,7 @@ macro(__windows_compiler_gnu lang) endforeach() endif() - if(NOT CMAKE_RC_COMPILER_INIT) + if(NOT CMAKE_RC_COMPILER_INIT AND NOT CMAKE_GENERATOR_RC) set(CMAKE_RC_COMPILER_INIT windres) endif() diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 896aedc..cf7a523 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 2) -set(CMake_VERSION_PATCH 20150508) +set(CMake_VERSION_PATCH 20150512) #set(CMake_VERSION_RC 1) diff --git a/Source/Checks/cm_cxx14_cstdio.cmake b/Source/Checks/cm_cxx14_cstdio.cmake new file mode 100644 index 0000000..73f7e2e --- /dev/null +++ b/Source/Checks/cm_cxx14_cstdio.cmake @@ -0,0 +1,33 @@ +set(CMake_CXX14_CSTDIO_BROKEN 0) +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND CMAKE_CXX14_STANDARD_COMPILE_OPTION) + if(NOT DEFINED CMake_CXX14_CSTDIO_WORKS) + message(STATUS "Checking if compiler supports C++14 cstdio") + try_compile(CMake_CXX14_CSTDIO_WORKS + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_LIST_DIR}/cm_cxx14_cstdio.cpp + CMAKE_FLAGS -DCMAKE_CXX_STANDARD=14 + OUTPUT_VARIABLE OUTPUT + ) + if(CMake_CXX14_CSTDIO_WORKS AND "${OUTPUT}" MATCHES "error: no member named.*gets.*in the global namespace") + set_property(CACHE CMake_CXX14_CSTDIO_WORKS PROPERTY VALUE 0) + endif() + if(CMake_CXX14_CSTDIO_WORKS) + message(STATUS "Checking if compiler supports C++14 cstdio - yes") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if compiler supports C++14 cstdio passed with the following output:\n" + "${OUTPUT}\n" + "\n" + ) + else() + message(STATUS "Checking if compiler supports C++14 cstdio - no") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if compiler supports C++14 cstdio failed with the following output:\n" + "${OUTPUT}\n" + "\n" + ) + endif() + endif() + if(NOT CMake_CXX14_CSTDIO_WORKS) + set(CMake_CXX14_CSTDIO_BROKEN 1) + endif() +endif() diff --git a/Source/Checks/cm_cxx14_cstdio.cpp b/Source/Checks/cm_cxx14_cstdio.cpp new file mode 100644 index 0000000..3a6a699 --- /dev/null +++ b/Source/Checks/cm_cxx14_cstdio.cpp @@ -0,0 +1,2 @@ +#include <cstdio> +int main() { return 0; } diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 4d568e9..68a6558 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -42,7 +42,6 @@ cmFindPackageCommand::cmFindPackageCommand() this->Required = false; this->NoUserRegistry = false; this->NoSystemRegistry = false; - this->NoBuilds = false; this->UseConfigFiles = true; this->UseFindModules = true; this->DebugMode = false; @@ -246,7 +245,7 @@ bool cmFindPackageCommand } else if(args[i] == "NO_CMAKE_BUILDS_PATH") { - this->NoBuilds = true; + // Ignore legacy option. configArgs.insert(i); doing = DoingNone; } @@ -1142,10 +1141,6 @@ void cmFindPackageCommand::ComputePrefixes() { this->FillPrefixesUserRegistry(); } - if(!this->NoBuilds) - { - this->FillPrefixesBuilds(); - } if(!this->NoCMakeSystemPath) { this->FillPrefixesCMakeSystemVariable(); @@ -1438,29 +1433,6 @@ bool cmFindPackageCommand::CheckPackageRegistryEntry(const std::string& fname, } //---------------------------------------------------------------------------- -void cmFindPackageCommand::FillPrefixesBuilds() -{ - cmSearchPath &paths = this->LabeledPaths[PathLabel::Builds]; - - // It is likely that CMake will have recently built the project. - for(int i=0; i <= 10; ++i) - { - std::ostringstream r; - r << - "[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\" - "Settings\\StartPath;WhereBuild" << i << "]"; - std::string f = r.str(); - cmSystemTools::ExpandRegistryValues(f); - cmSystemTools::ConvertToUnixSlashes(f); - if(cmSystemTools::FileIsFullPath(f.c_str()) && - cmSystemTools::FileIsDirectory(f)) - { - paths.AddPath(f); - } - } -} - -//---------------------------------------------------------------------------- void cmFindPackageCommand::FillPrefixesCMakeSystemVariable() { cmSearchPath &paths = this->LabeledPaths[PathLabel::CMakeSystem]; diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 949dcb1..3eee404 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -89,7 +89,6 @@ private: void FillPrefixesSystemEnvironment(); void FillPrefixesUserRegistry(); void FillPrefixesSystemRegistry(); - void FillPrefixesBuilds(); void FillPrefixesCMakeSystemVariable(); void FillPrefixesUserGuess(); void FillPrefixesUserHints(); @@ -138,7 +137,6 @@ private: bool UseFindModules; bool NoUserRegistry; bool NoSystemRegistry; - bool NoBuilds; bool DebugMode; bool UseLib64Paths; bool PolicyScope; diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 4c51d23..771ecc4 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -565,7 +565,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() vars["TARGET_PDB"] = base + suffix + dbg_suffix; } - if (mf->IsOn("CMAKE_COMPILER_IS_MINGW")) + if (this->GetGlobalGenerator()->IsGCCOnWindows()) { const std::string objPath = GetTarget()->GetSupportDirectory(); vars["OBJECT_DIR"] = ConvertToNinjaPath(objPath); diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 9657ada..b61e3af 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -112,6 +112,22 @@ if(BUILD_TESTING) set(RPMBUILD_EXECUTABLE "RPMBUILD_EXECUTABLE-NOTFOUND") endif() + if(RPMBUILD_EXECUTABLE) + set(CPACK_BINARY_RPM ON) + else() + set(CPACK_BINARY_RPM OFF) + endif() + + # Look for rpmbuild to use for tests. + # The tool does not work with spaces in the path. + find_program(DPKG_EXECUTABLE NAMES dpkg) + + if(DPKG_EXECUTABLE) + set(CPACK_BINARY_DEB ON) + else() + set(CPACK_BINARY_DEB OFF) + endif() + #--------------------------------------------------------------------------- # Add tests below here. @@ -865,11 +881,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release set(CTEST_RUN_CPackComponentsForAll ${CTEST_TEST_CPACK}) set(CTEST_RUN_CPackComponentsPrefix ${CTEST_TEST_CPACK}) - # Do not try to build RPM - if (NOT RPMBUILD_EXECUTABLE) - set(CPACK_BINARY_RPM OFF) - endif() - find_program(NSIS_MAKENSIS_EXECUTABLE NAMES makensis PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS] DOC "makensis program location" @@ -948,13 +959,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(CTEST_RUN_CPackComponentsForAll) # Check whether if rpmbuild command is found # before adding RPM tests - if(RPMBUILD_EXECUTABLE) + if(CPACK_BINARY_RPM) list(APPEND ACTIVE_CPACK_GENERATORS RPM) endif() # Check whether if dpkg command is found # before adding DEB tests - find_program(DPKG_EXECUTABLE NAMES dpkg) - if(DPKG_EXECUTABLE) + if(CPACK_BINARY_DEB) list(APPEND ACTIVE_CPACK_GENERATORS DEB) endif() @@ -962,17 +972,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release # now contains the list of 'active generators' set(CPackComponentsForAll_BUILD_OPTIONS) # set up list of CPack generators - list(APPEND GENLST "ZIP") + list(APPEND ACTIVE_CPACK_GENERATORS "ZIP") if(APPLE) - list(APPEND GENLST "DragNDrop") - endif() - list(FIND ACTIVE_CPACK_GENERATORS "RPM" RPM_ACTIVE) - if (NOT ${RPM_ACTIVE} EQUAL -1) - list(APPEND GENLST "RPM") - endif() - list(FIND ACTIVE_CPACK_GENERATORS "DEB" DEB_ACTIVE) - if (NOT ${DEB_ACTIVE} EQUAL -1) - list(APPEND GENLST "DEB") + list(APPEND ACTIVE_CPACK_GENERATORS "DragNDrop") endif() # set up list of component packaging ways @@ -980,7 +982,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release list(APPEND CWAYLST "OnePackPerGroup") list(APPEND CWAYLST "IgnoreGroup") list(APPEND CWAYLST "AllInOne") - foreach(CPackGen ${GENLST}) + foreach(CPackGen IN LISTS ACTIVE_CPACK_GENERATORS) set(CPackRun_CPackGen "-DCPackGen=${CPackGen}") foreach(CPackComponentWay ${CWAYLST}) set(CPackRun_CPackComponentWay "-DCPackComponentWay=${CPackComponentWay}") diff --git a/Tests/CPackComponentsPrefix/CMakeLists.txt b/Tests/CPackComponentsPrefix/CMakeLists.txt index 207dae8..581d3b3 100644 --- a/Tests/CPackComponentsPrefix/CMakeLists.txt +++ b/Tests/CPackComponentsPrefix/CMakeLists.txt @@ -6,6 +6,7 @@ install(FILES file-runtime.txt install(FILES file-development.txt DESTINATION lib COMPONENT Development) +set(CPACK_PACKAGE_CONTACT "None") # mandatory for DEB generator set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 1) set(CPACK_COMPONENTS_ALL Development) set(CPACK_ARCHIVE_COMPONENT_INSTALL 1) diff --git a/Tests/RunCMake/ExternalProject/NoOptions-result.txt b/Tests/RunCMake/ExternalProject/NoOptions-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/ExternalProject/NoOptions-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt b/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt new file mode 100644 index 0000000..12a76c5 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt @@ -0,0 +1,18 @@ +^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): + No download info given for 'MyProj' and its source directory: + + .*/Tests/RunCMake/ExternalProject/NoOptions-build/MyProj-prefix/src/MyProj + + is not an existing non-empty directory. Please specify one of: + + \* SOURCE_DIR with an existing non-empty directory + \* URL + \* GIT_REPOSITORY + \* HG_REPOSITORY + \* CVS_REPOSITORY and CVS_MODULE + \* SVN_REVISION + \* DOWNLOAD_COMMAND +Call Stack \(most recent call first\): + .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_download_command\) + NoOptions.cmake:[0-9]+ \(ExternalProject_Add\) + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/ExternalProject/NoOptions.cmake b/Tests/RunCMake/ExternalProject/NoOptions.cmake new file mode 100644 index 0000000..7613c15 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/NoOptions.cmake @@ -0,0 +1,2 @@ +include(ExternalProject) +ExternalProject_Add(MyProj) diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake index a82ffc9..e038409 100644 --- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake @@ -1,5 +1,8 @@ include(RunCMake) +run_cmake(NoOptions) +run_cmake(SourceEmpty) +run_cmake(SourceMissing) run_cmake(CMAKE_CACHE_ARGS) run_cmake(CMAKE_CACHE_DEFAULT_ARGS) run_cmake(CMAKE_CACHE_mix) diff --git a/Tests/RunCMake/ExternalProject/SourceEmpty-result.txt b/Tests/RunCMake/ExternalProject/SourceEmpty-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/ExternalProject/SourceEmpty-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt b/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt new file mode 100644 index 0000000..58a343c --- /dev/null +++ b/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt @@ -0,0 +1,18 @@ +^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): + No download info given for 'MyProj' and its source directory: + + .*/Tests/RunCMake/ExternalProject/SourceEmpty-build/SourceEmpty + + is not an existing non-empty directory. Please specify one of: + + \* SOURCE_DIR with an existing non-empty directory + \* URL + \* GIT_REPOSITORY + \* HG_REPOSITORY + \* CVS_REPOSITORY and CVS_MODULE + \* SVN_REVISION + \* DOWNLOAD_COMMAND +Call Stack \(most recent call first\): + .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_download_command\) + SourceEmpty.cmake:[0-9]+ \(ExternalProject_Add\) + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/ExternalProject/SourceEmpty.cmake b/Tests/RunCMake/ExternalProject/SourceEmpty.cmake new file mode 100644 index 0000000..db746e9 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/SourceEmpty.cmake @@ -0,0 +1,5 @@ +include(ExternalProject) +set(source_dir "${CMAKE_CURRENT_BINARY_DIR}/SourceEmpty") +file(REMOVE_RECURSE "${source_dir}") +file(MAKE_DIRECTORY "${source_dir}") +ExternalProject_Add(MyProj SOURCE_DIR "${source_dir}") diff --git a/Tests/RunCMake/ExternalProject/SourceMissing-result.txt b/Tests/RunCMake/ExternalProject/SourceMissing-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/ExternalProject/SourceMissing-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt b/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt new file mode 100644 index 0000000..e62f7cf --- /dev/null +++ b/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt @@ -0,0 +1,18 @@ +^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): + No download info given for 'MyProj' and its source directory: + + .*/Tests/RunCMake/ExternalProject/SourceMissing-build/SourceMissing + + is not an existing non-empty directory. Please specify one of: + + \* SOURCE_DIR with an existing non-empty directory + \* URL + \* GIT_REPOSITORY + \* HG_REPOSITORY + \* CVS_REPOSITORY and CVS_MODULE + \* SVN_REVISION + \* DOWNLOAD_COMMAND +Call Stack \(most recent call first\): + .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_download_command\) + SourceMissing.cmake:[0-9]+ \(ExternalProject_Add\) + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/ExternalProject/SourceMissing.cmake b/Tests/RunCMake/ExternalProject/SourceMissing.cmake new file mode 100644 index 0000000..8f369d4 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/SourceMissing.cmake @@ -0,0 +1,2 @@ +include(ExternalProject) +ExternalProject_Add(MyProj SOURCE_DIR SourceMissing) |