1. 07 Nov, 2013 2 commits
  2. 05 Nov, 2013 4 commits
    • Stephen Kelly's avatar
      cmAutogen: Gather tool arguments after creating generator targets. · 944277d0
      Stephen Kelly authored
      This change causes the GetLinkInterfaceDependentStringProperty method,
      called in SetupAutoGenerateTarget, after the creation of generator
      targets. In CMake 4.0, the GetLinkInterfaceDependentStringProperty
      will move to the cmGeneratorTarget class, and this patch is a necessary
      prerequisite to that.
      944277d0
    • Stephen Kelly's avatar
      cmAutogen: Rename method to InitializeAutogenTarget · d2f4b1e3
      Stephen Kelly authored
      This reflects better what it is doing.
      d2f4b1e3
    • Stephen Kelly's avatar
      Automoc: Add directory-level COMPILE_DEFINITIONS to command line (#14535) · a1b9465b
      Stephen Kelly authored
      In commit 18412153 (Refactor cmTarget::GetCompileDefinitions...,
      2013-06-06) cmQtAutomoc was refactored to get all compile definitions
      from the target instead of separately asking the target and querying the
      directory-level COMPILE_DEFINITIONS property value.  While the
      generation process does integrate directory-level COMPILE_DEFINITIONS
      into the target definitions, this did not happen until after Automoc
      targets are constructed.  Therefore the commit regressed use of
      directory-level definitions in Automoc targets.
      
      Factor the definition finalization logic out from the
      cmGlobalGenerator::CreateGeneratorTargets method into a new
      cmGlobalGenerator::FinalizeTargetCompileDefinitions method and call it
      before constructing Automoc targets.  This will place the
      directory-level definitions into the target in time to use them for the
      Automoc targets.
      
      Extend the QtAutomoc test to cover this case.
      a1b9465b
    • Brad King's avatar
      cmGlobalGenerator: Refactor member cleanup between configures · 5cf1120f
      Brad King authored
      Factor member cleanup out from cmGlobalGenerator::Configure and the
      destructor into a dedicated helper to avoid duplication.  This fixes
      clearing of BuildExportSets between configures.
      5cf1120f
  3. 04 Nov, 2013 1 commit
  4. 01 Nov, 2013 1 commit
  5. 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
  6. 27 Oct, 2013 1 commit
  7. 24 Oct, 2013 4 commits
  8. 23 Oct, 2013 1 commit
    • 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
  9. 11 Oct, 2013 1 commit
    • 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
  10. 07 Oct, 2013 2 commits
    • Brad King's avatar
      Add policy CMP0025 for Apple Clang compiler id compatibility · aa53ee57
      Brad King authored
      The parent commit introduced a separate "AppleClang" compiler id for
      Apple's Clang distribution.  Add a policy in order to support projects
      that expect this compiler's id to be just "Clang".  When the policy is
      OLD or not set, map AppleClang back to Clang.  Continue to use the
      AppleClang id internally while enabling the language, but set the
      CMAKE_<LANG>_COMPILER_ID after project() or enable_language() to the
      compatible value for use by project code.
      aa53ee57
    • 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
  11. 19 Aug, 2013 1 commit
  12. 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
  13. 16 Jul, 2013 1 commit
  14. 12 Jul, 2013 1 commit
    • Stephen Kelly's avatar
      Add target property debugging for COMPILE_DEFINITIONS · d7dd0108
      Stephen Kelly authored
      Use constructs similar to those for COMPILE_OPTIONS. This is a little
      different because there is a command to remove_definitions(), so
      we can't populate the equivalent target property until generate-time
      in cmGlobalGenerator.
      d7dd0108
  15. 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
  16. 21 Jun, 2013 1 commit
  17. 29 May, 2013 1 commit
  18. 24 May, 2013 1 commit
    • Stephen Kelly's avatar
      file: Add GENERATE command to produce files at generate time · b983a58b
      Stephen Kelly authored
      The idea is to write to a temp file which contains generator
      expressions, and at generate time, evaluate the generator expressions,
      and write the result to a file.
      
      Because executables on Windows are limited in the length of command line
      it is possible to use, it is common to write command line arguments to a
      file instead and specify the file as a source of arguments.
      
      This new FILE(GENERATE) subcommand allows the use of generator
      expressions to create such files so that they can be used with
      add_custom_command for example.
      b983a58b
  19. 07 May, 2013 1 commit
  20. 12 Apr, 2013 1 commit
    • Petr Kmoch's avatar
      Add projectDir parameter to GenerateBuildCommand · de8be9ef
      Petr Kmoch authored
      Extend the cmGlobalGenerator::GenerateBuildCommand virtual method
      signature with a "projectDir" parameter specifying the top of the
      project build tree for which the build command will be generated.
      Populate it from call sites in cmGlobalGenerator::Build where a
      fully-generated build tree should be available.
      de8be9ef
  21. 12 Mar, 2013 1 commit
    • Stephen Kelly's avatar
      Automoc: Don't create automoc targets if Qt is not used (#13999) · a223a3b6
      Stephen Kelly authored
      Commit 79568f95 (automoc: Add source file to target early to set the
      linker language, 2013-02-20) changed automoc initialization to a two
      step process. In the first step, the generated source file was added
      to the target, which allows the link language to be determined.
      
      However, this bypassed the check for the availability of Qt itself.
      At build-time the automoc file could not be generated because the moc
      tool was not available to create it.
      
      The solution is to only add the automoc file to the target if Qt is
      found.
      a223a3b6
  22. 09 Mar, 2013 1 commit
  23. 22 Feb, 2013 1 commit
    • Stephen Kelly's avatar
      automoc: Add source file to target early to set the linker language · 79568f95
      Stephen Kelly authored
      Previously, GetIncludeDirectories was called before calling
      target->AddSourceFile(mocCppSource). Since commit a1c4905f (Use the
      link information as a source of compile definitions and
      includes., 2013-02-12), the include directories are determined by
      the link information.
      
      Valid link information requires that the linker language can be
      determined, which depends on the source files languages and the
      dependent targets languages. In the case of the no_link_languages
      target in the unit test, there are no dependencies and the additional
      source file no_link_languages_automoc.cpp is added to the target
      at generate-time. That file can be used to determine the linker
      language, but it must be added to the target before calling
      GetIncludeDirectories.
      79568f95
  24. 07 Feb, 2013 1 commit
    • Brad King's avatar
      CMake: Add -T option to choose a generator toolset · 4fd53429
      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_TOOLSET and associated variable documentation to
      hold the value persistently.
      
      Add a RunCMake.GeneratorToolset test to cover basic "-T" option cases.
      Verify that CMAKE_GENERATOR_TOOLSET is empty without -T, that -T is
      rejected when the generator doesn't support it, and that two -T options
      are always rejected.
      4fd53429
  25. 21 Jan, 2013 1 commit
  26. 15 Jan, 2013 1 commit
  27. 14 Jan, 2013 1 commit
  28. 08 Jan, 2013 1 commit
    • Stephen Kelly's avatar
      Add CMAKE_BUILD_INTERFACE_INCLUDES build-variable. · 9ce1b9ef
      Stephen Kelly authored
      This makes
      
       set(CMAKE_BUILD_INTERFACE_INCLUDES ON)
      
      add the equivalent of
      
       set_property(TARGET tgt APPEND PROPERTY
         INTERFACE_INCLUDE_DIRECTORIES
         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR}>
       )
      
      to every target.
      
      If the headers are in CMAKE_CURRENT_SOURCE_DIR, and the generated headers
      are in CMAKE_CURRENT_BINARY_DIR, this is a convenient way to build a target
      bar, which depends on foo, just by using target_link_libraries() and adding
      the INTERFACE_INCLUDE_DIRECTORIES to the INCLUDE_DIRECTORIES of the target
      being linked. There will be more-convenient porcelain API to consume the
      property in the future.
      9ce1b9ef
  29. 03 Dec, 2012 1 commit
  30. 19 Nov, 2012 2 commits
  31. 22 Oct, 2012 1 commit
    • Stephen Kelly's avatar
      GenEx: Create cmGeneratorTargets for imported targets. · 95d590dd
      Stephen Kelly authored
      We're going to need to link to them, and all the linking API is moving
      to cmGeneratorTarget.
      
      Skip imported targets when iterating over cmGeneratorTargets in places
      where we only want targets we build.  The GetGeneratorTargets result now
      includes IMPORTED targets where it didn't before.  The GetTargets
      result, which was what used to be called in these methods does not
      include IMPORTED targets.  This doesn't relate to any known bugs, but in
      some future uses of GetGeneratorTargets it will be important, so
      starting the convention and being deliberate now is a good idea.
      95d590dd