1. 21 Oct, 2013 1 commit
  2. 18 Oct, 2013 1 commit
  3. 16 Oct, 2013 1 commit
  4. 11 Oct, 2013 2 commits
    • Stephen Kelly's avatar
      cmTarget: Deprecate the LOCATION target property with a policy. · e4e5b28c
      Stephen Kelly authored
      The final location and name of a build-target is not determined
      until generate-time. However, reading the LOCATION property from
      a target is currently allowed at configure time. Apart from creating
      possibly-erroneous results, this has an impact on the implementation
      of cmake itself, and prevents some major cleanups from being made.
      
      Disallow reading LOCATION from build-targets with a policy. Port some
      existing uses of it in CMake itself to use the TARGET_FILE generator
      expression.
      e4e5b28c
    • Stephen Kelly's avatar
      export(): Process the export() command at generate time. · 66b290e7
      Stephen Kelly authored
      Make the API for adding targets string based so that it can easily
      use cmGeneratorTarget.
      
      Teach the cmIncludeCommand to generate the exported file at
      configure-time instead if it is to be include()d.
      
      The RunCMake.ExportWithoutLanguage test now needs a dummy header.h
      file as expected error from export() is now reported after the
      missing file error.
      66b290e7
  5. 10 Oct, 2013 1 commit
  6. 08 Oct, 2013 3 commits
    • Stephen Kelly's avatar
      f69606d3
    • Stephen Kelly's avatar
      message: Add a DEPRECATION mode · 509c142a
      Stephen Kelly authored
      By default, the message is not issued. If CMAKE_ERROR_DEPRECATED
      is on, the message is fatal. If CMAKE_WARN_DEPRECATED is on, the
      message is a warning.
      509c142a
    • Daniele E. Domenichelli's avatar
      CheckStructHasMember: Add support for C++ · 73d28d21
      Daniele E. Domenichelli authored
      Previously if headers required to check if a struct has a member can be
      compiled with C++ compiler only, the check would fail because the C
      compiler fails.  As a consequence, the result variable would be set to
      false, even if the struct has that particular member.
      
      Teach CHECK_STRUCT_HAS_MEMBER to accept a new optional argument LANGUAGE
      that allows one to explicitly set the compiler to use.  The new
      signature is therefore:
      
        CHECK_STRUCT_HAS_MEMBER (<struct> <member> <header> <variable>
                                 [LANGUAGE <language>])
      73d28d21
  7. 07 Oct, 2013 4 commits
    • Brad King's avatar
      Set policy CMP0025 to NEW while building CMake itself · 1763c31c
      Brad King authored
      CMake is aware of the policy's NEW behavior and the AppleClang compiler
      id.  Set the policy to NEW explicitly to avoid the warning and get the
      NEW behavior.
      
      Also teach the RunCMake test infrastructure to build tests with
      -DCMAKE_POLICY_DEFAULT_CMP0025=NEW to avoid the policy warning
      in test output that must match specific regular expressions.
      1763c31c
    • Stephen Kelly's avatar
      435c9128
    • Stephen Kelly's avatar
      export: Add policy CMP0024 to disallow include() of export files · 904ff9fe
      Stephen Kelly authored
      Currently, export() is executed at configure-time.
      
      One problem with this is that certain exported properties like
      the link interface may not be complete at the point the export() is
      encountered leading to an incorrect or incomplete exported
      representation. Additionally, the generated IMPORTED_LOCATION
      property may even be incorrect if commands following the export()
      have an effect on it.
      
      Another problem is that it requires the C++ implementation of cmake
      to be capable of computing the exported information at configure time.
      This is a limitation on the cleanup and maintenance of the code. At
      some point in the future, this limitation will be dropped and more
      implementation will be moved from cmTarget to cmGeneratorTarget.
      904ff9fe
    • Stephen Kelly's avatar
      Add the INTERFACE_LIBRARY target type. · fe732264
      Stephen Kelly authored
      This target type only contains INTERFACE_* properties, so it can be
      used as a structural node. The target-specific commands enforce
      that they may only be used with the INTERFACE keyword when used
      with INTERFACE_LIBRARY targets. The old-style target properties
      matching LINK_INTERFACE_LIBRARIES_<CONFIG> are always ignored for
      this target type.
      
      The name of the INTERFACE_LIBRARY must match a validity generator
      expression. The validity is similar to that of an ALIAS target,
      but with the additional restriction that it may not contain
      double colons. Double colons will carry the meaning of IMPORTED
      or ALIAS targets in CMake 2.8.13.
      
      An ALIAS target may be created for an INTERFACE library.
      
      At this point it can not be exported and does not appear in the
      buildsystem and project files are not created for them. That may
      be added as a feature in a later commit.
      
      The generators need some changes to handle the INTERFACE_LIBRARY
      targets returned by cmComputeLinkInterface::GetItems. The Ninja
      generator does not use that API, so it doesn't require changes
      related to that.
      fe732264
  8. 16 Sep, 2013 1 commit
  9. 13 Sep, 2013 1 commit
  10. 11 Sep, 2013 1 commit
  11. 16 Aug, 2013 1 commit
  12. 15 Aug, 2013 1 commit
    • Brad King's avatar
      Do not warn about left paren not separated by a space · 9040ec91
      Brad King authored
      Since commit 58e52416 (Warn about arguments not separated by whitespace,
      2013-02-16) we warn about arguments not separated by spaces.  Loosen the
      warning to not complain about left parens not separated by spaces from
      the preceding token.  This is common in code like "if(NOT(X))".
      
      Teach the RunCMake.Syntax test to cover cases of left parens not
      separated by spaces and check that no warning appears.
      9040ec91
  13. 13 Aug, 2013 1 commit
  14. 08 Aug, 2013 6 commits
  15. 02 Aug, 2013 1 commit
    • Stephen Kelly's avatar
      Add the ALIAS target concept for libraries and executables. · 370bf554
      Stephen Kelly authored
      * The ALIAS name must match a validity regex.
      * Executables and libraries may be aliased.
      * An ALIAS acts immutable. It can not be used as the lhs
        of target_link_libraries or other commands.
      * An ALIAS can be used with add_custom_command, add_custom_target,
        and add_test in the same way regular targets can.
      * The target of an ALIAS can be retrieved with the ALIASED_TARGET
        target property.
      * An ALIAS does not appear in the generated buildsystem. It
        is kept separate from cmMakefile::Targets for that reason.
      * A target may have multiple aliases.
      * An ALIAS target may not itself have an alias.
      * An IMPORTED target may not have an alias.
      * An ALIAS may not be exported or imported.
      370bf554
  16. 31 Jul, 2013 1 commit
  17. 29 Jul, 2013 1 commit
    • Stephen Kelly's avatar
      install: Remove error condition using INCLUDES DESTINATION without EXPORT. · 72d13ff4
      Stephen Kelly authored
      Commit 650e61f8 (Add a convenient way to add the includes install
      dir to the INTERFACE., 2013-01-05) introduced an error case for
      using the install(TARGETS) command with specified INCLUDES DESTINATION,
      but no specified EXPORT set.
      
      It is convenient to use a variable to set the various destinations
      for different outputs (as KDE does), and some targets such as
      executables are installed but not exported. This was triggering
      the error case, but as it is a common case, remove the error.
      72d13ff4
  18. 26 Jul, 2013 2 commits
  19. 25 Jul, 2013 2 commits
  20. 24 Jul, 2013 3 commits
    • Stephen Kelly's avatar
      target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature · b655865b
      Stephen Kelly authored
      Add a new signature to help populate INTERFACE_LINK_LIBRARIES and
      LINK_LIBRARIES cleanly in a single call.  Add policy CMP0023 to control
      whether the keyword signatures can be mixed with uses of the plain
      signatures on the same target.
      b655865b
    • Stephen Kelly's avatar
      Add a convenient way to add the includes install dir to the INTERFACE. · 650e61f8
      Stephen Kelly authored
      Export the INCLUDES DESTINATION without appending to the
      INTERFACE_INCLUDE_DIRECTORIES of the target itself. That way, a target
      can be exported multiple times with different INCLUDES DESTINATION
      without unintended cross-pollution of export sets.
      650e61f8
    • Stephen Kelly's avatar
      Remove the LINK_LANGUAGE generator expression. · 4f6bd702
      Stephen Kelly authored
      It accepted an optional argument to test for equality, but no way
      to get the linker language of a particular target.
      
      TARGET_PROPERTY provides this flexibility and STREQUAL provides
      the necessary API for equality test.
      
      Extend the CompileDefinitions test to cover accessing the
      property of another target.
      4f6bd702
  21. 17 Jul, 2013 1 commit
    • Brad King's avatar
      Teach compiler ABI check to tolerate try_compile COPY_FILE failure · 4dc40185
      Brad King authored
      In CMakeDetermineCompilerABI we use try_compile with the COPY_FILE
      option to get a copy of the compiled binary used to detect the ABI
      information.  We already tolerate the case when compilation fails.
      However, when compilation appears to succeed but does not produce the
      expected executable the try_compile command immediately reports an error
      because the COPY_FILE fails.
      
      Tolerate COPY_FILE failure without stopping the overall configuration
      process by using the try_compile COPY_FILE_ERROR option to capture the
      error message.  Log the full error to CMakeError.log and simply report
      failure to detect the ABI as if compilation had failed.
      
      Teach the RunCMake.Configure test to cover this case and verify that the
      messages show up as expected both in stdout and in CMakeError.log.
      4dc40185
  22. 15 Jul, 2013 1 commit
    • Brad King's avatar
      try_compile: Add COPY_FILE_ERROR option to capture failure · c28715b1
      Brad King authored
      When the COPY_FILE operation fails optionally capture the error message
      with a COPY_FILE_ERROR option instead of reporting the error
      immediately.  This gives callers a chance to do something else or report
      the error.
      
      Teach the RunCMake.try_compile test to cover bad argument combinations
      involving COPY_FILE_ERROR.  Teach the TryCompile test to cover the case
      of a COPY_FILE error message captured by COPY_FILE_ERROR.
      c28715b1
  23. 14 Jul, 2013 1 commit
  24. 11 Jul, 2013 1 commit
  25. 09 Jul, 2013 1 commit
    • Brad King's avatar
      cmake: On configure error suggest looking at CMake*.log files · 18e1bfbb
      Brad King authored
      When CMake reports failure to configure a project, especially when the
      toolchain does not initialize properly, the true reason may be clear
      from reading the CMakeFiles/CMake(Output|Error).log files.  Advise users
      to look at these files if they exist when configuration fails.
      
      Add RunCMake.Configure test to check that the log files are mentioned
      when configuration fails.
      18e1bfbb