1. 01 May, 2017 1 commit
    • Chuck Atkins's avatar
      Compilers: Add common macros to be used by various compilers · 1de70845
      Chuck Atkins authored
      With numerous compilers now supporting multiple language standards in CMake,
      some common design patterns have begun to emerge.  This is intended to
      be a collection of macros implementing many of those common design
      patterns that can be factored out and leveraged by many compilers.
      Currently this only contains the code to set the default language
      standard of not preset.  More functionality will be added in the future
      as appropriate.
  2. 28 Apr, 2017 2 commits
  3. 27 Apr, 2017 1 commit
    • Chuck Atkins's avatar
      XL: Fix the use of the -qhalt flag for varying OSs · f320907b
      Chuck Atkins authored
      The valid settings to pass to the IBM XL compiler for the -qhalt flag
      vary widely by language and platform.  Based on existing documentation,
      the following table shows which error levels are valid to pass to
      -qhalt= since -qhalt=e is not always available.
      OS       |  xlc  |  xlC  |   xlf   |
      AIX      | iwes  | iw s  | ilwesu  |
      BlueGene | iwes  | iwes  | ilwesu  |
      OS X     | iwesu | iwesu | ilwesu  |
      Linux    |  w    |  w    | ilwesu  |
  4. 20 Apr, 2017 1 commit
    • Aleix's avatar
      Autogen: Pass explicit predefines header to moc if possible · 09035319
      Aleix authored and Brad King's avatar Brad King committed
      Qt is relying on whoever calls moc to include a file with the predefined
      values that will be used by the compiler, otherwise moc takes wrong
      paths and weird things happen.
      Instead, generate an include file and feed it to all mocs to make sure
      it's generating correct code.
      Co-Author: Sebastian Holtermann <sebholt@xwmw.org>
      Fixes: #16640
  5. 03 Apr, 2017 1 commit
  6. 31 Mar, 2017 1 commit
    • Brad King's avatar
      Features: Update features for Intel C++ 17.0.2 on UNIX · 4af0c9da
      Brad King authored
      Intel 17.0.2 on UNIX introduced a regression from 17.0.1 in its
      definition of `__cpp_constexpr` in `-std=c++14` mode.  It incorrectly
      defines it as `200704` instead of the expected `201304`.  Fix our
      feature detection table to account for this.
  7. 30 Mar, 2017 1 commit
  8. 29 Mar, 2017 1 commit
  9. 10 Mar, 2017 1 commit
    • Brad King's avatar
      GNU-FindBinUtils: Avoid setting policy CMP0054 · 8fc934de
      Brad King authored
      The `cmake_policy(SET)` call triggers `CMP0011` warnings when this
      module is used in a project that does not set `CMP0011` to NEW.  We
      could avoid these with a `cmake_policy` PUSH/POP pair, but it is simpler
      to adjust our code to not trigger `CMP0054` in the first place.
  10. 08 Mar, 2017 1 commit
  11. 15 Feb, 2017 1 commit
    • Brad King's avatar
      CUDA: Fix default compiler flags on Windows · 55fb46d2
      Brad King authored
      Fix the default values of `CMAKE_CUDA_FLAGS[_<CONFIG>]` on Windows to
      make the host compiler flags match those produced for C++ by the
      `Platform/Windows-MSVC` module.  This makes the flags consistent with
      those used for C++.
  12. 14 Feb, 2017 1 commit
  13. 08 Feb, 2017 1 commit
  14. 02 Feb, 2017 2 commits
  15. 01 Feb, 2017 1 commit
  16. 25 Jan, 2017 1 commit
    • Rolf Eike Beer's avatar
      GNUC: also check __GNUG__ define when checking for g++ · 24d73fa0
      Rolf Eike Beer authored
      At least the scratchbox compiler for the N900, which basically is a gcc 4.2,
      sets only __GNUG__ in C++ mode, but not __GNUC__. It does indeed set
      __GNUC_MINOR__ and __GNUC_PATCHLEVEL__. Extend the compiler detection code for
      GNU compilers in C++ mode to look at __GNUG__ in case __GNUC__ is absent.
  17. 12 Jan, 2017 3 commits
  18. 16 Dec, 2016 1 commit
    • Daniel Carrera's avatar
      PGI: Add support for Fortran with the Ninja generator · 4087d0ae
      Daniel Carrera authored and Brad King's avatar Brad King committed
      The PGI documentation says that `-Mpreprocess` "instructs the compiler
      to perform cpp-like preprocessing on assembly and Fortran input source
      files".  The `-E` flag causes the compiler to spit the result to stdout
      instead of saving it to a file.
  19. 09 Dec, 2016 1 commit
    • Brad King's avatar
      CUDA: Fix default compiler flag initialization · 7552d16d
      Brad King authored
      Since commit v3.7.0-rc1~392^2 (Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT
      set in toolchain files, 2016-07-05) our convention is to initialize
      compiler flag variables via `string(APPEND)` rather than `set()`.
      Fix the convention for `CMAKE_CUDA_FLAGS[_<CONFIG>]_INIT`.
  20. 02 Dec, 2016 5 commits
  21. 15 Nov, 2016 1 commit
  22. 14 Nov, 2016 5 commits
  23. 10 Nov, 2016 2 commits
    • Brad King's avatar
      Features: Detect Intel C++14 mode more reliably · 5e428389
      Brad King authored
      The `__cplusplus` macro is not defined to the language level reliably.
      When simulating MSVC it is always set to `1`.  When simulating GCC it is
      set to the lower value of the current language level and the maximum
      level supported by the simulated version of GCC (from observation).
      For MSVC we already used a combination of `__INTEL_CXX11_MODE__` and
      `__cpp_aggregate_nsdmi` to detect C++14 mode.  Extend this for general
      use by removing the condition on `_MSC_VER`.
    • Brad King's avatar
      Features: Fix standards and features for Intel 15 on Windows · be732739
      Brad King authored
      The Intel 15 compiler for Windows does not support the same set of
      standards and features as the same version for other platforms.
  24. 03 Nov, 2016 1 commit
  25. 02 Nov, 2016 3 commits
    • Brad King's avatar
      Features: Add meta-features requesting awareness of a particular standard · b0996a3f
      Brad King authored
      A common use case of `target_compile_features` is simply to specify that
      the compiler should be run in a mode that is aware of e.g. C++11.  Some
      projects simply specify a particular C++11-only feature to request this.
      Provide a first-class way to do this by naming features after the
      corresponding language standard.  Record them as always available in the
      corresponding standard level so that requesting them always ensures that
      standard (or higher) is used.
    • Brad King's avatar
      Features: Centralize per-compiler recording macros · 8b6cc251
      Brad King authored
      Simplify and de-duplicate per-compiler feature recording macros and
      convert to a centralized per-language macro.
    • Brad King's avatar
      Features: Do not record features on MSVC < 2010 · 2d23f7b2
      Brad King authored
      We have no feature tests for versions of VS older than 2010, so do
      not even call `record_compiler_features` for such versions.  This
      is consistent with other compilers where we call this macro only
      for versions for which we have recorded features.