1. 28 Oct, 2013 1 commit
    • Brad King's avatar
      Require CMAKE_<LANG>_COMPILER to be found as a full path · 3e04946f
      Brad King authored
      All generators now support detection of the full path to the compiler, so
      require it to be so.  This will allow CMake<LANG>Information.cmake and
      other logic to assume the full path to the compiler tool is available.
      The Makefile generators already rejected CMAKE_<LANG>_COMPILER values
      that did not name an existing compiler.  Extend this error message to
      all generators, make it occur as early as possible, and improve the
      message with advice about how to set the compiler.  If the full path to
      the compiler is not known, finish enabling languages with a fatal error
      so configuration does not continue.
      For now, allow the RC language compiler to not be a full path.  Later we
      will need to detect the full path to "rc" under the VS IDE.
      Add a RunCMake.CompilerNotFound test to cover failure cases.
      Fix the RunCMake.CompilerChange test EmptyCompiler case to work
      when configuration does not continue past enable_language.
  2. 26 Oct, 2013 1 commit
    • Stephen Kelly's avatar
      Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES. · 239b0c6b
      Stephen Kelly authored
      Only valid target names or generator expressions may appear in
      the target field of a LINK_ONLY expression.
      Other content like link flags should still be added to that property
      (wrapped in config-specific generator expressions), but not wrapped
      in LINK_ONLY. Otherwise undue warnings would be issued for the
      policy CMP0022.
      The LINK_ONLY expression only has an effect for actual target
      names anyway, so there is no logical deficit.
  3. 25 Oct, 2013 1 commit
  4. 24 Oct, 2013 1 commit
  5. 23 Oct, 2013 3 commits
    • Brad King's avatar
      Add \-continuation to CMake language quoted arguments · efcf318f
      Brad King authored
      Teach the CMake language lexer to treat the \-LF pair terminating a
      line ending in an odd number of backslashes inside a quoted argument
      as a continuation.  Drop the pair from the returned quoted argument
      token text.  This will allow long lines inside quoted argument
      strings to be divided across multiple lines in the source file.
      It will also allow quoted argument text to start on the line after
      the opening quote.  For example, the code:
       set(x "\
      sets variable "x" to the value "..." with no opening newline.
      Previously an odd number of backslashes at the end of a line inside
      a quoted argument would put a \-LF pair (or a \-CR pair) literally
      in the argument.  Then the command-argument evaluator would complain
      that the \-escape sequence is invalid.  Therefore this syntax is
      available to use without changing behavior of valid existing code.
      Teach the RunCMake.Syntax test to cover cases of quoted arguments
      with lines ending in \, \\, and \\\.  Odd counts are continuations.
    • Brad King's avatar
      Drop compatibility with CMake < 2.4 · 7d47c693
      Brad King authored
      Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to
      a value lower than 2.4, and generate an error when projects or the user
      attempt to do so.  In the error suggest using a CMake 2.8.x release.
      Teach cmake_minimum_required to warn about projects that do not require
      at least CMake 2.4.  They are not supported by CMake >= 3.0.
      Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a
      reference to policy CMP0001.
    • Stephen Kelly's avatar
      CMP0022: Output link interface mismatch for static library warning · 0b3b3368
      Stephen Kelly authored
      Other warnings for the same policy already have similar output since
      commit 81d2793e (Add differing target property content to policy CMP0022
      warning, 2013-09-11).
  6. 22 Oct, 2013 9 commits
  7. 21 Oct, 2013 3 commits
  8. 19 Oct, 2013 1 commit
  9. 18 Oct, 2013 1 commit
  10. 17 Oct, 2013 4 commits
    • Brad King's avatar
      Add Lua-style long brackets and long comments to CMake language · daa0f6f9
      Brad King authored
      Teach the CMake language parser to recognize Lua-style "long bracket"
      arguments.  These start with two '[' separated by zero or more '='
      characters e.g. "[[" or "[=[" or "[==[".  They end with two ']'
      separated by the same number of '=' as the opening bracket.  There is no
      nesting of brackets of the same level (number of '=').  No escapes,
      variable expansion, or other processing is performed on the content
      between such brackets so they always represent exactly one argument.
      Also teach CMake to parse and ignore "long comment" syntax.  A long
      comment starts with "#" immediately followed by an opening long bracket.
      It ends at the matching close long bracket.
      Teach the RunCMake.Syntax test to cover long bracket and long comment
    • Brad King's avatar
      cmListFileLexer: Convert CRLF -> LF newlines explicitly · a8c65234
      Brad King authored
      Read input files in binary mode instead of text mode and convert CRLF
      newlines to LF newlines explicitly in our own buffer.  This is necessary
      to read CMake source files with CRLF newlines on platforms whose C
      runtime libraries do not transform newlines in text mode.  For example,
      a Cygwin or Linux binary may not transform CRLF -> LF in files read from
      a Windows filesystem.  Perform the conversion ourselves to ensure that
      multi-line string literals in CMake source files have LF newlines
    • Brad King's avatar
      cmListFileLexer: Allow a leading UTF-8 Byte-Order-Mark (#11137) · dbd93336
      Brad King authored
      Teach the lexer to read a UTF-8, UTF-16 BE/LE, or UTF-32 BE/LE
      Byte-Order-Mark from the start of a file if any is present.  Report an
      error on files using UTF-16 or UTF-32 and accept a UTF-8 or missing BOM.
    • Brad King's avatar
      cmListFileLexer: Allow command names with one letter (#14181) · 56457837
      Brad King authored
      Teach the lexer to treat a single letter as an identifier instead of an
      unquoted argument.  Outside of a command invocation, the parser treats
      an identifier as a command name and an unquoted argument as an error.
      Inside of a command invocation, the parser treats an identifier as an
      unquoted argument.  Therefore this change to the lexer will make what
      was previously an error case work with no other behavioral change.
  11. 16 Oct, 2013 1 commit
  12. 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
    • 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.
  13. 10 Oct, 2013 1 commit
  14. 08 Oct, 2013 3 commits
    • Stephen Kelly's avatar
    • 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.
    • 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>])
  15. 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.
    • Stephen Kelly's avatar
    • 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.
    • 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.
  16. 16 Sep, 2013 1 commit
  17. 13 Sep, 2013 1 commit
  18. 11 Sep, 2013 1 commit
  19. 16 Aug, 2013 1 commit