1. 07 Dec, 2015 1 commit
  2. 23 Nov, 2015 1 commit
    • Brad King's avatar
      Revert "Disable shared library support when compiler links statically" (#15855) · 9682de56
      Brad King authored
      In commit v3.4.0-rc1~18^2 (Disable shared library support when compiler
      links statically, 2015-09-30) we tried to detect when the compiler is
      not capable of linking shared libraries (possibly due to flags in use).
      However, the approach is not robust against flags like `-nostdlib`.
      Revert it for now pending another solution to the original problem.
      9682de56
  3. 30 Sep, 2015 1 commit
    • Brad King's avatar
      Disable shared library support when compiler links statically · 8b4873a1
      Brad King authored
      When a user or a compiler wrapper adds '-static' to the compiler flags
      then it will always link static binaries.  Detect this from the compiler
      id binary and disable TARGET_SUPPORTS_SHARED_LIBS.  This will prevent
      projects from accidentally adding shared libraries when the toolchain
      does not support them.  It also helps CMake avoid linking with flags
      that require shared libraries to be supported.
      8b4873a1
  4. 18 Sep, 2015 3 commits
  5. 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
  6. 20 Mar, 2014 1 commit
    • Tim Blechmann's avatar
      Treat .m files consistently as C across all generators · 95cdf132
      Tim Blechmann authored
      Objective C sources should be compiled with the C compiler, not C++.
      
      The Xcode generator correctly classifies ".m" sources already.  The
      cmSystemTools::GetFileFormat method was fixed by commit v2.8.0~1782 (fix
      for 7045, use gcc for .m, 2008-08-19) but it is not used by any of the
      generator since commit v2.4.0~2819 (major changes to support addition of
      languages, 2004-09-22).
      
      Fix the CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS table entries so that
      cmGlobalGenerator::GetLanguageFromExtension tells the Makefile, Ninja,
      and VS IDE generators to compile ".m" sources as C.  This makes behavior
      consistent on all generators.
      Signed-off-by: Tim Blechmann's avatarTim Blechmann <tim@klingt.org>
      95cdf132
  7. 24 Oct, 2013 1 commit
  8. 04 Oct, 2013 1 commit
    • Brad King's avatar
      CMakeDetermineCompilerId: Add notion of "simulated" id/version · 51ab85c3
      Brad King authored
      Some compilers try to simulate other compilers as a drop-in replacement
      supporting all the same command-line options and predefined preprocessor
      macros.  In such cases it will be useful to have CMake load the compiler
      information files for the simulated compiler instead of duplicating the
      information.  Teach CMakeDetermineCompilerId to extract the simulated
      compiler id and version when the compiler id detection provides it.
      51ab85c3
  9. 11 Dec, 2012 1 commit
    • Brad King's avatar
      OS X: Detect implicit linker framework search paths · cc676c3a
      Brad King authored
      Previously we hard-coded a list of implicit framework directories but
      did not account for CMAKE_OSX_SYSROOT or for changes to the list across
      OS X versions.  Instead we should automatically detect the framework
      directories for the active toolchain.
      
      The parent commit added the "-Wl,-v" option to ask "ld" to print its
      implicit directories.  It displays a block such as:
      
       Framework search paths:
      	/...
      
      Parse this block to extract the list of framework directories.
      
      Detection may fail on toolchains that do not list their framework
      directories, such as older OS X linkers.  Always treat the paths
      
       <sdk>/Library/Frameworks
       <sdk>/System/Library/Frameworks
       <sdk>/Network/Library/Frameworks # Older OS X only
       /System/Library/Frameworks
      
      as implicit.  Note that /System/Library/Frameworks should always be
      considered implicit so that frameworks CMake finds there will not
      override the SDK copies.
      cc676c3a
  10. 21 Sep, 2012 1 commit
    • Brad King's avatar
      OS X: Always generate -isysroot if any SDK is in use · a0a0877a
      Brad King authored
      Drop the last use of CMAKE_OSX_SYSROOT_DEFAULT.  Replace internal
      platform variable CMAKE_${lang}_HAS_ISYSROOT with a more general
      CMAKE_${lang}_SYSROOT_FLAG variable.  If the -isysroot flag exists and
      CMAKE_OSX_SYSROOT points to an SDK (not "/") then always add it to
      compiler command lines.  This is already done in the Xcode IDE.
      a0a0877a
  11. 24 Aug, 2012 2 commits
    • Brad King's avatar
      Store ABI detection results in compiler information files · e5fee8a7
      Brad King authored
      Drop use of cache entry CMAKE_DETERMINE_<LANG>_ABI_COMPILED and replace
      it with variable CMAKE_<LANG>_ABI_COMPILED.  Since the grandparent
      commit this test result is specific to the version of CMake.  Store it
      in the version-specific compiler information files instead of
      CMakeCache.txt so testing can be re-done to meet the requirements of the
      current version of CMake even if another version of CMake was already
      used to configure the build tree.
      e5fee8a7
    • Brad King's avatar
      Move CMAKE_<LANG>_COMPILER_WORKS to compiler information files · 3df81b49
      Brad King authored
      Since the parent commit this test result is specific to the version of
      CMake.  Store it in the version-specific compiler information files
      instead of CMakeCache.txt so testing can be re-done to meet the
      requirements of the current version of CMake even if another version of
      CMake was already used to configure the build tree.
      3df81b49
  12. 13 Aug, 2012 2 commits
    • Kitware Robot's avatar
      Remove CMake-language block-end command arguments · 9db31162
      Kitware Robot authored
      Ancient versions of CMake required else(), endif(), and similar block
      termination commands to have arguments matching the command starting the
      block.  This is no longer the preferred style.
      
      Run the following shell code:
      
      for c in else endif endforeach endfunction endmacro endwhile; do
          echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
      done >convert.sed &&
      git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
      egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
      egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
      xargs -0 sed -i -f convert.sed &&
      rm convert.sed
      9db31162
    • Kitware Robot's avatar
      Convert CMake-language commands to lower case · 77543bde
      Kitware Robot authored
      Ancient CMake versions required upper-case commands.  Later command
      names became case-insensitive.  Now the preferred style is lower-case.
      
      Run the following shell code:
      
      cmake --help-command-list |
      grep -v "cmake version" |
      while read c; do
          echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
      done >convert.sed &&
      git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
      egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
      xargs -0 sed -i -f convert.sed &&
      rm convert.sed
      77543bde
  13. 09 Jun, 2012 1 commit
  14. 08 Jun, 2012 1 commit
  15. 07 Dec, 2011 1 commit
    • Brad King's avatar
      Add framework to detect compiler version with its id (#12408) · fa7141f5
      Brad King authored
      Teach CMakePlatformId.h to construct an "INFO:compiler_version[]" string
      literal from macros COMPILER_VERSION_(MAJOR|MINOR|PATCH|TWEAK) to be
      defined in CMake(C|CXX)CompilerId.(c|cpp) for each compiler.  Provide
      conversion macros DEC() and HEX() to decode decimal or hex digits from
      integer values.  Parse the version out of the compiler id binary along
      with the other INFO values already present.
      
      Store the result in variable CMAKE_<LANG>_COMPILER_VERSION in the format
      "major[.minor[.patch[.tweak]]]".  Save the value persistently in
      CMake(C|CXX)Compiler.cmake in the build tree.  Document the variable for
      internal use since we do not set it everywhere yet.
      
      Report the compiler version on the compiler id result line e.g.
      
        The C compiler identification is GNU 4.5.2
      
      Report CMAKE_(C|CXX)_COMPILER_(ID|VERSION) in SystemInformation test.
      fa7141f5
  16. 08 Jun, 2011 1 commit
  17. 11 Feb, 2010 1 commit
  18. 29 Jan, 2010 1 commit
    • David Cole's avatar
      Fix issue #10155 - default value of CMAKE_OSX_DEPLOYMENT_TARGET should always... · 6ee87b2e
      David Cole authored
      Fix issue #10155 - default value of CMAKE_OSX_DEPLOYMENT_TARGET should always be the empty string. When the value of CMAKE_OSX_DEPLOYMENT_TARGET is the empty string, the -mmacosx-version-min flag should not show up on the compiler command line. The logic for selecting default value of CMAKE_OSX_SYSROOT is orthogonal to and independent of the value of the deployment target. The default value for CMAKE_OSX_SYSROOT is the SDK that corresponds to the current version of Mac OSX on which cmake is running.
      6ee87b2e
  19. 28 Jan, 2010 1 commit
  20. 22 Jan, 2010 1 commit
  21. 19 Nov, 2009 1 commit
  22. 19 Sep, 2009 1 commit
    • Brad King's avatar
      Fix check for -isysroot on OS X · 180c60a8
      Brad King authored
      Previously we checked for this flag by parsing the version number of GCC
      out of 'gcc --version', but this is not reliable because the format can
      vary greatly.  Now we run 'gcc -v --help' and look for '-isysroot' in
      the list of options.
      
      We also now store the result on a per-language basis in the per-compiler
      info file "CMake<LANG>Compiler.cmake".  This is necessary to make it
      accessible from try-compile projects so that they generate correctly.
      180c60a8
  23. 23 Jul, 2009 1 commit
    • Brad King's avatar
      ENH: Implicit link info for C, CXX, and Fortran · 07ea19ad
      Brad King authored
      This teaches CMake to detect implicit link information for C, C++, and
      Fortran compilers.  We detect the implicit linker search directories and
      implicit linker options for UNIX-like environments using verbose output
      from compiler front-ends.  We store results in new variables called
      
        CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES
        CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES
      
      The implicit libraries can contain linker flags as well as library
      names.
      07ea19ad
  24. 21 Jan, 2008 1 commit
  25. 12 Jul, 2007 1 commit
  26. 11 Jul, 2007 2 commits
    • Alexander Neundorf's avatar
      16705a3e
    • Alexander Neundorf's avatar
      · bea1a5de
      Alexander Neundorf authored
      ENH: CMAKE_<LANG>_LINKER_PREFERENCE is now an integer priority, not a
      two-step priority (None or Prefered)
      Current order: ASM 0, C 10, Fortran 20, CXX 30, Java 40
      This is the same order as automake choses:
      http://www.gnu.org/software/automake/manual/html_node/How-the-Linker-is-Chosen.html
      
      This change should be backward compatible:
      if there is a project using fortran and CXX, they had to set the
      LINKER_LANGUAGE explicitely, otherwise cmake complained (but still generated
      the project files). Explicitely setting the linker language still overrides
      automatic detection.
      If somebody has a custom language for cmake and the PREFERENCE starts with
      "P", its changed to 100, which gives it preference over all other languages
      (except the other custom languages which have also "Prefered"). "None" is
      converted to 0.
      
      Alex
      bea1a5de
  27. 11 Jun, 2007 1 commit
    • Alexander Neundorf's avatar
      · 422dc631
      Alexander Neundorf authored
      ENH: split cmGlobalGenerator::SetLanguageEnabled() in two parts, where the
      second part copies the values from the cmake variables into internal maps.
      So this can now be done after the compiler-specific information has been
      loaded, which can now overwrite more settings.
      
      Alex
      422dc631
  28. 17 May, 2007 1 commit
    • Alexander Neundorf's avatar
      · 61d3444f
      Alexander Neundorf authored
      ENH: merge CMake-CrossCompileBasic to HEAD
      -add a RESULT_VARIABLE to INCLUDE()
      -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain
      -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system)
      -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to
      run the executables if they have a different suffix because they are
      probably crosscompiled, but nevertheless it should be able to find them
      -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE
      -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.)
      -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake
      -add support for stripping during install in cmake_install.cmake
      -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools
      -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms
      -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these
      -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a
      list of directories which will be prepended to all search directories, right
      now as a cmake variable, turning it into a global cmake property may need
      some more work
      -remove cmTestTestHandler::TryExecutable(), it's unused
      -split cmFileCommand::HandleInstall() into slightly smaller functions
      
      Alex
      61d3444f
  29. 28 Apr, 2007 1 commit
  30. 25 Jan, 2006 1 commit
  31. 14 Nov, 2005 1 commit
  32. 20 Jul, 2005 1 commit
  33. 20 Jan, 2005 1 commit
  34. 17 Jan, 2005 1 commit
  35. 22 Sep, 2004 1 commit