1. 24 Feb, 2021 2 commits
  2. 22 Feb, 2021 6 commits
    • Brad King's avatar
      Tests: Suppress failures on macOS arm64 due to separate Xcode signing phase · 1c15eb39
      Brad King authored
      Some tests fail because Xcode runs `POST_BUILD` commands before signing
      the binaries they run.  Tell the linker to perform ad-hoc codesign even
      though Xcode normally tells it not to.
      
      Other tests fail because `install_name_tool` does not revise ad-hoc
      signatures without the codesign `linker-signed` flag.  Add that flag
      ourselves where needed by our tests.
      
      For now these changes help our test suite pass so we can use it to cover
      everything else.  Both of these cases may need further investigation to
      update CMake to help projects in general.
      
      Issue: #21845, #21854
      1c15eb39
    • Brad King's avatar
      92418ac0
    • Brad King's avatar
      Tests: Remove explicit no-signing marks from BundleTest · 8b22d9b3
      Brad King authored
      These were added by commit e29a92f5 (Xcode: Make BundleTests
      compatible with Xcode 11, 2019-09-01, v3.16.0-rc1~158^2).  The
      real problem is that the `.app` is constructed with text files
      under the `.app/Contents/MacOS/` folder.  Move those, and drop
      the special no-signing configuration.
      8b22d9b3
    • Brad King's avatar
    • Daan De Meyer's avatar
      Tests: Fix ExternalProject CONFIGURE_HANDLED_BY_BUILD on 1s filesystems · 74fe16a2
      Daan De Meyer authored
      Following commit 7155e358 (ExternalProject: Add CONFIGURE_HANDLED_BY_BUILD
      option, 2020-12-16, v3.20.0-rc1~168^2), modify the CONFIGURE_HANDLED_BY_BUILD
      test to sleep 1.125 seconds to make sure the file timestamp is always
      updated regardless of the resolution of the underlying filesystem.
      
      Fixes: #21830
      74fe16a2
    • Craig Scott's avatar
      FetchContent: Don't update timestamps if files don't change · b0da6712
      Craig Scott authored
      The refactoring in 17e5516e (FetchContent: Invoke steps directly and
      avoid a separate sub-build, 2021-01-29) uses a different way of writing
      out the step scripts and updating time stamps when steps are executed.
      That inadvertently always wrote out the scripts for custom commands,
      even when the contents didn't change. This caused their timestamp to
      always be updated, resulting in those steps always being seen as
      out-of-date and needing to be re-executed.
      
      The way timestamps were checked to determine whether to re-execute
      a step also did not adequately account for file systems which only have
      second-resolution timestamps. The IS_NEWER_THAN if condition also
      returns true when timestamps are the same, so one needs to use the
      negative form to get a true "is newer than" test.
      
      ExternalProject is not susceptible to this problem because it uses
      file(GENERATE) to write out the script files and that only updates the file's
      timestamp if the contents change. It also mostly leaves timestamp
      checking to the build tool.
      b0da6712
  3. 19 Feb, 2021 1 commit
  4. 17 Feb, 2021 1 commit
    • Craig Scott's avatar
      FetchContent: Restore patch command support · bd876f38
      Craig Scott authored
      The refactoring in 17e5516e (FetchContent: Invoke steps directly and
      avoid a separate sub-build, 2021-01-29) contained a typo which resulted
      in any PATCH_COMMAND being ignored. Fix the typo and add a test case
      that would have caught the regression.
      bd876f38
  5. 09 Feb, 2021 1 commit
  6. 08 Feb, 2021 1 commit
    • Craig Scott's avatar
      IOS_INSTALL_COMBINED: Support Xcode 12 (command line only) · 0110aa01
      Craig Scott authored
      Xcode 12 doesn't allow nested builds within the same build directory.
      That means we can no longer do an install by building the install target
      when IOS_INSTALL_COMBINED is true. We can, however, still do an install
      by running the cmake_install.cmake script or executing cmake --install,
      since there is no outer build and therefore the associated SDK can be
      built as a sub-build.
      
      The non-build methods previously didn't work when
      IOS_INSTALL_COMBINED was true because the generated install script
      and the CMakeIOSInstallCombined script both made certain assumptions
      that relied on being part of a build. Those assumptions are now
      removed. A side-effect of this work is that cpack now also works from the
      command line when IOS_INSTALL_COMBINED is true.
      
      Relates: #21282
      Fixes: #20023
      0110aa01
  7. 07 Feb, 2021 1 commit
  8. 05 Feb, 2021 2 commits
  9. 04 Feb, 2021 8 commits
    • Craig Scott's avatar
      FetchContent: Invoke steps directly and avoid a separate sub-build · 17e5516e
      Craig Scott authored
      The cost of setting up and executing a separate sub-build to do the
      download, update and patch steps required for FetchContent population
      can be significant with some platforms and CMake generators. Avoid the
      sub-build altogether by invoking the step scripts directly.
      
      Previously, if no generator was set (e.g. population was being done in
      script mode), a generator needed to be available on the default PATH.
      Since we no longer use a sub-build, this restriction is also now gone.
      
      Fixes: #21703
      17e5516e
    • Craig Scott's avatar
      ExternalProject: Refactor pre-configure steps to support no-target uses · 4f3d1abb
      Craig Scott authored
      The mkdir, download, update and patch steps are used by
      FetchContent during the configure phase of the main build. Because
      these steps need a target, this has so far required a sub-build to be
      set up. The changes here factor out the preparation of the scripts
      from the creation of the targets, allowing future work to leverage these
      steps without a sub-build (see #21703).
      
      As part of the refactoring, some rationalisation of the stamp files,
      repository info files and script names was done to make things more
      consistent between download methods and step implementations.
      Every download method now records its own specific repository info
      in a file and that file is a dependency of the download step. The source
      directory is also written to that file, so if the SOURCE_DIR changes, the
      download will be retriggered (the existing implementation fails in this
      scenario). Each download method now also has just one driver script
      that implements the whole step (it may pull in other scripts to do its
      task though). The patch step gained support for USES_TERMINAL as
      a result of generalising the implementation for custom commands.
      
      Fixes: #21748
      4f3d1abb
    • Robert Maynard's avatar
      CMakeDetermineCompilerABI: Parse library arch from versioned paths · 657fc3a9
      Robert Maynard authored
      Teach CMake how to extract `CMAKE_<LANG>_LIBRARY_ARCHITECTURE` from
      versioned paths such as `/usr/lib/gcc/x86_64-linux-gnu/9`. These kind of
      paths are generated by NVHPC compilers.
      657fc3a9
    • Sam Freed's avatar
      c8a5cd68
    • Sam Freed's avatar
      Tests: Update RunCMake/CommandLine BuildDir · 69a5cf23
      Sam Freed authored
      69a5cf23
    • Sam Freed's avatar
      Tests: Add test preset tests · b500935b
      Sam Freed authored
      b500935b
    • Sam Freed's avatar
      Tests: Add build preset tests · 74a86566
      Sam Freed authored
      74a86566
    • Sam Freed's avatar
      Tests: Factor out RunCMake.CMakePresets schema validation · 56751c83
      Sam Freed authored
      Make it available to similar tests.  Also fix whitespace
      in generated error message.
      56751c83
  10. 03 Feb, 2021 4 commits
  11. 02 Feb, 2021 5 commits
  12. 01 Feb, 2021 2 commits
  13. 31 Jan, 2021 1 commit
  14. 29 Jan, 2021 4 commits
    • William R. Dieter's avatar
      Tests: Explicitly set permissions in CPack tests to avoid perimssions errors · f41d0e0c
      William R. Dieter authored
      
      
      When the user has the setgid bit is set on the parent directory of
      the build directory, the setgid bit will be propagated throughout the
      build tree.  Most tests do not care about permissions as long as they
      can read and write the files the need.  The CPack tests, however, validate
      that permissions match an expected set, and fail with the setgid bit set.
      
      Explicitly set permissions on directories created in the CPackTestHelpers
      to clear the setgid bit.
      Signed-off-by: William R. Dieter's avatarwilliam.r.dieter <william.r.dieter@intel.com>
      f41d0e0c
    • William R. Dieter's avatar
      Tests: Add host to ENV{no_proxy} when DNS lookup failure is expected · c0b1f5f3
      William R. Dieter authored
      
      
      DNS lookup of an invalid host name fails with a different error in a proxy
      environment than it does in an environment without proxy.  Many tools,
      including curl, use the `no_proxy` environment variable to provid a list
      of hosts for which proxy should not be used.
      
      To make lookup failure consistent, add invalid host names to the
      `no_proxy` environment variable in tests that attempt to look up invalid
      host names.  This way the lookup will fail consistently regardless of
      whether proxy is generally used or not.
      Signed-off-by: William R. Dieter's avatarwilliam.r.dieter <william.r.dieter@intel.com>
      c0b1f5f3
    • Cristian Adam's avatar
      file(CONFIGURE): Fix newlines in CONTENT · 6e225efd
      Cristian Adam authored
      Fixes: #21749
      6e225efd
    • Craig Scott's avatar
      ExternalProject: Avoid scanning docs for keywords, use include_guard() · 23aab9ec
      Craig Scott authored
      The previous implementation was scanning the documentation in
      the file at runtime to determine the set of supported keywords for
      each public function. This was fragile, made it difficult to restructure
      the documentation and was sometimes observable in runtime
      performance measurements. Change to a more conventional
      approach where supported keywords are explicitly listed in the
      code.
      
      The internal _ExternalProject_SELF variable is no longer needed.
      CMake now provides CMAKE_CURRENT_FUNCTION_LIST_DIR which
      can be used for the same purpose and avoids having to set a
      variable when the module is read. This also removes the
      requirement that the module must be included by the current or a
      parent scope. It is now enough that the module has been included
      once somewhere before calling any of its functions. 
      
      The above changes combined mean that the module can now use
      include_guard() and avoid having to re-parse the very long file every
      time.
      23aab9ec
  15. 28 Jan, 2021 1 commit
    • Craig Scott's avatar
      ExternalProject: Improve robustness of update step · ac6a4d48
      Craig Scott authored
      Refactor the update logic to make it easier to follow. The following
      fixes/improvements are some consequences of this change:
      
      * Absorb a confusing git checkout failure message when the failure
        is allowed and we act on that failure appropriately.
      * Fix an unnecessary fetch in some scenarios when checking out a
        git hash we already have locally.
      * Stash and restore any local changes even when not rebasing.
      * Avoid unsafe rebasing where we are not on a branch that is
        already tracking the requested branch.
      * When fetching, use --tags --force to ensure we get all the tags
        and commits leading up to them regardless of whether the tags
        are on branches or not. Also update our local tags if they move
        on the remote.
      
      Fixes: #20677
      ac6a4d48