summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Add generator platform supportBrad King2014-09-101-0/+2
| | | | | Propagate CMAKE_GENERATOR_PLATFORM through the test hierarchy so that all tests can build with the selected generator platform, if any.
* Features: Extend concept to C language.Stephen Kelly2014-05-142-1/+25
| | | | | | | | | | | Add properties and variables corresponding to CXX equivalents. Add features for c_function_prototypes (C90), c_restrict (C99), c_variadic_macros (C99) and c_static_assert (C11). This feature set can be extended later. Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader to conditionally represent the c_restrict feature.
* Tests: Fix name of cache variable.Stephen Kelly2014-05-071-2/+2
|
* Export: Populate INTERFACE_COMPILE_FEATURES property.Stephen Kelly2014-04-083-1/+22
|
* Tests: Rename CMAKE_TEST_MAKEPROGRAM uses for nested test projectsBrad King2014-03-032-3/+3
| | | | | | | In the ExportImport, Fortran, and MacRuntimePath tests the CMAKE_TEST_MAKEPROGRAM variable is used to pass an explicit request for a CMAKE_MAKE_PROGRAM value to be used when building the inner projects. Rename these use cases to CMake_TEST_NESTED_MAKE_PROGRAM.
* install: Support generator expressions in FILES and PROGRAMS modeBrad King2014-02-215-0/+35
| | | | | | | | Teach the install(FILES) and install(PROGRAMS) commands to evaluate generator expressions in the list of files. Extend the ExportImport test to cover installation cases involving generator expressions.
* install: Ensure that install(TARGETS) works with no DESTINATIONStephen Kelly2014-01-041-1/+4
| | | | | INTERFACE_LIBRARY targets have no corresponding files, and so require no DESTINATION to install anything to.
* export: Implement EXPORT subcommand (#9822)Stephen Kelly2013-12-241-5/+5
| | | | | | Teach the export command to handle export sets defined by invocations of install(TARGETS ... EXPORT foo). This makes maintenance of targets exported to both the build tree and install tree trivial.
* Merge topic 'cleanup-build-commands'Brad King2013-12-061-0/+3
|\ | | | | | | | | ef7c11e Tests: Fix standalone build of tests with nested projects
| * Tests: Fix standalone build of tests with nested projectsBrad King2013-12-051-0/+3
| | | | | | | | | | | | | | | | | | Since commit fd6076d0 (Tests: Pass CMAKE_MAKE_PROGRAM instead of --build-makeprogram, 2013-11-15) the ExportImport, Fortran, and MacRuntimePath tests use the value of CMAKE_TEST_MAKEPROGRAM as the CMAKE_MAKE_PROGRAM for their nested projects configurations. Teach these tests to initialize CMAKE_TEST_MAKEPROGRAM when it is not provided, such as when building the tests manually.
* | Export: Prefix relative items with genexes in INSTALL_INTERFACE.Stephen Kelly2013-11-262-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Code such as target_include_directories(foo INTERFACE $<INSTALL_INTERFACE:include$<FOO>> ) should be treated as a relative directory, despite the genex, after the INSTALL_INTERFACE is stripped away. Previously, this would generate a relative directory on export, which would be an error on import, so no policy is needed.
* | Export: Process INSTALL_INTERFACE in INCLUDES DESTINATION.Stephen Kelly2013-11-262-0/+35
| | | | | | | | | | | | | | | | | | | | Code such as install(TARGETS ... INCLUDES DESTINATION $<INSTALL_INTERFACE:include> ) should behave as if the INSTALL_INTERFACE wrapper were not present.
* | Export: Process relative includes after genex evaluation.Stephen Kelly2013-11-262-1/+17
|/ | | | | | | | | | | | | In code such as install(TARGETS ... INCLUDES DESTINATION $<FOO>include ) the generator expressions are evaluated at generate-time. Delay determining whether each entry is a relative path until after the generator expressions are evaluated. Such relative paths are based relative to the CMAKE_INSTALL_PREFIX.
* Tests: Pass CMAKE_MAKE_PROGRAM instead of --build-makeprogramBrad King2013-11-182-2/+1
| | | | | | | | | | Pass the CMAKE_TEST_MAKEPROGRAM, if any, to each test at CMake time in the CMAKE_MAKE_PROGRAM cache entry. Pass the CMAKE_TEST_MAKEPROGRAM into the ExportImport, Fortran, and MacRuntimePath tests so that they may do the same for the nested project configurations. Now "ctest --build-and-test" can get the make program from the test build tree cache, so drop the explicit --build-makeprogram.
* Consider targets with double colons to be IMPORTED or ALIAS targets.Stephen Kelly2013-10-212-11/+11
| | | | | | | | 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.
* Merge topic 'INTERFACE_LIBRARY-target-type'Brad King2013-10-089-0/+167
|\ | | | | | | | | | | | | ce0c303 install: Teach EXPORT option to handle INTERFACE_LIBRARY targets 435c912 export: Add support for INTERFACE_LIBRARY targets fe73226 Add the INTERFACE_LIBRARY target type.
| * install: Teach EXPORT option to handle INTERFACE_LIBRARY targetsStephen Kelly2013-10-082-0/+33
| |
| * export: Add support for INTERFACE_LIBRARY targetsStephen Kelly2013-10-089-0/+134
| |
* | Merge topic 'IMPORTED-target-SYSTEM-includes'Brad King2013-10-075-0/+95
|\ \ | |/ |/| | | | | a63fcbc Always consider includes from IMPORTED targets to be SYSTEM.
| * Always consider includes from IMPORTED targets to be SYSTEM.Stephen Kelly2013-09-245-0/+95
| | | | | | | | | | | | | | Introduce a target property to control this behavior variable to set the default value for the target property. This does not affect try_compile runs.
* | Genex: Fix processing multiple include directories for relative pathsStephen Kelly2013-10-071-1/+1
|/ | | | | | | | | | | | Re-insert the semicolon which was removed during splitting. Commit d777b8e7 (Genex: Allow relative paths in INSTALL_INTERFACE., 2013-07-25) introduced the prefixItems method to allow relative paths in the argument of the INSTALL_INTERFACE expression. That method was buggy in that it did not re-introduce the semicolon separator in the result. This bug also affects paths which are already absolute in user code.
* try_compile: Extract IMPORTED targets from INTERFACE_LINK_LIBRARIESStephen Kelly2013-08-264-1/+55
|
* try_compile: Extract IMPORTED targets from LINK_DEPENDENT_LIBRARIESStephen Kelly2013-08-264-7/+43
|
* Export: Process generator expressions from INCLUDES DESTINATION.Stephen Kelly2013-07-311-12/+16
| | | | Configuration sensitive expressions are not permitted.
* Fix crash on export of target with empty INTERFACE_INCLUDE_DIRECTORIES.Stephen Kelly2013-07-292-0/+7
| | | | | | | | The new feature of install(TARGETS ... INCLUDES DESTINATION) introduced in commit 650e61f8 (Add a convenient way to add the includes install dir to the INTERFACE., 2013-01-05) introduced this crash. If the new feature is used with a target which has no INTERFACE_INCLUDE_DIRECTORIES, a segfault occurred.
* Merge topic 'install-interface-relative'Brad King2013-07-262-0/+8
|\ | | | | | | | | d777b8e Genex: Allow relative paths in INSTALL_INTERFACE.
| * 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.