1. 29 Nov, 2014 2 commits
    • Stephen Kelly's avatar
      Export: Disallow export of targets with INTERFACE_SOURCES · e1348056
      Stephen Kelly authored
      This can be allowed in the next release, but it needs to have some
      features present and tested such as
      
      * Ensuring that relative paths do not appear in the generated property.
      * Ensuring that paths to the source or build directories do not appear.
      * Generating a check in the file for CMake 3.1 or later so that the
          resulting property will be consumed.
      * Ensuring that any referenced targets are part of an export set and
          generating a check for them.
      * INSTALL_INTERFACE and BUILD_INTERFACE content.
      
      All of these checks are already done for INTERFACE_INCLUDE_DIRECTORIES,
      but it is too late to add them for INTERFACE_SOURCES for CMake 3.1.
      As the checks introduce some new error conditions, it is better to
      disallow exporting fully for this case and introduce proper error
      conditions later instead of policies.
      e1348056
    • Stephen Kelly's avatar
      cmTarget: Don't allow relative paths in INTERFACE_SOURCES · bb5905bb
      Stephen Kelly authored
      Follow the pattern of checks that are made for INTERFACE_INCLUDE_DIRECTORIES.
      Existence is already checked by cmSourceFile::GetFullPath.  Add a check
      to disallow relative paths in source directories. Otherwise code such as
      
       target_sources(lib1 INTERFACE foo.cpp)
      
      would fail if consumed by a target in a different directory.
      
      Unlike the INTERFACE_INCLUDE_DIRECTORIES behavior, we don't care whether
      the entry comes from an IMPORTED target or not.  In the include directories
      case, the directory for a non-imported target might not exist yet but
      might be created.  In the sources case, a file which does not yet
      exist in the filesystem must be explicitly marked with the GENERATED
      property.
      
      Adjust existing tests and add a new test for the error.
      bb5905bb
  2. 24 Oct, 2014 2 commits
  3. 07 Oct, 2014 2 commits
  4. 22 Sep, 2014 1 commit
    • Sylvain Joubert's avatar
      Ninja: Prevent compilers to be silently modified · 6120fca8
      Sylvain Joubert authored
      Unlike with Unix Makefiles generator modifying compiler paths was not
      protected with Ninja generator.  It was possible to modify them in the
      cache without the expected effect on the generated solution.  Also
      activate corresponding tests with Ninja.
      6120fca8
  5. 16 Sep, 2014 1 commit
    • Brad King's avatar
      Tests: Fix CMP0054 warnings · fa7d47ac
      Brad King authored
      Hack the CMP0054 warning locally to be an error and run the test suite.
      Resolve CMP0054 in Tests/* code as appropriate for each case.
      fa7d47ac
  6. 15 Sep, 2014 2 commits
    • Brad King's avatar
      Tests: Test setting a generator platform in a toolchain file · be6a555d
      Brad King authored
      Teach the RunCMake.GeneratorPlatform test to cover setting
      CMAKE_GENERATOR_PLATFORM in a file loaded by CMAKE_TOOLCHAIN_FILE.
      be6a555d
    • Brad King's avatar
      cmake: Add -A option to specify a generator platform · eb7d8156
      Brad King authored
      Define the 'cmake -A' option to set CMAKE_GENERATOR_PLATFORM
      without having to spell out the whole variable name.  We choose
      the name '-A' for "platform" because '-P' is already taken, and
      in the common use case the "platform" is actually an architecture
      (e.g. x64).
      
      Teach the RunCMake test infrastructure to use -A to pass the generator
      platform.  Extend the RunCMake.GeneratorPlatform test with a case to
      verify that the -A option cannot be repeated.
      eb7d8156
  7. 11 Sep, 2014 1 commit
  8. 10 Sep, 2014 1 commit
  9. 05 Sep, 2014 2 commits
    • Brad King's avatar
      VS: Implement CMAKE_GENERATOR_PLATFORM for VS >= 8 · b97736a2
      Brad King authored
      For VS generator names that do not specify the platform name, read
      CMAKE_GENERATOR_PLATFORM to get it.
      
      Extend the RunCMake.GeneratorPlatform test with a case covering
      use of the x64 platform when the test generator is a Visual Studio
      generator whose name does not specify a platform.
      b97736a2
    • Brad King's avatar
      CMake: Add CMAKE_GENERATOR_PLATFORM option · 0f1f1271
      Brad King authored
      Reject the option by default.  It will be implemented on a per-generator
      basis.  Pass the setting into try_compile project generation.  Add cache
      entry CMAKE_GENERATOR_PLATFORM and associated variable documentation to
      hold the value persistently.
      
      Add a RunCMake.GeneratorPlatform test to cover basic use cases for the
      option.  Verify that CMAKE_GENERATOR_PLATFORM is empty by default, and
      that it is rejected when the generator does not support a user setting.
      0f1f1271
  10. 28 Aug, 2014 1 commit
  11. 18 Aug, 2014 1 commit
    • Brad King's avatar
      cmListFileLexer: Fix lexing of single '[' character (#15092) · 02b3cba9
      Brad King authored
      The lexer changes in commit v3.0.0-rc1~495^2 (Add Lua-style long
      brackets and long comments to CMake language, 2013-08-06) accidentally
      left out matching '[' as a single character in an unquoted argument.
      Add a lexer rule to match it and extend the RunCMake.Syntax test to
      cover this case.
      02b3cba9
  12. 31 Jul, 2014 1 commit
  13. 30 Jul, 2014 1 commit
    • Brad King's avatar
      cmTarget: Do not mistake a preceding error for a CMP0049 failure · b2282631
      Brad King authored
      After calls to ProcessSourceItemCMP0049, check for an empty return
      string to detect a failure instead of trusting GetErrorOccuredFlag.
      The latter could have been left from a preceding non-fatal error.
      
      Extend the RunCMake.Configure test to cover a case that exposed this
      problem.
      b2282631
  14. 17 Jul, 2014 1 commit
  15. 14 Jul, 2014 1 commit
    • Brad King's avatar
      Allow INTERFACE_SOURCES to specify $<TARGET_OBJECTS> (#14970) · affe9d56
      Brad King authored
      Fix cmTarget::GetSourceFiles to set EvaluateForBuildsystem on the
      $<TARGET_PROPERTY:...,INTERFACE_SOURCES> generator expression so that
      the $<TARGET_OBJECTS> generator expression is allowed within an
      INTERFACE_SOURCES value.
      
      Extend the InterfaceLibrary test to cover this case.  Extend the
      RunCMake.TargetObjects test to cover failure of $<TARGET_OBJECTS>
      when used through $<TARGET_PROPERTY:...,INTERFACE_SOURCES> in a
      non-buildsystem context.
      affe9d56
  16. 09 Jul, 2014 1 commit
    • Brad King's avatar
      add_library: Allow arbitrary non-linked sources in OBJECT libraries · 2c470b77
      Brad King authored
      Loosen this restriction on OBJECT libraries to allow source files of any
      name to be generated by custom commands or listed for reference in IDE
      projects so long as they would not affect linking of a normal library.
      Update the rejection message to be more specific about the looser
      restriction.
      
      Extend the ObjectLibrary test to cover a ".cmake" file generated by a
      custom command in an OBJECT library.
      2c470b77
  17. 07 Jul, 2014 2 commits
    • Brad King's avatar
      cmTarget: Simplify INTERFACE_INCLUDE_DIRECTORIES usage requirement lookup · 93790506
      Brad King authored
      Use the AddInterfaceEntries helper to avoid duplication.  In
      TargetPropertyEntry, replace the TargetName string member with a
      reference to the full cmLinkImplItem that produced the entry.  This is
      possible because the cmLinkImplItem is available in AddInterfaceEntries
      (it was not available in GetIncludeDirectories).  Having the full
      cmLinkImplItem allows processIncludeDirectories to implement CMP0027 OLD
      behavior without repeating the target name lookup.
      
      Update the RunCMake.CompatibleInterface test DebugProperties case
      expected output for the new order of the messages.
      93790506
    • Brad King's avatar
      cmTarget: Simplify INTERFACE_SOURCES usage requirement lookup · 3156275b
      Brad King authored
      Use the AddInterfaceEntries helper to avoid duplication.
      3156275b
  18. 02 Jul, 2014 1 commit
  19. 01 Jul, 2014 1 commit
    • Stephen Kelly's avatar
      Genex: Fix stack overflow in transitive property evaluation. · 61ce6547
      Stephen Kelly authored
      Commit v2.8.11~156^2~2 (Expand includes and defines transitively
      in 'external' genexes., 2013-02-13) introduced a recursive loop
      and a stack overflow during evaluation of a link implementation
      which depends on a transitive property, such as
      
       add_library(empty1 ...)
       add_library(empty2 ...)
       target_link_libraries(empty1
         PRIVATE
           $<$<STREQUAL:$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
       )
      
      There is no use-case for code like that currently, but it should not
      cause a stack overflow.
      
      Avoid the recursion by reporting an error early if a case like this
      is found.
      61ce6547
  20. 30 Jun, 2014 4 commits
  21. 25 Jun, 2014 1 commit
    • Brad King's avatar
      VS14: Add Visual Studio 14 generator (#14982) · 65624c39
      Brad King authored
      Call the generator "Visual Studio 14" without any year because this
      version of VS does not provide a year in the product name.
      
      Copy cmGlobalVisualStudio12Generator to cmGlobalVisualStudio14Generator
      and update version numbers accordingly.  Add the VS14 enumeration value.
      Teach the platform module Windows-MSVC to set MSVC14 and document the
      variable.  Teach module InstallRequiredSystemLibraries to look for the VS
      14 runtime libraries.
      
      Teach tests CheckCompilerRelatedVariables, VSExternalInclude, and
      RunCMake.GeneratorToolset to treat VS 14 as they do VS 10, 11, and 12.
      
      Co-Author: Pawel Stopinski <diokhan@go2.pl>
      65624c39
  22. 24 Jun, 2014 4 commits
  23. 23 Jun, 2014 1 commit
    • Brad King's avatar
      cmake: Add '-E env' command-line tool · 7abd5747
      Brad King authored
      
      
      Extend the cmake command-line interface to support
      
       cmake -E env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]...
      
      This will be useful to run processes with modified environments
      without using a shell or a full "cmake -P" script to wrap it.
      
      Extend the RunCMake.CommandLine test to cover success and failure cases.
      Inspired-by: default avatarJonathan Bohren <jbo@jhu.edu>
      7abd5747
  24. 09 Jun, 2014 1 commit
  25. 06 Jun, 2014 1 commit
    • Brad King's avatar
      Tests: Fix RunCMake.TargetSources on Xcode 1.5 · 0366ba5d
      Brad King authored
      Xcode 1.5 does not support multiple configurations.  The generator also
      adds some sources internally that cause extra OriginDebug output.
      Update the expected output to tolerate it.
      0366ba5d
  26. 05 Jun, 2014 1 commit
  27. 04 Jun, 2014 1 commit
    • Brad King's avatar
      Allow a toolchain file to specify a generator toolset · 528e8af1
      Brad King authored
      Delay use of CMAKE_GENERATOR_TOOLSET until the CMakeSystem.cmake
      file has been configured and loaded during the first project() or
      enable_language() command.  This gives the toolchain file named by
      CMAKE_TOOLCHAIN_FILE a chance to set CMAKE_GENERATOR_TOOLSET.  This
      point is still early enough to set the generator toolset prior to
      the initialization of any languages that might use the toolset.
      
      The cmake::GeneratorToolset member variable remains an indication
      of what was specified by the -T option or loaded from the cache.
      It does not need to be updated based on the toolchain file setting.
      The cmMakefile::TryCompile can still pass cmake::GeneratorToolset
      into the inner instance because the try-compiled project will do
      platform and language initialization using the CMakeSystem module
      configured for the outer project.
      
      Extend the RunCMake.GeneratorToolset test with cases that use a
      toolchain file to set CMAKE_GENERATOR_TOOLSET.
      528e8af1
  28. 03 Jun, 2014 1 commit
    • Brad King's avatar
      cmake: Fix --build crash on bad CMAKE_GENERATOR in cache · 44e2923f
      Brad King authored
      If we fail to create the generator named by CMAKE_GENERATOR, exit
      with an error message instead of crashing.  While at it, fix the
      wording of the error message when CMAKE_GENERATOR is not set.
      
      Extend the RunCMake.CommandLine test with cases covering the
      "cmake --build" option when the named directory does not provide
      a CMakeCache.txt with a valid CMAKE_GENERATOR.
      44e2923f