summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport
Commit message (Collapse)AuthorAgeFilesLines
...
| * Genex: Allow relative paths in INSTALL_INTERFACE.Stephen Kelly2013-07-252-0/+8
| | | | | | | | | | | | | | These paths can be prepended with the ${_IMPORT_PREFIX} generated in the export file. Such relative paths were previously an error.
* | Merge topic 'install-interface-includes'Brad King2013-07-262-1/+21
|\ \ | |/ | | | | | | 650e61f Add a convenient way to add the includes install dir to the INTERFACE.
| * Add a convenient way to add the includes install dir to the INTERFACE.Stephen Kelly2013-07-242-1/+21
| | | | | | | | | | | | | | Export the INCLUDES DESTINATION without appending to the INTERFACE_INCLUDE_DIRECTORIES of the target itself. That way, a target can be exported multiple times with different INCLUDES DESTINATION without unintended cross-pollution of export sets.
* | Use linked frameworks as a source of include directories.Stephen Kelly2013-07-245-0/+27
| |
* | Merge topic 'INTERFACE_LINK_LIBRARIES-prop'Brad King2013-07-171-0/+1
|\ \ | |/ |/| | | | | 295a42c Fix ExportImport test cmp0022NEW build on Watcom
| * Fix ExportImport test cmp0022NEW build on WatcomBrad King2013-07-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | The test uses generate_export_header(cmp0022OLD ...) to generate the cmp0022_export.h header used by both cmp0022OLD and cmp0022NEW. In the latter the _EXPORTS symbol does not match what the header expects so the library does not export anything. The Watcom linker does not like to create shared libraries that do not export any symbols. Fix this by setting the DEFINE_SYMBOL property on cmp0022NEW to match that of cmp0022OLD as the header expects.
* | Merge topic 'INTERFACE_LINK_LIBRARIES-prop'Brad King2013-07-1512-0/+80
|\ \ | |/ | | | | | | | | | | | | | | 3e30d9e TLL: Don't populate old link interface if CMP0022 is NEW. 574fec9 Export: Generate INTERFACE_LINK_LIBRARIES property on targets. d0a76ea Introduce the INTERFACE_LINK_LIBRARIES property. ddde61c Introduce the LINK_ONLY generator expression. 5aa9731 GenexEval: Add abstracted access to link interface for a target.
| * Export: Generate INTERFACE_LINK_LIBRARIES property on targets.Stephen Kelly2013-07-0812-0/+80
| | | | | | | | | | | | | | | | | | | | This property is generated only for targets which have recorded policy CMP0022 as NEW, and a compatibility mode is added to additionally export the old interfaces in that case too. If the old interfaces are not exported, the generated export files require CMake 2.8.12. Because the unit tests use a version which is not yet called 2.8.12, temporarily require a lower version.
* | Merge topic 'IMPORTED-build-dependencies'Brad King2013-07-156-0/+65
|\ \ | |/ |/| | | | | | | 4f7ceb5 Test non-IMPORTED libraries in the INTERFACE of IMPORTED libraries. 3405351 Add entire link interface transitive closure as target depends.
| * Test non-IMPORTED libraries in the INTERFACE of IMPORTED libraries.Stephen Kelly2013-07-026-0/+65
| | | | | | | | | | | | | | | | | | | | If a non-IMPORTED library is added to the INTERFACE_LINK_LIBRARIES of a IMPORTED target, the non-IMPORTED target needs to become a target dependency and link dependency of the consuming target. This is already the case since commit 30962029 (Make targets depend on the link interface of their dependees, 2012-12-26), and fixed in the parent commit, so test that it works.
* | Generate INTERFACE_COMPILE_OPTIONS on export.Stephen Kelly2013-06-103-1/+24
|/ | | | | This was missing from commit 80ca9c4b (Add COMPILE_OPTIONS target property., 2013-05-16).
* Add EXPORT_NAME property.Stephen Kelly2013-05-189-7/+65
| | | | | | This allows for example, the buildsystem to use names like 'boost_any' instead of the overly generic 'any', and still be able to generate IMPORTED targets called 'boost::any'.
* install(EXPORT): Ensure clean INTERFACE_INCLUDE_DIRECTORIESStephen Kelly2013-03-261-2/+16
| | | | | | | | | | Check that source and binary directories are not part of the INTERFACE_INCLUDE_DIRECTORIES for installed IMPORTED targets. This is limited to directories which do not contain generator expressions to evaluate. Such paths can only be checked at time of use of the imported target, which will be done in a follow up patch.
* Rename variable for including current directory in interfacesBrad King2013-03-192-2/+2
| | | | | | | | | Rename the variable added by commit 9ce1b9ef (Add CMAKE_BUILD_INTERFACE_INCLUDES build-variable, 2012-11-25) to CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE to be more consistent with the existing CMAKE_INCLUDE_CURRENT_DIR variable. Suggested-by: Alex Neundorf <neundorf@kde.org>
* Fix cmGeneratorExpression::Preprocess for interleaved inputs.Stephen Kelly2013-03-181-0/+4
| | | | | | | | | | | | | | We can't find both preprocessing expressions at once, because then the BUILD_INTERFACE will always be favored if both are present, even if INSTALL_INTERFACE appears first. This was affecting the behavior of install(EXPORT) because the INTERFACE_INCLUDE_DIRECTORIES contained entries like /foo/include;$<INSTALL_INTERFACE:/bar/include> As the INSTALL_INTERFACE always evaluates to '0', it always needs to be preprocessed properly.
* Merge topic 'remove-TARGET_DEFINED-genex'Brad King2013-03-041-1/+1
|\ | | | | | | | | | | | | | | cbf0756 Revert "Add the TARGET_DEFINED generator expression" 21a342c Remove use of TARGET_DEFINED from the target_link_libraries test. 47b8d32 Remove use of TARGET_DEFINED from the ExportImport test. 2e39d21 Remove use of TARGET_DEFINED from target_include_directories test.
| * Remove use of TARGET_DEFINED from the ExportImport test.Stephen Kelly2013-02-251-1/+1
| | | | | | | | | | | | Update the unit test introduced in commit 5daaa5c4 (Fix TARGET_PROPERTY target extractions., 2013-01-26) to not use the expression, but still test the appropriate code.
* | Handle targets in the LINK_LIBRARIES of try_compile.Stephen Kelly2013-02-222-0/+23
|/ | | | | | | | | | Imported targets are re-exported so that they can be used by the try_compile generated code with target_link_libraries. This makes the use of the cmake_expand_imported_targets macro obsolete. The macro is not able to expand the generator expressions which may appear in the IMPORTED_LINK_INTERFACE_LIBRARIES content. Instead it just sees them as 'not a target'.
* Revert "Add a way to exclude INTERFACE properties from exported targets."Stephen Kelly2013-02-134-76/+0
| | | | | | | | This reverts commit 2c3654c3de718fe822f8960063373774fc019494. The removal of some tests added in commit 77cecb77 (Add includes and compile definitions with target_link_libraries., 2012-11-05) are also squashed into this commit.
* Tests: Add generator toolset supportBrad King2013-02-071-0/+2
| | | | | Propagate CMAKE_GENERATOR_TOOLSET through the test hierarchy so that all tests can build with the selected generator toolset, if any.
* Merge branch 'master' into generator-toolsetBrad King2013-02-077-28/+156
|\ | | | | | | We need the latest Tests/CMakeLists.txt so we can refactor all tests.
| * Add includes and compile definitions with target_link_libraries.Stephen Kelly2013-01-316-30/+97
| | | | | | | | | | | | | | | | This establishes that linking is used to propagate usage-requirements between targets in CMake code. The use of the target_link_libraries command as the API for this is chosen because introducing a new command would introduce confusion due to multiple commands which differ only in a subtle way.
| * Export targets to a targets file, not a Config file.Stephen Kelly2013-01-312-4/+4
| |
| * Merge topic 'fix-target-property-commands'Brad King2013-01-301-6/+13
| |\ | | | | | | | | | | | | | | | | | | 7bf490e Make subclasses responsible for joining content. f6b16d4 Don't allow targets args in the new target commands. b3a7e19 Make the Property name protected so that subclasses can use it.
| | * Don't allow targets args in the new target commands.Stephen Kelly2013-01-291-6/+13
| | |
| * | Merge topic 'fix-TARGET_PROPERTY-extraction'Brad King2013-01-291-0/+2
| |\ \ | | | | | | | | | | | | | | | | 5daaa5c Fix TARGET_PROPERTY target extractions.
| | * | Fix TARGET_PROPERTY target extractions.Stephen Kelly2013-01-291-0/+2
| | |/ | | | | | | | | | | | | | | | | | | We need to make sure we can export targets which have content such as $<0:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES> That means making not finding a target non-fatal here.
| * | Add the INSTALL_PREFIX genex.Stephen Kelly2013-01-271-1/+16
| |/
| * Add the COMPATIBLE_INTERFACE_STRING property.Stephen Kelly2013-01-243-1/+14
| |
| * Export the COMPATIBLE_INTERFACE_BOOL content propertiesStephen Kelly2013-01-213-0/+15
| |
| * Make INTERFACE determined properties readable in generator expressions.Stephen Kelly2013-01-202-1/+10
| | | | | | | | | | The properties are evaluated as link-dependent interface properties when evaluating the generator expressions.
* | Merge branch 'xcode-duplicate-flags-13354' into generator-toolsetBrad King2013-01-3112-3/+292
|\ \ | |/
| * Test evaluation target via export for generator expressionsStephen Kelly2013-01-151-1/+1
| |
| * Export the INTERFACE_PIC property.Stephen Kelly2013-01-153-0/+28
| |
| * Make the BUILD_INTERFACE of export()ed targets work.Stephen Kelly2013-01-156-5/+46
| | | | | | | | | | The existing BUILD_INTERFACE code is executed at generate time, which is too late for export().
| * Add a test for the interfaces in targets exported from the build tree.Stephen Kelly2013-01-152-16/+14
| |
| * Allow generator expressions in LINK_INTERFACE_LIBRARIES.Stephen Kelly2013-01-107-1/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Fix linking to imported libraries test.Stephen Kelly2013-01-102-3/+3
| | | | | | | | | | | | | | 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).
| * Handle INTERFACE properties transitively for includes and defines.Stephen Kelly2013-01-054-1/+129
| | | | | | | | | | Contextually, the behavior is as if the properties content from another target is included in the string and then the result is evaluated.
* | Tests: Run ctest custom commands with VERBATIMBrad King2013-01-311-2/+4
|/
* exports: add a test for exporting dependent targetsAlex Neundorf2012-09-304-0/+21
| | | | | | | The test exports two libraries into two separate exports, and then include()s the generated export files. This must not fail. Alex
* Remove CMake-language block-end command argumentsKitware Robot2012-08-133-7/+7
| | | | | | | | | | | | | | | | | 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
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-15/+15
| | | | | | | | | | | | | | | | | 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
* Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIESAlex Neundorf2012-02-211-0/+11
| | | | | | | | | | | 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
* Follow all dependencies of shared library private dependenciesBrad King2011-12-143-2/+25
| | | | | | | | | 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.
* Test CMAKE_GNUtoMS option in ExportImport on MinGW and MSysBrad King2011-12-052-0/+6
|
* Honor custom command dependencies on imported targets (#10395)Brad King2010-12-081-5/+45
| | | | | | | 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.
* Allow add_dependencies() on imported targets (#10395)Brad King2010-11-192-1/+17
| | | | | | | 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.
* Test link multiplicity export/importBrad King2009-09-019-1/+26
| | | | | | | 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.
* COMP: Shorten ExportImport test command linesBrad King2009-07-142-22/+20
| | | | | | | | | | 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.