1. 14 May, 2014 1 commit
    • Stephen Kelly's avatar
      Features: Extend concept to C language. · e0890d03
      Stephen Kelly authored
      Add properties and variables corresponding to CXX equivalents.
      
      Add features for c_function_prototypes (C90), c_restrict (C99),
      c_variadic_macros (C99) and c_static_assert (C11). This feature
      set can be extended later.
      
      Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader
      to conditionally represent the c_restrict feature.
      e0890d03
  2. 12 May, 2014 1 commit
    • Daniele E. Domenichelli's avatar
      Allow the Package Registry to be disabled (#14849) · be8ae960
      Daniele E. Domenichelli authored
      When a project is packaged for redistribution the local package
      registries should not be updated or consulted.  They are for developers.
      
      Add variables to disable use of package registries globally:
      
      * CMAKE_EXPORT_NO_PACKAGE_REGISTRY that disables the export(PACKAGE)
        command
      * CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY that disables the User Package
        Registry in all the find_package calls.
      * CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY that disables the
        System Package Registry in all the find_package calls.
      
      Update documentation and unit tests.
      be8ae960
  3. 07 May, 2014 2 commits
  4. 02 May, 2014 1 commit
  5. 07 Apr, 2014 2 commits
    • Stephen Kelly's avatar
      project: Add infrastructure for recording CXX compiler features · faeddf64
      Stephen Kelly authored
      Add a feature test using the compiler macros and the preprocessor to
      determine available features.
      
      Add a CMAKE_CXX_COMPILE_FEATURES variable which contains all features
      known to the loaded compiler, and a CMAKE_CXX_KNOWN_FEATURES variable
      containing all features known to CMake.  Add language standard specific
      variables for internal use to determine the standard-specific compile
      flags to use.
      
      This will be extended to other languages in the future.  Follow-up
      commits will add features which will be recorded by the feature test.
      faeddf64
    • Stephen Kelly's avatar
      cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties. · 913394af
      Stephen Kelly authored
      These are used to determine whether to add -std=c++11, -std=gnu++11
      etc flags on the compile line.
      913394af
  6. 02 Apr, 2014 1 commit
    • Brad King's avatar
      Do not warn by default when policy CMP0025 or CMP0047 is not set · a41c0a9d
      Brad King authored
      These policies are triggered by the use of a particular compiler rather
      than outdated CMake code in a project.  Avoid warning in every project
      that enables a language by not displaying the policy warning by default.
      Add variable CMAKE_POLICY_WARNING_CMP<NNNN> to control the warning
      explicitly; otherwise enable the warning with --debug-output or --trace.
      
      This breaks with strict policy convention because it does not provide
      developers with any warning about the behavior change by default.
      Existing projects will continue to build without a warning or change in
      behavior.  When a developer changes the minimum required version of
      CMake in a project to a sufficiently high value (3.0), the project will
      suddenly get the new compiler id and may break, but at least the
      breakage comes with a change to the project rather than the version of
      CMake used to build it.
      
      Breaking strict policy convention is worthwhile in this case because
      very few projects will be affected by the behavior change but every
      project would have to see the warning if it were enabled by default.
      a41c0a9d
  7. 10 Mar, 2014 1 commit
  8. 26 Feb, 2014 2 commits
    • Brad King's avatar
      MSVC: Add properties to configure compiler PDB files (#14763) · 0ea3aee8
      Brad King authored
      Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files
      2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY
      properties.  Those properties now exclusively handle linker PDB files.
      Since STATIC libraries do not link their compiler PDB file becomes more
      important.  Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and
      "COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB
      file location and pass the value to the MSVC /Fd option.
      0ea3aee8
    • Brad King's avatar
      MSVC: Add properties to configure compiler PDB files (#14762) · fba51b09
      Brad King authored
      Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files
      2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY
      properties.  Those properties now exclusively handle linker PDB files.
      Since STATIC libraries do not link their compiler PDB file becomes more
      important.  Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and
      "COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB
      file location and pass the value to the MSVC /Fd option.
      fba51b09
  9. 29 Jan, 2014 2 commits
    • Brad King's avatar
      project: Manage VERSION variables · 7e142c5a
      Brad King authored
      
      
      Teach the project() command to set variables
      
        {PROJECT,<PROJECT-NAME>}_VERSION{,_MAJOR,_MINOR,_PATCH,_TWEAK}
      
      holding the project version number and its components.  Add project()
      command option "VERSION" to specify the version explicitly, and default
      to the empty string when it is not given.
      
      Since this clears variables when no VERSION is given, this may change
      behavior for existing projects that set the version variables themselves
      prior to calling project().  Add policy CMP0048 for compatibility.
      Suggested-by: Alexander Neundorf's avatarAlex Neundorf <neundorf@kde.org>
      7e142c5a
    • Brad King's avatar
      Help: Format project command and variable documentation · 00007dcc
      Brad King authored
      Also add document for CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE variable.
      00007dcc
  10. 16 Jan, 2014 1 commit
    • Brad King's avatar
      Help: Document CMAKE_OSX_* variables · 45056264
      Brad King authored
      Add documentation entries for variables
      
       CMAKE_OSX_ARCHITECTURES
       CMAKE_OSX_DEPLOYMENT_TARGET
       CMAKE_OSX_SYSROOT
      
      Explain what each does and when/how they should be set.
      45056264
  11. 08 Jan, 2014 1 commit
  12. 02 Jan, 2014 1 commit
  13. 04 Dec, 2013 1 commit
    • Brad King's avatar
      VS: Add CMAKE_VS_(DEVENV|MSBUILD|MSDEV)_COMMAND variables · 0c55729c
      Brad King authored
      Since commit 5f5c92b9 (VS: Add internal APIs to find MSBuild,
      devenv/VCExpress, and msdev, 2013-11-13) the VS generators have
      known how to lookup the locations of their build tools directly.
      Expose this information to CMake language code by defining new
      variables to hold the paths to these tools.
      0c55729c
  14. 02 Dec, 2013 1 commit
  15. 27 Nov, 2013 2 commits
  16. 25 Nov, 2013 1 commit
  17. 21 Nov, 2013 1 commit
    • Stephen Kelly's avatar
      Introduce CMAKE_STAGING_PREFIX variable. · 7521da28
      Stephen Kelly authored
      This variable can be useful in cross-compiling contexts where the
      sysroot is read-only or where the sysroot should otherwise remain
      pristine.
      
      If the new CMAKE_STAGING_PREFIX variable is set, it is used instead
      of CMAKE_INSTALL_PREFIX when generating the installation rules in
      cmake_install.cmake.
      
      This way, the CMAKE_INSTALL_PREFIX variable
      always refers to the installation prefix on the target device, regardless
      of whether host==target.
      
      If any -rpath paths passed to the linker contain the CMAKE_STAGING_PREFIX,
      the matching path fragments are replaced with the CMAKE_INSTALL_PREFIX.
      Matching paths in the -rpath-link are not transformed.
      
      The cross-prefix usr-move workaround is assumed not to require extension
      regarding CMAKE_STAGING_PREFIX. The staging area is a single prefix, so
      there is no scope for cross-prefix symlinks. The CMAKE_INSTALL_PREFIX
      is still used to determine the workaround path, and that variable
      remains the relevant one even if CMAKE_STAGING_PREFIX is used. If the
      generated export files are deployed to the target, the workaround
      will still be in place, and still be employed if required.
      7521da28
  18. 19 Nov, 2013 3 commits
    • Stephen Kelly's avatar
      Add CMAKE_SYSROOT variable to set --sysroot when cross compiling. · 7cd65c97
      Stephen Kelly authored
      As CMAKE_ROOT_FIND_PATH can be a list, a new CMAKE_SYSROOT is
      introduced, which is never a list.
      
      The contents of this variable is passed to supporting compilers
      as --sysroot. It is also accounted for when processing implicit
      link directories reported by the compiler, and when generating
      RPATH information.
      7cd65c97
    • Stephen Kelly's avatar
      Allow toolchain files to specify an external toolchain. · 5096967e
      Stephen Kelly authored
      Clang can compile code, but uses the gcc tools for other tasks such
      as linking. The -gcc-toolchain option can be used for that, but
      generalize so that other compilers can be treated the same.
      
      If such a location is specified, use it as a hint for finding
      the binutils executables.
      5096967e
    • 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})
      
      or
      
       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.
      76552d59
  19. 02 Nov, 2013 1 commit
  20. 01 Nov, 2013 1 commit
    • Brad King's avatar
      Help: Limit reference manual toctree depth to 1 · c76e44e7
      Brad King authored
      Add a :maxdepth: option to all toctree directives to limit their depth
      to 1.  We do not want subheadings from individual documents to pollute
      the already large lists of CMake Domain objects.
      c76e44e7
  21. 31 Oct, 2013 1 commit
  22. 30 Oct, 2013 1 commit
    • Brad King's avatar
      Help: Glob manual/*.rst in Sphinx configuration · f88332f5
      Brad King authored
      Add the man page description line as explicit markup at the top of each
      Help/manual/*.rst file and scan it from conf.py to automatically
      generate the man_pages Sphinx configuration value.  This reduces the
      number of places that need to be changed when a new manual is added.
      f88332f5
  23. 24 Oct, 2013 2 commits
    • Stephen Kelly's avatar
      Add automatic rcc invocation for Qt. · 9c87d9cc
      Stephen Kelly authored
      This replaces the need to invoke qt4_add_resources by allowing
      adding the source .qrc file directly to the target sources.
      9c87d9cc
    • Stephen Kelly's avatar
      Add automatic uic invocation for Qt. · 84218e18
      Stephen Kelly authored
      The source files are already processed by cmQtAutomoc to look for
      moc includes, so extend that to also look for ui_ includes and
      find corresponding .ui files to process.
      
      This replaces the need to invoke qt4_wrap_ui().
      
      As the ui files are not likely to be part of the SOURCES of the
      target, store the options associated with them separately in the
      cmMakefile for querying during the autogen run.
      84218e18
  24. 18 Oct, 2013 1 commit
  25. 15 Oct, 2013 1 commit