1. 15 Jan, 2013 4 commits
  2. 10 Jan, 2013 2 commits
    • Stephen Kelly's avatar
      Allow generator expressions in LINK_INTERFACE_LIBRARIES. · 77d26467
      Stephen Kelly authored
      The Config and IMPORTED_ variants may also contain generator
      expressions.
      
      If 'the implementation is the interface', then the result of
      evaluating the expressions at generate time is used to populate
      the IMPORTED_LINK_INTERFACE_LIBRARIES property.
      
      1) In the case of non-static libraries, this is fine because the
        user still has the option to populate the LINK_INTERFACE_LIBRARIES
        with generator expressions if that is what is wanted.
      
      2) In the case of static libraries, this prevents a footgun,
        enforcing that the interface and the implementation are really
        the same.
      
        Otherwise, the LINK_LIBRARIES could contain a generator
        expression which is evaluated with a different context at build
        time, and when used as an imported target. That would mean that the
        result of evaluating the INTERFACE_LINK_LIBRARIES property for
        a static library would not necessarily be the 'link implementation'.
      
        For example:
      
          add_library(libone STATIC libone.cpp)
          add_library(libtwo STATIC libtwo.cpp)
          add_library(libthree STATIC libthree.cpp)
      
          target_link_libraries(libtwo
            $<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,STATIC_LIBRARY>:libone>)
          target_link_libraries(libthree libtwo)
      
        If the LINK_LIBRARIES content was simply copied to the
        IMPORTED_LINK_INTERFACE_LIBRARIES, then libthree links to libone, but
        executables linking to libthree will not link to libone.
      
      3) As the 'implementation is the interface' concept is to be
        deprecated in the future anyway, this should be fine.
      77d26467
    • Stephen Kelly's avatar
      Fix linking to imported libraries test. · 93034a83
      Stephen Kelly authored
      Make a C executable instead of attempting to make a C++ static
      library (and not really succeeding). This was introduced in
      commit 894f52f3 (Handle INTERFACE properties transitively for
      includes and defines., 2012-09-23).
      93034a83
  3. 04 Jan, 2013 1 commit
  4. 30 Sep, 2012 1 commit
  5. 13 Aug, 2012 2 commits
    • Kitware Robot's avatar
      Remove CMake-language block-end command arguments · 9db31162
      Kitware Robot authored
      Ancient versions of CMake required else(), endif(), and similar block
      termination commands to have arguments matching the command starting the
      block.  This is no longer the preferred style.
      
      Run the following shell code:
      
      for c in else endif endforeach endfunction endmacro endwhile; do
          echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
      done >convert.sed &&
      git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
      egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
      egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
      xargs -0 sed -i -f convert.sed &&
      rm convert.sed
      9db31162
    • Kitware Robot's avatar
      Convert CMake-language commands to lower case · 77543bde
      Kitware Robot authored
      Ancient CMake versions required upper-case commands.  Later command
      names became case-insensitive.  Now the preferred style is lower-case.
      
      Run the following shell code:
      
      cmake --help-command-list |
      grep -v "cmake version" |
      while read c; do
          echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
      done >convert.sed &&
      git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
      egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
      xargs -0 sed -i -f convert.sed &&
      rm convert.sed
      77543bde
  6. 21 Feb, 2012 1 commit
    • Alexander Neundorf's avatar
      Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIES · 35c48e12
      Alexander Neundorf authored
      Add the function cmake_expand_imported_targets() to expand imported
      targets in a list of libraries into their on-disk file names for a
      particular configuration.  Adapt the implementation from KDE's
      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES which has been in
      use for over 2 years.  Call the function from all the Check*.cmake
      macros to handle imported targets named in CMAKE_REQUIRED_LIBRARIES.
      
      Alex
      35c48e12
  7. 14 Dec, 2011 1 commit
    • Brad King's avatar
      Follow all dependencies of shared library private dependencies · 183b9509
      Brad King authored
      In cmComputeLinkDepends we compute the transitive closure of private
      shared library dependencies.  When a shared library is added to this
      closure we must follow all of its dependencies whether they are private
      or public.  Previously we only followed the private dependencies.  Fix
      the implementation to follow the public dependencies too.  Also extend
      the ExportImport test to cover this case.
      183b9509
  8. 05 Dec, 2011 1 commit
  9. 08 Dec, 2010 1 commit
  10. 19 Nov, 2010 1 commit
    • Brad King's avatar
      Allow add_dependencies() on imported targets (#10395) · e01cce28
      Brad King authored
      Imported targets do not themselves build, but we can follow dependencies
      through them to find real targets.  This allows imported targets to
      depend on custom targets that provide the underlying files at build
      time.
      e01cce28
  11. 01 Sep, 2009 1 commit
    • Brad King's avatar
      Test link multiplicity export/import · d2591288
      Brad King authored
      We test that LINK_INTERFACE_MULTIPLICITY propagates through export() and
      install(EXPORT) into dependent projects.  A simple cycle of two archives
      that need to be scanned three times ensures that the importing project
      uses the multiplicity correctly.
      d2591288
  12. 14 Jul, 2009 1 commit
    • Brad King's avatar
      COMP: Shorten ExportImport test command lines · b44413f9
      Brad King authored
      The ExportImport test drives its Export and Import projects using the
      same compiler and flags.  This converts the ctest --build-and-test
      command lines to use an initial cache file instead of passing all
      settings on the command line.
      
      We need a shorter command line to pass through VS 6 on Win98.
      This approach reduces duplicate code anyway.
      b44413f9
  13. 13 Jul, 2009 1 commit
  14. 11 Jul, 2009 1 commit
    • Brad King's avatar
      ENH: Test export/import of link interface languages · 3621e073
      Brad King authored
      This extends the ExportImport test.  The Export project creates a C++
      static library and exports it.  Then the Import project links the
      library into a C executable.  On most platforms the executable will link
      only if the C++ linker is chosen correctly.
      3621e073
  15. 08 Jul, 2009 1 commit
  16. 01 May, 2009 1 commit
    • Brad King's avatar
      ENH: Allow more specification of target file names · 2740db5e
      Brad King authored
      This creates target properties ARCHIVE_OUTPUT_NAME, LIBRARY_OUTPUT_NAME,
      and RUNTIME_OUTPUT_NAME, and per-configuration equivalent properties
      ARCHIVE_OUTPUT_NAME_<CONFIG>, LIBRARY_OUTPUT_NAME_<CONFIG>, and
      RUNTIME_OUTPUT_NAME_<CONFIG>.  They allow specification of target output
      file names on a per-type, per-configuration basis.  For example, a .dll
      and its .lib import library may have different base names.
      
      For consistency and to avoid ambiguity, the old <CONFIG>_OUTPUT_NAME
      property is now also available as OUTPUT_NAME_<CONFIG>.
      
      See issue #8920.
      2740db5e
  17. 08 Apr, 2009 1 commit
    • Brad King's avatar
      ENH: Allow IMPORTED_IMPLIB w/o IMPORTED_LOCATION · d05e98f8
      Brad King authored
      Linking to a Windows shared library (.dll) requires only its import
      library (.lib).  This teaches CMake to recognize SHARED IMPORTED library
      targets that set only IMPORTED_IMPLIB and not IMPORTED_LOCATION.
      d05e98f8
  18. 06 Apr, 2009 1 commit
  19. 04 Sep, 2008 1 commit
  20. 18 Aug, 2008 1 commit
    • Brad King's avatar
      ENH: Make link interface mode more distinct · 94c1fe83
      Brad King authored
      Rename the recently added INTERFACE mode of the target_link_libraries()
      command to LINK_INTERFACE_LIBRARIES.  This makes it much more distinct
      from a normal call to the command, and clearly states its connection to
      the property of the same name.  Also require the option to appear
      immediately after the target name to make it a mode rather than an
      option.
      94c1fe83
  21. 12 Aug, 2008 1 commit
  22. 11 Aug, 2008 1 commit
  23. 25 Mar, 2008 1 commit
  24. 06 Feb, 2008 1 commit
  25. 03 Feb, 2008 1 commit
  26. 01 Feb, 2008 2 commits
  27. 31 Jan, 2008 1 commit
    • Brad King's avatar
      ENH: Support linking to shared libs with dependent libs · 2cff26fa
      Brad King authored
        - Split IMPORTED_LINK_LIBRARIES into two parts:
            IMPORTED_LINK_INTERFACE_LIBRARIES
            IMPORTED_LINK_DEPENDENT_LIBRARIES
        - Add CMAKE_DEPENDENT_SHARED_LIBRARY_MODE to select behavior
        - Set mode to LINK for Darwin (fixes universal binary problem)
        - Update ExportImport test to account for changes
      2cff26fa
  28. 30 Jan, 2008 1 commit
  29. 29 Jan, 2008 2 commits
  30. 28 Jan, 2008 4 commits