1. 17 May, 2019 1 commit
    • Zsolt Parragi's avatar
      clang: introduce CMAKE_<lang>_COMPILER_FRONTEND_VARIANT · 53fbe23f
      Zsolt Parragi authored
      This variable is set to GNU on Windows when clang.exe ar clang++.exe is
      used, and set to MSVC for clang-cl.exe.
      CMAKE_<lang>_SIMULATE_ID is set to MSVC in both cases, as clang defaults
      to -fms-compatibility for all command lines on windows.
  2. 06 Feb, 2019 1 commit
  3. 04 Feb, 2019 1 commit
    • Gregor Jasny's avatar
      Apple: Introduce separate system name for iOS, tvOS, and watchOS · 11da882a
      Gregor Jasny authored
      - Remove code signing requirements for non-macOS
      - Do not set deployment target for non-macOS
      - Build static library for compiler feature detection for non-macOS
      - Use framework to run CompilerId tests for watchOS
      - Port tests to new SDK handling
      - Add new Apple cross-compiling section to toolchain documentation
      Closes: #17870
  4. 16 Jan, 2019 1 commit
    • Fred Baksik's avatar
      GHS: Add Compiler ID detection · 72e0c115
      Fred Baksik authored
      -- Detect GHS compiler and version
         Detect ARCHITECTURE_ID for PPC / ARM / 86 targets
         Detect PLATFORM_ID for Integrity and Integrity178 platforms
         Using defines specified in the documents for the compilers: 201416 PPC / 201754 ARM / 201714 86
      -- Fallback C/CXX compiler ID to GHS if not otherwise detected and using GHS MULTI generator
         Works around issue with some GHS compilers not setting __ghs__ compiler define
      -- Tweak Compiler ID checking so major id of 002017 is not replaced with 217
      -- Prefer try_compile() library targets when testing for working GHS compilers
      -- Avoid CMake errors if reading past end of file for checking if file is PE executable
  5. 03 Dec, 2018 1 commit
  6. 18 Jun, 2018 1 commit
  7. 28 Nov, 2017 1 commit
  8. 10 Oct, 2017 1 commit
    • 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
  9. 29 Jun, 2017 2 commits
    • nolange's avatar
      IAR: Improve support for IAR ARM Compiler · d8e6cd9e
      nolange authored
      Make the implementation for this compiler more complete.
      IAR has multiple C++ modes, historically they were reduced c++ versions
      for embedded that gradually improved to the full standard (which can be
      reduced again by e.g. disabling rtti and exceptions).  The new
      implementation picks the best available, but the c++ mode can also be
      overridden by defining `CMAKE_IAR_CXX_FLAG`.
      Add C/C++ standard flags so that all modes up to and including the last
      supported standard are defined.
      Fixes: #16826
    • nolange's avatar
      Add a CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID variable · 0b1a2876
      nolange authored
      Compilers such as MSVC and IAR may have variants that target different
      architectures.  We have been using a `MSVC_<LANG>_ARCHITECTURE_ID`
      variable to hold this information for MSVC.  Add an alternative with a
      more general name (later we can port MSVC to it too).
      This additional information may be needed to generate proper invocations
      of the compiler based on its architecture variant.
  10. 31 Mar, 2017 1 commit
    • Brad King's avatar
      Xcode: Detect CURRENT_ARCH for use by generator · a1221905
      Brad King authored
      During compiler identification, extract the Xcode `CURRENT_ARCH` value
      and save it for later use by the Xcode generator in an internal compiler
      information variable.  This will be useful to know the locations of
      object files when only one architecture is built.
  11. 08 Mar, 2017 1 commit
  12. 27 Sep, 2016 1 commit
    • Brad King's avatar
      Simplify CMake per-source license notices · 86578ecc
      Brad King authored
      Per-source copyright/license notice headers that spell out copyright holder
      names and years are hard to maintain and often out-of-date or plain wrong.
      Precise contributor information is already maintained automatically by the
      version control tool.  Ultimately it is the receiver of a file who is
      responsible for determining its licensing status, and per-source notices are
      merely a convenience.  Therefore it is simpler and more accurate for
      each source to have a generic notice of the license name and references to
      more detailed information on copyright holders and full license terms.
      Our `Copyright.txt` file now contains a list of Contributors whose names
      appeared source-level copyright notices.  It also references version control
      history for more precise information.  Therefore we no longer need to spell
      out the list of Contributors in each source file notice.
      Replace CMake per-source copyright/license notice headers with a short
      description of the license and links to `Copyright.txt` and online information
      available from "https://cmake.org/licensing".  The online URL also handles
      cases of modules being copied out of our source into other projects, so we
      can drop our notices about replacing links with full license text.
      Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
      of the replacements mechanically.  Manually fix up shebang lines and trailing
      newlines in a few files.  Manually update the notices in a few files that the
      script does not handle.
  13. 15 Aug, 2016 1 commit
  14. 02 Jun, 2016 1 commit
  15. 25 Sep, 2015 1 commit
  16. 18 Sep, 2015 1 commit
    • Brad King's avatar
      Ninja: Detect MSVC /showIncludes prefix with compiler flags (#15596) · 109a7a24
      Brad King authored
      Move detection over to the compiler id logic where we have already
      constructed the list of compiler flags from ARG1 and CMAKE_<LANG>_FLAGS.
      Pass the flags when we execute "cl" with "/showIncludes".  Also pass "/c"
      because we only need to compile, not link.  Check the compiler process
      exit code before trusting its output.
  17. 20 Aug, 2015 1 commit
  18. 30 Jun, 2015 1 commit
  19. 18 Jun, 2015 1 commit
    • Brad King's avatar
      CMakeDetermineCompilerId: Optionally try some flags before no flags · c65a060e
      Brad King authored
      Teach CMAKE_DETERMINE_COMPILER_ID to optionally try detecting the
      compiler id using some given flags before trying to detect it with no
      special flags.  This will be useful for Fortran detection to distinguish
      some compilers that use the preprocessors of others but have no macro of
      their own by getting verbose output.
  20. 05 Sep, 2014 1 commit
    • Brad King's avatar
      Fix finding binutils when cross-compiling with Clang · 72d66818
      Brad King authored
      Since commit v3.0.0-rc1~342^2~2 (Add compiler target compile options,
      2013-05-19) we use CMAKE_<LANG>_COMPILER_TARGET as the binutils prefix
      when cross-compiling with Clang.  Fix the implementation to use the
      compiler target as the prefix only when it is set.  Otherwise toolchain
      files not using CMAKE_<LANG>_COMPILER_TARGET cause the logic to use
      a prefix of just "-" and of course cannot find "-ar" or "-ld".
  21. 14 Apr, 2014 2 commits
  22. 10 Mar, 2014 2 commits
  23. 22 Jan, 2014 1 commit
  24. 19 Nov, 2013 1 commit
    • Stephen Kelly's avatar
      Add compiler target compile options. · 76552d59
      Stephen Kelly authored
      For clang, this allows passing -target <triple> to the compiler, and
      for qcc, -V<arch> using toolchain files containing something like
       set(triple arm-linux-gnueabihf)
       set(CMAKE_C_COMPILER "/usr/bin/clang")
       set(CMAKE_C_COMPILER_TARGET ${triple})
       set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
       set(CMAKE_CXX_COMPILER_TARGET ${triple})
       set(arch gcc_ntoarmv7le)
       set(CMAKE_C_COMPILER /opt/qnx650/host/linux/x86/usr/bin/qcc)
       set(CMAKE_C_COMPILER_TARGET ${arch})
       set(CMAKE_CXX_COMPILER /opt/qnx650/host/linux/x86/usr/bin/QCC)
       set(CMAKE_CXX_COMPILER_TARGET ${arch})
      Both clang and qcc are inherently cross compiler( driver)s.
      When cross-compiling with clang, use the CMAKE_${lang}_COMPILER_TARGET
      as the _CMAKE_TOOLCHAIN_PREFIX to find the appropriate binutils.
      When cross-compiling with QNX qcc, use the CMAKE_${lang}_COMPILER_TARGET
      to set the appropriate _CMAKE_TOOLCHAIN_PREFIX.
  25. 13 Nov, 2013 1 commit
  26. 25 Oct, 2013 1 commit
  27. 24 Oct, 2013 2 commits
    • Peter Kümmel's avatar
      Ninja: use deps = gcc/msvc feature · eeb4aece
      Peter Kümmel authored
      cmcldeps is now only used for .rc file processing
    • Brad King's avatar
      CMakeDetermine*Compiler: Remove temporary cache entry · 332771c9
      Brad King authored
      When the user or toolchain file sets CMAKE_<LANG>_COMPILER to a name
      without a path we use find_program with CMAKE_<LANG>_COMPILER_WITH_PATH
      to search for the tool.  Remove the temporary cache entry afterward to
      avoid exposing it to projects.  It is not set by other logic paths so no
      one should be using it.
  28. 15 Apr, 2013 1 commit
  29. 14 Mar, 2013 3 commits
  30. 24 Aug, 2012 1 commit
    • Brad King's avatar
      Make platform information files specific to the CMake version · 7195aca5
      Brad King authored
      At the top of a build tree we configure inside the CMakeFiles directory
      files such as "CMakeSystem.cmake" and "CMake<lang>Compiler.cmake" to
      save information detected about the system and compilers in use.  The
      method of detection and the exact results store varies across CMake
      versions as things improve.  This leads to problems when loading files
      configured by a different version of CMake.  Previously we ignored such
      existing files only if the major.minor part of the CMake version
      component changed, and depended on the CMakeCache.txt to tell us the
      last version of CMake that wrote the files.  This led to problems if the
      user deletes the CMakeCache.txt or we add required information to the
      files in a patch-level release of CMake (still a "feature point" release
      by modern CMake versioning convention).
      Ensure that we always have version-consistent platform information files
      by storing them in a subdirectory named with the CMake version.  Every
      version of CMake will do its own system and compiler identification
      checks even when a build tree has already been configured by another
      version of CMake.  Stored results will not clobber those from other
      versions of CMake which may be run again on the same tree in the future.
      Loaded results will match what the system and language modules expect.
      Rename the undocumented variable CMAKE_PLATFORM_ROOT_BIN to
      CMAKE_PLATFORM_INFO_DIR to clarify its purpose.  The new variable points
      at the version-specific directory while the old variable did not.
  31. 22 Aug, 2012 3 commits
    • Brad King's avatar
      VS: Detect the compiler id and tool location · 66cb3356
      Brad King authored
      Configure a hand-generated Visual Studio project to build the compiler id
      source file since we cannot run the compiler command-line tool directly.
      Add a post-build command to print out the full path to the compiler tool.
      Parse the full path to the compiler tool from the build output.
    • Brad King's avatar
      Xcode: Detect the compiler id and tool location · 965a69dc
      Brad King authored
      Configure a hand-generated Xcode project to build the compiler id source
      file since we cannot run the compiler command-line tool directly.  Add a
      post-build shell script phase to print out the compiler toolset build
      setting.  Run xcodebuild to compile the identification binary.  Parse
      the full path to the compiler tool from the xcodebuild output.
    • Brad King's avatar
      Re-order C/C++/Fortran compiler determination logic · b8b5c834
      Brad King authored
      Re-organize CMakeDetermine(C|CXX|Fortran)Compiler.cmake to search for
      the compiler command-line tool only under generators for which it makes
      sense.  For the Visual Studio generators we do not expect to find the
      compiler tool from the environment, nor would we use the result anyway.
      Furthermore, set CMAKE_${lang}_COMPILER_ID_TEST_FLAGS only when it has a
      chance to be used.  Extract _CMAKE_TOOLCHAIN_LOCATION from the compiler
      path after running the compiler id step so in the future that step can
      help find the path to the compiler.
  32. 15 Aug, 2012 1 commit