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.
      3e04946f
  2. 26 Oct, 2013 4 commits
  3. 25 Oct, 2013 2 commits
  4. 24 Oct, 2013 3 commits
    • Stephen Kelly's avatar
      Make ExportLanguages a subtest of the ObjectLibrary test · 310aef95
      Stephen Kelly authored
      It was a subtest of the RunCMake.ObjectLibrary test. However, we need
      to test a build with ExternalProject after running CMake, which RunCMake tests
      do not do.
      310aef95
    • Stephen Kelly's avatar
      Refactor the Plugin test. · 30ff6cf9
      Stephen Kelly authored
      Policy CMP0024 was introduced to disallow the include() of a file
      generated by export().
      
      Use ExternalProject to test the plugins after building.
      30ff6cf9
    • Stephen Kelly's avatar
      cmTarget: Add interface for compatible numeric properties · ff6c4013
      Stephen Kelly authored
      When using the boost MPL library, one can set a define to increase
      the limit of how many variadic elements should be supported. The
      default for BOOST_MPL_LIMIT_VECTOR_SIZE is 20:
      
       http://www.boost.org/doc/libs/1_36_0/libs/mpl/doc/refmanual/limit-vector-size.html
      
      If the foo library requires that to be set to 30, and the independent
      bar library requires it to be set to 40, consumers of both need to set
      it to 40.
      
       add_library(foo INTERFACE)
       set_property(TARGET foo PROPERTY INTERFACE_boost_mpl_vector_size 30)
       set_property(TARGET foo PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX boost_mpl_vector_size)
       target_compile_definitions(foo INTERFACE BOOST_MPL_LIMIT_VECTOR_SIZE=$<TARGET_PROPERTY:boost_mpl_vector_size>)
      
       add_library(bar INTERFACE)
       set_property(TARGET bar PROPERTY INTERFACE_boost_mpl_vector_size 40)
       # Technically the next two lines are redundant, but as foo and bar are
       # independent, they both set these interfaces.
       set_property(TARGET bar PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX boost_mpl_vector_size)
       target_compile_definitions(bar INTERFACE BOOST_MPL_LIMIT_VECTOR_SIZE=$<TARGET_PROPERTY:boost_mpl_vector_size>)
      
       add_executable(user)
       target_link_libraries(user foo bar)
      
      Because the TARGET_PROPERTY reads the boost_mpl_vector_size property
      from the HEAD of the dependency graph (the user target), and because
      that property appears in the COMPATIBLE_INTERFACE_NUMBER_MAX of
      the dependencies of the user target, the maximum value for it is
      chosen for the compile definition, ie, 40.
      
      There are also use-cases for choosing the minimum value of a number.
      In Qt, deprecated API can be disabled by version. Setting the
      definition QT_DISABLE_DEPRECATED_BEFORE=0 disables no deprecated
      API. Setting it to 0x501000 disables API which was deprecated before
      Qt 5.1 etc.
      
      If two dependencies require the use of API which was deprecated in
      different Qt versions, then COMPATIBLE_INTERFACE_NUMBER_MIN can be
      used to ensure that both can compile.
      ff6c4013
  5. 23 Oct, 2013 5 commits
    • Brad King's avatar
      cmRST: Teach cmake-module directive to scan bracket comments · 2945814d
      Brad King authored
      When scanning CMake module files for .rst comments, recognize
      bracket comments starting in ".rst:" too.  For example:
      
       #[[.rst:
      
      Include the bracket comment content terminated by the closing bracket.
      Exclude the line containing the bracket if it starts in "#".
      
      Teach the CMakeLib.testRST test to cover multiple bracket lengths
      and ending brackets on lines with and without "#".
      
      Update the cmake-developer.7 manual to document the bracket-comment
      syntax for .rst documentation.
      2945814d
    • 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.
      efcf318f
    • 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.
      7d47c693
    • Brad King's avatar
      CTestTest*: Update minimum required CMake to 2.4 · c7c44fc7
      Brad King authored
      We will soon deprecate support for compatibility with CMake < 2.4.
      c7c44fc7
    • 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).
      0b3b3368
  6. 22 Oct, 2013 9 commits
  7. 21 Oct, 2013 7 commits
    • Nils Gladitz's avatar
      7a665ae7
    • Brad King's avatar
      cmRST: Process literal blocks after paragraphs ending in '::' · 2d0287dd
      Brad King authored
      Teach cmRST to recognize non-markup lines ending in '::' followed by a
      blank line as starting a literal block.  Record the whole block as if it
      were a literal block directive and print it just like a code block.
      Extend the CMakeLib.testRST test to cover such cases.
      2d0287dd
    • Brad King's avatar
      cmRST: Do not process inline markup in code-block literals · 7b9ae406
      Brad King authored
      Move the ProcessDirectiveParsedLiteral and ProcessDirectiveCodeBlock
      method internals into an OutputMarkupLines helper.  Pass through it a
      new "inlineMarkup" parameter and teach OutputLine to understand it.
      When false, do not process inline markup.  Extend the CMakeLib.testRST
      test to cover the two cases.
      7b9ae406
    • Brad King's avatar
      string: Add CONCAT sub-command · 4e184a21
      Brad King authored
      Add a string(CONCAT) command to simply concatenate input arguments
      together.  This will be useful for combining strings from different
      quoting syntaxes.  Add a RunCMake.string test covering these cases.
      4e184a21
    • Daniele E. Domenichelli's avatar
      CheckTypeSize: Add unit tests · e6cec648
      Daniele E. Domenichelli authored
      e6cec648
    • Stephen Kelly's avatar
      Consider targets with double colons to be IMPORTED or ALIAS targets. · f063c455
      Stephen Kelly authored
      Introduce a policy to control the behavior.
      
      The AliasTargets unit test already tests that using a
      double-semicolon in the name is not an error. Change the ExportImport
      test to use a namespace with a double-semicolon too.
      f063c455
    • Stephen Kelly's avatar
      Create make rules for INTERFACE_LIBRARY targets. · b04f3b9a
      Stephen Kelly authored
      The result is that the depends of the target are created.
      
      So,
      
       add_library(somelib foo.cpp)
       add_library(anotherlib EXCLUDE_FROM_ALL foo.cpp)
       add_library(extra EXCLUDE_FROM_ALL foo.cpp)
       target_link_libraries(anotherlib extra)
      
       add_library(iface INTERFACE)
       target_link_libraries(iface INTERFACE anotherlib)
      
      Executing 'make iface' will result in the anotherlib and extra targets
      being made.
      
      Adding a regular executable to the INTERFACE of an INTERFACE_LIBRARY
      will not result in the executable being built with 'make iface' because
      of the logic in cmComputeTargetDepends::AddTargetDepend.
      
      So far, this is implemented only for the Makefile generator. Other
      generators will follow if this feature is possible for them.
      
      Make INTERFACE_LIBRARY targets part of the all target by default.
      Test this by building the all target and making the expected library
      EXCLUDE_FROM_ALL.
      b04f3b9a
  8. 19 Oct, 2013 1 commit
  9. 18 Oct, 2013 2 commits
  10. 17 Oct, 2013 5 commits
    • Stephen Kelly's avatar
      target_link_libraries: Allow repeated use of LINK_{PRIVATE,PUBLIC} keywords. · dede2731
      Stephen Kelly authored
      This has not been allowed since they were introduced in
      commit 91438222 (target_link_libraries: Add LINK_(PUBLIC|PRIVATE)
      options, 2011-10-07), but allowing this form makes it more compatible
      with the newer PUBLIC and PRIVATE keywords.
      dede2731
    • 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
      cases.
      daa0f6f9
    • 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
      everywhere.
      a8c65234
    • 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.
      dbd93336
    • 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.
      56457837
  11. 16 Oct, 2013 1 commit