Skip to content
Snippets Groups Projects
  1. May 06, 2021
    • Robert Maynard's avatar
      CUDA: improve regex for CUDA Toolkit root from nvcc verbose output · 5e931c5a
      Robert Maynard authored and Brad King's avatar Brad King committed
      The original regular expression was greedy and would match any
      environment variable ending with `TOP` (like `DESKTOP`). This is an
      issue on windows where `nvcc -v` would output all environment variables
      before the compiler's verbose output.
      
      To resolve this issue we use a tighter match algorithm that looks
      for `#$ TOP=` instead of `TOP=`.
      
      Fixes: #22158
      5e931c5a
  2. Apr 28, 2021
  3. Apr 23, 2021
    • Brad King's avatar
      Help: Do not recommend WCDH in cmake-compile-features(7) · 1f4ec3f4
      Brad King authored
      Since commit da7ad799 (WriteCompilerDetectionHeader: Add policy to
      remove module, 2020-12-04, v3.20.0-rc1~350^2), the WCDH module is
      deprecated.  Update the `cmake-compile-features(7)` manual section that
      previously recommended WCDH to make such detection the project's
      responsibility instead.  Move the old content of the section over to the
      WCDH module to preserve it.
      1f4ec3f4
  4. Apr 16, 2021
  5. Apr 07, 2021
    • Brad King's avatar
      Restore support for backslashes in initial language-wide flags · 3953dfcb
      Brad King authored
      Refactoring in commit bdc40742 (CMakeDetermineCompilerId: Test without
      COMPILER_ID_FLAGS if REQUIRE_SUCCESS, 2021-02-27, v3.20.0-rc3~6^2) added
      an extra macro layer through which flag strings are passed.  That caused
      an extra level of argument re-parsing, and broke flags with backslashes.
      Pass flags to the helper macro through variable names instead.
      
      Fixes: #22041
      3953dfcb
    • Brad King's avatar
      FindBLAS: Fix detection of OpenMP as dependency of BLA_STATIC · 9ef82d95
      Brad King authored
      Update the change from commit f7f3d898 (FindBLAS: Add dependency of
      OpenBLAS on OpenMP for BLA_STATIC, 2020-11-10, v3.20.0-rc1~492^2):
      
      * If C is not enabled, find CXX OpenMP libraries instead.
      
      * Do not use BLA_STATIC's custom CMAKE_FIND_LIBRARY_SUFFIXES for OpenMP.
        It can break projects that already call `find_package(OpenMP)` and
        expect a shared library.  Whether OpenMP is static is orthogonal to
        whether BLAS is static.
      
      Fixes: #22039
      Issue: #16221
      9ef82d95
    • Brad King's avatar
      Makefiles: Fix dependency extraction with CUDA < 10.2 and host compiler · 8e38985d
      Brad King authored
      Since commit 2c71d051 (Makefiles Generators: use compiler for
      dependencies generation, 2020-10-18, v3.20.0-rc1~392^2) we invoke `nvcc`
      for CUDA < 10.2 a second time in order to generate a depfile.  When
      `CMAKE_CUDA_HOST_COMPILER` is set, the second invocation is missing its
      `-ccbin=` option, even after refactoring in commit 8981e3e7
      (NVIDIA-CUDA: rely on new capabilities for deps generation, 2020-12-02,
      v3.20.0-rc1~362^2).
      
      Ideally we should move the `-ccbin=` flag into `Compiler/NVIDIA-CUDA`,
      but that will add `CMAKE_CUDA_HOST_COMPILER` support on Windows in
      command-line generators but not the Visual Studio generators.
      For now, add the flag to the depfile command specifically.
      
      Fixes: #22037
      8e38985d
    • Brad King's avatar
      BinUtils: Avoid clobbering a variable named without a private prefix · 4d786dfc
      Brad King authored
      Refactoring in commit b12aec6c (BinUtils: prefer bin utils matching
      the compiler version extension, 2020-12-11, v3.20.0-rc1~171^2)
      accidentally leaked a `TOOL` variable.  Name temporary variables with a
      private prefix.
      
      Fixes: #22035
      4d786dfc
  6. Apr 05, 2021
    • Craig Scott's avatar
      Apple: Set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG on non-macOS too · 4aed96e2
      Craig Scott authored
      Since CMake 3.19, we no longer support macOS SDKs older than 10.5,
      which corresponds to Xcode 3. Supporting older Xcode versions for
      device platforms is also not realistic. We therefore expect the -rpath
      linker option should always be supported now.
      
      When targeting iOS, tvOS or watchOS, the previous disabling of -rpath
      support meant that the install_name_dir of shared libraries and
      frameworks was unable to use @rpath. This resulted in embedding
      absolute paths for their install_name. When they were embedded in an
      app bundle, this would cause the app to fail at runtime. By enabling the
      -rpath linker option, the default install_name_dir is now @rpath for these platforms, which results in binaries that do work at runtime.
      
      Fixes: #20036
      4aed96e2
    • Robert Maynard's avatar
      CMakeDetermineCompilerABI: Extract lib arch from implicit object file paths · 764606e2
      Robert Maynard authored
      The NVHPC compiler does not have any implicit link directories that can
      be used to detect `CMAKE_LIBRARY_ARCHITECTURE`, but it does have
      implicit object files.  Extract implicit object file paths from link
      lines and check them for the `CMAKE_LIBRARY_ARCHITECTURE` pattern.
      
      Issue: #22024
      764606e2
    • Robert Maynard's avatar
      CMakeDetermineCompilerABI: Revert "Parse library arch from versioned paths" · 5d44d73b
      Robert Maynard authored and Brad King's avatar Brad King committed
      The change in commit 657fc3a9 (CMakeDetermineCompilerABI: Parse
      library arch from versioned paths, 2021-02-03, v3.20.0-rc1~40^2) caused
      `CMAKE_LIBRARY_ARCHITECTURE` to be populated on non-multiarch platforms
      if their compilers happen to use `$arch/$version` library directories.
      Revert the use of versioned library paths.
      
      Fixes: #22024
      5d44d73b
    • Brad King's avatar
      UseSWIG: Transform swig depfile to match Ninja generator paths · c3d0b255
      Brad King authored
      Since commit 89b01b04 (UseSWIG: use swig tool to generate
      dependencies, 2021-01-12, v3.20.0-rc1~120^2) we use a tool-provided
      depfile to extract dependencies under the Ninja generator.  Enable
      `CMP0116` to ensure depfile paths are translated to match what the Ninja
      generator writes to the build manfiest.
      
      Fixes: #22029
      c3d0b255
    • Marc Chevrier's avatar
      UseSWIG: Run using policy settings from includer · 8c525d7e
      Marc Chevrier authored and Brad King's avatar Brad King committed
      Backport commit de7f0aa6 (UseSWIG: avoid spurious policy warnings,
      2021-02-11) to the 3.20 release branch.  Projects need to be able to
      control policies.
      
      Issue: #22029
      8c525d7e
    • Ben Boeckel's avatar
      FindHDF5: search for the new Fortran HL library name · ff84a80b
      Ben Boeckel authored
      HDF5 1.10.6 renamed this library to match the other language binding
      library names.
      
      Fixes: #20205
      ff84a80b
  7. Apr 01, 2021
  8. Mar 31, 2021
  9. Mar 30, 2021
    • Haibo Huang's avatar
      Android: Fix search for binutils · 61e6fc26
      Haibo Huang authored and Brad King's avatar Brad King committed
      Set `CMAKE_SYSTEM_PROGRAM_PATH` in `Platform/Android-Initialize` instead
      of `Platform/Android` so it can be used in `CMakeFindBinUtils`.
      
      Also add the names `llvm-strip` and `llvm-ranlib` for the corresponding
      tools.
      61e6fc26
  10. Mar 29, 2021
  11. Mar 26, 2021
  12. Mar 16, 2021
    • Brad King's avatar
      FindPkgConfig: Restore preference for first pkg-config in PATH · c7bd2d0d
      Brad King authored
      Since commit ab8bd483 (FindPkgConfig: Search for pkg-config.bat file
      on a Windows host, 2020-09-25, v3.19.0-rc1~98^2) we prefer
      `pkg-config.bat` over `pkg-config` regardless of the order they appear
      in the `PATH`.  Tell `find_program` to consider all names in each
      directory so that the first one in `PATH` of any name wins.
      
      Issue: #21239
      c7bd2d0d
  13. Mar 15, 2021
  14. Mar 10, 2021
    • Justin LaPolla's avatar
      Cray: Enable Cray compiler wrapper detection on all platforms · 13144e82
      Justin LaPolla authored and Brad King's avatar Brad King committed
      Previously were checking for the `__CRAYXC` and `__CRAYXE` predefined
      macros.  These macros reflect the platform that the compiler wrapper is
      running on, i.e. Cray XC and Cray XE machines.  They are not defined on
      other platforms such as Apollo80.
      
      Switch to the `__CRAYXT_COMPUTE_LINUX_TARGET` macro. The Cray cc/CC/ftn
      wrappers always define this macro on the command line. This macro has
      been in use for many years, and is believed to be a reliable way to
      detect current and older Cray compiler wrappers.
      
      Fixes: #21904
      13144e82
  15. Mar 09, 2021
    • Craig Scott's avatar
      Revert ExternalProject and FetchContent refactoring · 57d442e1
      Craig Scott authored
      Refactoring of the ExternalProject and FetchContent modules moved
      the commands into CMake scripts. This broke custom commands that
      used shell redirection or special build tool variables of the form
      $(MakeVar). Undo the sequence of commits that performed this
      refactoring and follow-up fixes associated with it.
      
      The following commits are reverted by this change:
      
      4f3d1abb (ExternalProject: Refactor pre-configure steps to support
      no-target uses, 2021-02-05)
      
      17e5516e (FetchContent: Invoke steps directly and avoid a separate
      sub-build, 2021-01-29)
      
      bd876f38 (FetchContent: Restore patch command support,
      2021-02-18)
      
      404cddb7 (ExternalProject: Fix misuse of IS_NEWER_THAN in
      timestamp checks, 2021-02-21)
      
      b0da6712 (FetchContent: Don't update timestamps if files don't
      change, 2021-02-18)
      
      Fixes: #21892
      57d442e1
    • Silvio Traversaro's avatar
      FindMatlab: Fix Matlab_LIBRARIES for MCR · 5ba1f4b6
      Silvio Traversaro authored and Brad King's avatar Brad King committed
      In commit bda5e2ac (FindMatlab: Only include engine and dataarray
      libraries if they are found, 2020-12-11, v3.20.0-rc1~297^2~1) we fixed
      the imported target to contain optional libraries only if they are
      found.  Do the same for `Matlab_LIBRARIES`.
      5ba1f4b6
  16. Mar 08, 2021
    • Brad King's avatar
      Revert "Cray: Fix Cray compiler detection on new platforms" · 23b101de
      Brad King authored
      The justification in commit 9ee4a428 (Cray: Fix Cray compiler
      detection on new platforms, 2020-12-01, v3.19.2~26^2) confuses detection
      of the CrayPrgEnv with identification of the Cray compiler.  The
      change regressed detection of the CrayPrgEnv on non-Cray compilers.
      Revert it pending further investigation into the original problem.
      
      Fixes: #21894
      23b101de
  17. Mar 05, 2021
  18. Mar 03, 2021
  19. Mar 02, 2021
  20. Feb 27, 2021
  21. Feb 26, 2021
    • Ben Boeckel's avatar
      FindOpenGL: handle GLX without GLVND · fb4b2ed0
      Ben Boeckel authored
      On Ubuntu, installing `libgl-dev` provides `libGL` and `libGLX`, but no
      `libOpenGL`. Avoid defining GLVND targets without the `OpenGL::OpenGL`
      target.
      fb4b2ed0
  22. Feb 24, 2021
    • Robert Maynard's avatar
      PGI: Explicitly specify CMAKE_CXX98_STANDARD_COMPILE_OPTION · 72efd95a
      Robert Maynard authored
      The PGI ( and NVIDIA HPC ) compilers default C++ standard level
      are based on the GCC system headers it is compiling against.
      
      Therefore on newer platforms the default C++ level will be >= 11
      and requesting C++98 compilation mode will fail as no explicit
      flag will be set.
      72efd95a
  23. Feb 23, 2021
  24. Feb 22, 2021
    • Craig Scott's avatar
      FetchContent: Don't update timestamps if files don't change · b0da6712
      Craig Scott authored and Brad King's avatar Brad King committed
      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
    • Craig Scott's avatar
      ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checks · 404cddb7
      Craig Scott authored and Brad King's avatar Brad King committed
      When using a file system which only has second resolution timestamps,
      there is a reasonably high likelihood of timestamps being the same.
      The IS_NEWER_THAN test returns true when timestamps are the same,
      so don't redo downloads when they match exactly.
      404cddb7
    • Brad King's avatar
      NAG: Fix using Fortran modules from their output directory · ec030877
      Brad King authored
      The NAG Fortran compiler's `-mdir` flag sets the module output
      directory but does not add the directory to the search path for using
      modules.  This is inconsistent with other compilers like the GNU Fortran
      compiler's `-J` flag that does both.  In order to make these consistent,
      add the module output directory with a `-I` flag on the NAG Fortran
      compiler so that it will be searched when using modules too.
      
      We already do this for the XL Fortran compiler since commit 210b0b99
      (XL: Fix using Fortran modules from their output directory, 2020-02-28,
      v3.18.0-rc1~640^2~1).
      ec030877
  25. Feb 18, 2021
Loading