1. 24 Jan, 2018 1 commit
  2. 09 Jan, 2018 1 commit
  3. 12 Dec, 2017 3 commits
    • Christian Pfeiffer's avatar
      IRSL: Fix MSVC variable deferencing · 4dae55fb
      Christian Pfeiffer authored
      Fixes: #17529
    • Christian Pfeiffer's avatar
      FindMPI: Fix various legacy problems · d1d8719f
      Christian Pfeiffer authored
      This MR fixes a number of bugs stemming from legacy variable handling,
      partially introduced by commit v3.10.0-rc1~103^2 (FindMPI: Add support
      for FreeBSD and SLES, 2017-08-09).
      * `MPI_COMPILE_OPTIONS` and `MPI_COMPILE_DEFINITIONS` legacy hints were not passed correctly.
      * Legacy variables could be parsed after they were set by `FindMPI` cause erroneous hinting on subsequent runs.
      * In the case of the compiler supporting MPI implicitly:
      	* not all consumption variables would be correctly reset.
      	* `MPI_<LANG>_HEADER_DIR` would be set unintentionally.
      	* `MPI_<LANG>_LIB_NAMES` appeared in cache despite being ignored.
      	* on subsequent passes, `MPI_<LANG>_COMPILER` could be corrupted.
      * the C-to-CXX copy logic would take place even if `MPI_SKIP_GUESSING` was turned on
      * if only some language compilers were given, inconsistent search behavior could be observed
      Issue: #17538
    • Islam Amer's avatar
      IAR: FindBinUtils should work for CXX as well as C · e4707048
      Islam Amer authored
      The IAR compiler test works when a project specifies LANGUAGES C CXX
      but fails if CXX comes before C. This change makes it work regardless
      of the order.
  4. 07 Dec, 2017 1 commit
  5. 06 Dec, 2017 1 commit
    • Matthew Woehlke's avatar
      GoogleTest: Add timeout to discovery · 29731d89
      Matthew Woehlke authored
      Add a TIMEOUT option to gtest_discover_tests. This provides a
      work-around in case a test goes out to lunch, rather than causing the
      build to simply hang. (Although this is still a problem with the user's
      project, hanging the build is not cool, especially in the case of
      automatically running CI builds. It is much preferred that the build
      should actively fail in this case, and it is trivially easy for us to
      implement that.)
  6. 05 Dec, 2017 2 commits
    • Christian Pfeiffer's avatar
      FindMPI: Fix multiple configure runs · 2047eb36
      Christian Pfeiffer authored
      Due to a erroneous logical dependency on a temporary variable, FindMPI
      would depend its FOUND status on the set of flags needed to support
      compiler-implicit MPI support after the first configure run.
      This behavior is especially causing a misreported NOT FOUND status after
      the first run on MPI implementations without MPI compiler like MS-MPI or
      MPICH2 on Windows.
    • Christian Pfeiffer's avatar
      FindMPI: Correct legacy variable handling · bde7513d
      Christian Pfeiffer authored
      Due to a minor logic error, MPI_LIBRARY, MPI_EXTRA_LIBRARY and
      MPI_<LANG>_LIBRARIES hints are currently not correctly handled and
      Additionally, if either C or CXX aren't enabled, there subsequent calls
      to FindMPI will cause cache variables of the sort "MPI_MPI_EXTRA_LIBRARY-NOTFOUND"
      to appear due to an error in the compatibility handling. (Doesn't affect
  7. 30 Nov, 2017 1 commit
  8. 28 Nov, 2017 1 commit
    • Ismail Donmez's avatar
      Clang: Do not mistake clang-cl 6.0 for GNU-like clang · f969f1a9
      Ismail Donmez authored
      The check added by commit v3.10.0-rc2~2^2 (Clang: Diagnose unsupported
      GNU-like clang targeting MSVC ABI, 2017-10-10) is incorrectly detecting
      clang-cl 6.0 as GNU-like.  Currently cmake is testing if the clang
      compiler accepts `--version` to see if it accepts GNU style flags.
      However, with the latest llvm snapshot this also works for clang-cl:
          > clang-cl --version
          clang version 6.0.0 (trunk)
          Target: x86_64-pc-windows-msvc
          Thread model: posix
          InstalledDir: C:\Program Files\LLVM\bin
      So instead we should use the `/?` flag which fails with clang but
      works with clang-cl:
          > clang-cl /? &> /dev/null; echo $?
          > clang /? &> /dev/null; echo $?
      Fixes: #17518
  9. 27 Nov, 2017 1 commit
  10. 21 Nov, 2017 1 commit
    • Matthew Woehlke's avatar
      GoogleTest: Fix multiple discovery on same target · 70f9f62d
      Matthew Woehlke authored
      According to the documentation, tests can be discovered for a target
      multiple times by using a different prefix and/or suffix to ensure name
      uniqueness. However, while this worked for gtest_add_tests, it did not
      work with gtest_discover_tests because the generated file that sets up
      the tests was named based only on the target name, and so subsequent
      discovery from the same target would clobber earlier discovery.
      Fix this by introducing a counter that records how many times discovery
      has been used on a target, and use this to generate unique names of the
      generated test list files.
  11. 15 Nov, 2017 2 commits
    • Brad King's avatar
      FindOpenGL: Add option to prefer GLVND for legacy GL · ff3c11ee
      Brad King authored
      Since commit v3.10.0-rc5~3^2 (FindOpenGL: Default to non-GLVND libraries
      for legacy GL, 2017-11-08) users may set `OPENGL_gl_LIBRARY` to empty to
      use GLVND components for the legacy GL interfaces.  This is useful only
      when one knows in advance that the GLVND components will be found.
      Add a `OpenGL_GL_PREFERENCE` variable to specify a preference for legacy
      GL or GLVND.  The latter can suppress `OPENGL_gl_LIBRARY` only when the
      needed GLVND components are found.  If no preference is explicitly
      specified, choose a default based on whether GLVND components were
      requested (because this indicates the project has been updated for
      CMake 3.10).
      Issue: #17437
      Issue: #17449
    • Brad King's avatar
      FindOpenGL: Re-order component library searches · aadc38c7
      Brad King authored
      Move the search for the legacy GL library to after the GLVND libraries.
      For now we still always look for both.
  12. 10 Nov, 2017 1 commit
  13. 09 Nov, 2017 1 commit
    • Brad King's avatar
      FindOpenGL: Default to non-GLVND libraries for legacy GL · e6b209c8
      Brad King authored
      Projects using `OPENGL_LIBRARIES` or `OpenGL::GL` expect legacy GL.
      Although GLVND OpenGL+GLX provides legacy GL interfaces, using those
      library files may conflict with legacy GL library files used by
      dependencies (or dependents) of such projects.  Therefore we should
      not yet use OpenGL+GLX when a legacy GL library is available.
      If `OPENGL_gl_LIBRARY` is set then use it as the legacy GL library.
      If it is *not* set then fall back to using GLVND OpenGL+GLX to provide
      legacy GL interfaces.  This will allow users to build projects using
      GLVND even if they have not been ported.
      Fixes: #17437
  14. 08 Nov, 2017 2 commits
    • Axel Huebl's avatar
      FindHDF5: Fix H5_VERSION on Patch in C · a6abb6c8
      Axel Huebl authored
      Fix a typo from commit v3.6.0-rc1~85^2 (HDF5: Refactor the use of
      compiler wrappers, 2016-04-04) that accidentally used the HDF5 C++
      version (which could be empty) while detecting the C patch version.
      The detection failed for patch releases, such as `1.10.0-patch1`
      becoming `.1` instead of ``.
    • Christian Pfeiffer's avatar
      Restore exclusion of "gcc_eh" from implicit link libraries · 41aacca7
      Christian Pfeiffer authored
      Since commit v3.9.0-rc1~148^2 (Do not assume GCC libs are linked by all
      compilers, 2017-05-05) we no longer filter out all `gcc*` implicit link
      libraries.  This allows mixing of gcc and non-gcc compilers across
      languages.  However, this caused a subtle problem with how GCC makes
      exception handling symbols available to linked binaries.
      GCC (at least on MinGW) provides two different libraries with exception
      handling symbols:
      * gcc_s: A shared library with -fvisibility=default, used by -shared-libgcc.
      * gcc_eh: A static library with -fvisibility=hidden, used by -static-libgcc.
      The C compiler (on MinGW) defaults to -static-libgcc and uses gcc_eh.
      The C++ compiler defaults to -shared-libgcc and uses gcc_s when linking
      shared libraries and executables so that exceptions can propagate across
      shared libraries [1].  When linking a mixed-language binary, the C++
      compiler should be used along with its choice of gcc_s.  In this case
      gcc_eh should not be added even though the C compiler implies it because
      gcc_s supersedes it.
      Since the above-mentioned change, CMake is adding gcc_eh to C++ link
      lines that also contain C code on MinGW.  This causes both gcc_s and
      gcc_eh to be used, which is incorrect.  We can fix this simply by
      excluding gcc_eh from the C compiler's implicit link libraries.
      [1] https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Link-Options.html#Link-Options
      Fixes: #17436
  15. 07 Nov, 2017 2 commits
  16. 06 Nov, 2017 1 commit
  17. 01 Nov, 2017 1 commit
    • Brad King's avatar
      Record C compile features flags for MinGW Clang on Windows · f86879a0
      Brad King authored
      This was done for C++ by commit v3.5.0-rc1~69^2 (Record compile features
      for MinGW Clang on Windows, 2016-01-11).  Make the same change for C.
      The `UNIX` condition on Clang C compiler features was already dropped by
      refactoring in commit v3.9.0-rc1~17^2~4 (Compilers: Port to use default
      cmake_record_lang_compile_features macros, 2017-05-10).
      Our documentation already claims support for this combination.  This
      was simply an oversight when support was added for MinGW Clang C++.
      Issue: #15897
      Issue: #15943
  18. 25 Oct, 2017 1 commit
  19. 24 Oct, 2017 2 commits
    • Christian Pfeiffer's avatar
      Find{OpenMP,OpenACC}: Fix detection with -Werror=return-type · 15da0ba3
      Christian Pfeiffer authored
      Explicitly return a value from `main` in our test sources.
      Fixes: #17391
    • Christian Pfeiffer's avatar
      FindMPI: Use physical cores for MPIEXEC_MAX_NUMPROCS · 1610f757
      Christian Pfeiffer authored
      Since commit v3.9.0-rc1~224^2~1 (FindMPI: MPIEXEC handling improvements,
      2017-04-21) the `ProcessorCount` module is being used to initialize
      `MPIEXEC_MAX_NUMPROCS`.  However, this leads to the logical cores being
      counted rather than the physical ones, and some MPI implementations like
      OpenMPI will error if mpiexec is called with that number.  Switch it to
      the number of physical cores using `cmake_host_system_information`.
      This ensures that if `MPIEXEC_MAX_NUMPROCS` is being used to set up MPI
      tests with CTest or similar that the tests won't spuriously fail due to
      OpenMPI refusing to start the application.
  20. 23 Oct, 2017 2 commits
  21. 19 Oct, 2017 1 commit
  22. 17 Oct, 2017 1 commit
  23. 11 Oct, 2017 3 commits
    • Brad King's avatar
      FindXMLRPC: Tolerate no include directories · e7720a0f
      Brad King authored
      `xmlrpc-c-config $modules --cflags` may report no `-I` flags if the
      headers are in a standard location like `/usr/include`.  In this case
      it is okay for `XMLRPC_INCLUDE_DIRS` to be empty.
      Ideally the `--cflags` output should be used as hints for a `find_path`
      call to really find the headers as we do for other find modules, but
      simply assuming no explicit include directories are needed is good
      enough for now.
      Fixes: #17347
    • Brad King's avatar
      FindXMLRPC: Drop unnecessary exec_program code paths · b1aa8a47
      Brad King authored
      We always have `execute_process` now, so drop our ancient `exec_program`
      code paths that are never used anymore.
    • Brad King's avatar
      ExternalProject: Avoid if() auto-dereferene in quoted arguments · 491d2108
      Brad King authored
      The implementation of this module doesn't expect such dereferences
      to happen, but can when a project sets a variable called `x`.
      Set `CMP0054` explicitly to get its NEW behavior.
      Fixes: #17335
  24. 10 Oct, 2017 3 commits
    • Domen Vrankar's avatar
      CPack/Deb: fix for regex passing even if invalid characters are present · c5db2f9a
      Domen Vrankar authored
      Regex [+-~] passes all characters between + and ~ and not only
      +, - and ~
    • Domen Vrankar's avatar
      CPack/Deb: CPACK_DEBIAN_PACKAGE_VERSION regex testing exception · 529729d6
      Domen Vrankar authored
      CPACK_DEBIAN_PACKAGE_VERSION variable could in the past also
      contain release and epoch version so regex test should expect
      the entire versioning if both CPACK_DEBIAN_PACKAGE_RELEASE
      and CPACK_DEBIAN_PACKAGE_EPOCH are not set.
      Also since the checks were not performed in the past the regex
      test of CPACK_DEBIAN_PACKAGE_VERSION variable content should
      only report author warnings instead of errors in case of the
      test fail.
      Fixes: #17339
    • Brad King's avatar
      Clang: Diagnose unsupported GNU-like clang targeting MSVC ABI · b6d3a1c0
      Brad King authored
      The LLVM/Clang installer on Windows provides a `LLVM/bin` directory
      containing `clang.exe` and `clang++.exe` command-line tools that have a
      GNU-like command-line but target the MSVC ABI (instead of MinGW).  We
      do not support this combination, so diagnose and reject it explicitly.
      Tell users what to do to use the `clang-cl.exe` tool instead.
      Issue: #16439
  25. 06 Oct, 2017 4 commits