summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* ProcessorCount test: require SystemInformation process to workRolf Eike Beer2013-01-241-1/+8
| | | | | Currently this silently fails on some systems. Make sure those things get noticed so we can fix that.
* ProcessorCount test: fix path to cmsysTestsCxx executableRolf Eike Beer2013-01-242-3/+4
| | | | | Use a generator expression to get the real place of this target instead of guessing it wrong.
* Exclude the LINK_LIBRARIES related properties from INTERFACE evaluation.Stephen Kelly2013-01-244-1/+40
| | | | | | These interface-related link-libraries properties are used to determine the value of the other INTERFACE properties, so we were getting infinite recursion and segfaults otherwise.
* Merge topic 'disallow-IMPORTED-interface-porcelain'Brad King2013-01-235-27/+2
|\ | | | | | | | | | | b98d14d Disallow porcelain to populate includes and defines of IMPORTED targets. 48a4cf2 Revert "Allow target_link_libraries with IMPORTED targets."
| * Disallow porcelain to populate includes and defines of IMPORTED targets.Stephen Kelly2013-01-214-24/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With similar reasoning to the parent commit, as downstreams, we can't determine what $<CONFIG> generator expressions would be appropriate. Upstream would have populated the INTERFACE_INCLUDE_DIRECTORIES with config-specific generator expressions, possibly appropriate for their DEBUG_CONFIGURATIONS. In theory, if we would add include directories for a DEBUG intent, we would have to match the upstream configurations for that. Rather than attempting to discover the appropriate configurations at this time, simplify the feature instead. The use of IMPORTED targets with these commands could still be added in the future if targets would export their DEBUG_CONFIGURATIONS somehow.
| * Revert "Allow target_link_libraries with IMPORTED targets."Stephen Kelly2013-01-211-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9cfe4f1b769597bd9ba179eba46572a9df27f64c. It turns out that correctly adding the content to the IMPORTED_LINK_INTERFACE_LIBARIES_<CONFIG> of an upstream target from the buildsystem of a downstream project is not simple. If upstream had added the INTERFACE content, the config-specific properties would be determined by the DEBUG_CONFIGURATIONS of upstream. As downstream, we don't have any information about what the DEBUG_CONFIGURATIONS of upstream were, so we can't determine which configuration-specific properties to populate. The best we can do is add it to all of them or add it to the ones downstream considers to be DEBUG_CONFIGURATIONS, neither of which is a good solution. So, removing the porcelain API for that is the best approach. A human can still determine which properties to populate and use the set_property API to populate the desired properies. Another solution to this would be for upstream targets to publish what they consider DEBUG_CONFIGURATIONS, but that can be added in a future release.
* | Merge topic 'clean-include-dirs-debugging'Brad King2013-01-231-15/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | 6063fef Output include directories as LOG messages, not warnings. aa66748 Specify the target whose includes are being listed. d70204a Only output includes once after the start of 'generate-time' when debugging. 0d46e9a Store includes from the same include_directories call together.
| * | Output include directories as LOG messages, not warnings.Stephen Kelly2013-01-211-4/+4
| | |
| * | Specify the target whose includes are being listed.Stephen Kelly2013-01-211-4/+4
| | |
| * | Store includes from the same include_directories call together.Stephen Kelly2013-01-211-7/+0
| |/ | | | | | | | | | | Otherwise, we get a separate IncludeDirectoriesEntry for each include, and that causes unnecessary and confusing splitting in the output when debugging the INCLUDE_DIRECTORIES property.
* | Merge topic 'qt4-autolink-qtmain'Brad King2013-01-2316-4/+121
|\ \ | | | | | | | | | | | | | | | e3b5eb6 Automatically link to the qtmain library when linking to QtCore. 6c8d8af Add the $<TARGET_POLICY> expression
| * | Automatically link to the qtmain library when linking to QtCore.Stephen Kelly2013-01-232-4/+59
| | | | | | | | | | | | | | | When using QAxServer, ensure that the qtmain library is excluded by reporting an error at CMake time if it is not.
| * | Add the $<TARGET_POLICY> expressionStephen Kelly2013-01-1714-0/+62
| |/ | | | | | | | | | | This new expression allows checking how a policy was set when a target was created. That information is only recorded for a subset of policies, so a whitelist is used.
* | Merge topic 'fix-COMPATIBLE_INTERFACE-properties'Brad King2013-01-2323-1/+147
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 830246e Export the COMPATIBLE_INTERFACE_BOOL content properties bd82bb4 Clear the link information in ClearLinkMaps. e987991 Make INTERFACE determined properties readable in generator expressions. d9afacc Exit early if we find an inconsistent property. 1800f70 Populate the link information cache before checking dependent properties.
| * | Export the COMPATIBLE_INTERFACE_BOOL content propertiesStephen Kelly2013-01-213-0/+15
| | |
| * | Make INTERFACE determined properties readable in generator expressions.Stephen Kelly2013-01-2022-1/+132
| |/ | | | | | | | | The properties are evaluated as link-dependent interface properties when evaluating the generator expressions.
* | Merge topic 'fix-target_include_directories-genex'Brad King2013-01-231-1/+6
|\ \ | | | | | | | | | | | | 24dcf0c Make sure generator expressions can be used with target_include_directories.
| * | Make sure generator expressions can be used with target_include_directories.Stephen Kelly2013-01-161-1/+6
| |/ | | | | | | | | Handle the case that a generator expression is used before treating a non-target as an error.
* | Merge topic 'vs11-external-include'Brad King2013-01-232-0/+2
|\ \ | | | | | | | | | | | | bc65b74 VS11: Fix VSExternalInclude test
| * | VS11: Fix VSExternalInclude testBrad King2013-01-162-0/+2
| |/ | | | | | | | | | | | | | | | | Set CMAKE_SUPPRESS_REGENERATION in the Lib1 and Lib2 projects so that their .vcxproj files do not contain references to ZERO_CHECK. Such references do not make sense when using the files in another .sln file. This does not reduce the effectiveness of the test because real projects that use include_external_msproject will have their own .vcxproj files not generated by CMake anyway.
* | Merge topic 'ExternalProject-DEPENDS-target'Brad King2013-01-231-1/+3
|\ \ | | | | | | | | | | | | c0f1af9 ExternalProject: Allow DEPENDS on normal targets (#13849)
| * | ExternalProject: Allow DEPENDS on normal targets (#13849)Brad King2013-01-161-1/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ExternalProject_Add DEPENDS option adds two types of dependencies. It adds a target-level build order dependency between the external project target and the named targets. It also adds a file-level dependency on the "done" stamp file of the named external project targets. Targets not created by ExternalProject_Add have no such stamp file and no _EP_STAMP_DIR property. Prior to commit d14c0243 (Refactor repeated code into function, 2012-04-26) we unconditionally accepted an empty stamp dir and generated a dependency on a non-existent file. After that commit we generate an error that no stamp dir is set. Skip the file-level dependency when the named dependency is not an external project target in order to allow this use case. Teach the ExternalProject test to cover the case.
* | Merge topic 'automoc-object'Brad King2013-01-231-3/+6
|\ \ | |/ |/| | | | | | | 0e35cac Automoc: add OBJECT library to QtAutomoc test cf3faac Automoc: Fix automoc for OBJECT libraries.
| * Automoc: add OBJECT library to QtAutomoc testYury G. Kudryashov2013-01-151-3/+6
| |
* | Merge topic 'test-export-iface-genex'Brad King2013-01-156-18/+85
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1d74ba2 Test evaluation target via export for generator expressions 522bdac Export the INTERFACE_PIC property. 4ee872c Make the BUILD_INTERFACE of export()ed targets work. 1d47cd9 Add a test for the interfaces in targets exported from the build tree. 6c828f9 Move the exported check for file existence. cfd4f0a Move the exported check for dependencies of targets d8fe1fc Only generate one check per missing target. f623d37 Don't write a comment in the export file without the code. b279f2b Strip consecutive semicolons when preprocessing genex strings.
| * | 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
| | |
* | | Add the TARGET_DEFINED generator expressionStephen Kelly2013-01-132-0/+10
|/ / | | | | | | This tests whether the parameter is a usable target.
* | Allow generator expressions in LINK_INTERFACE_LIBRARIES.Stephen Kelly2013-01-1011-1/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* Merge topic 'INTERFACE_POSITION_INDEPENDENT_CODE'Brad King2013-01-1013-0/+62
|\ | | | | | | | | | | | | 3581b96 Process the INTERFACE_PIC property from linked dependencies 042ecf0 Add API to calculate link-interface-dependent bool properties or error. bf5ece5 Keep track of properties used to determine linker libraries.
| * Process the INTERFACE_PIC property from linked dependenciesStephen Kelly2013-01-1013-0/+62
| | | | | | | | | | | | | | | | | | This allows a dependee to inform a target that it should have its POSITION_INDEPENDENT_CODE property set to ON, or OFF. The value of the POSITION_INDEPENDENT_CODE property, if set, must be consistent with any INTERFACE_POSITION_INDEPENDENT_CODE properties on dependees. Add a test covering the consistency checks on platforms where they run.
* | Merge topic 'target-includes-defines-commands'Brad King2013-01-107-0/+159
|\ \ | | | | | | | | | | | | | | | fc61a7a Add the target_compile_definitions command. 8a37ebe Add the target_include_directories command.
| * | Add the target_compile_definitions command.Stephen Kelly2013-01-104-0/+59
| | | | | | | | | | | | This is a convenience API to populate the corresponding properties.
| * | Add the target_include_directories command.Stephen Kelly2013-01-104-0/+100
| | | | | | | | | | | | This is a convenience API to populate the corresponding properties.
* | | Merge topic 'qt4-target-depends'Brad King2013-01-102-2/+17
|\ \ \ | | | | | | | | | | | | | | | | c8ee07d FindQt4: Add INTERFACE includes and defines to Qt4 targets
| * | | FindQt4: Add INTERFACE includes and defines to Qt4 targetsStephen Kelly2013-01-102-2/+17
| |/ /
* | | Merge topic 'tll-IMPORTED-targets'Brad King2013-01-101-0/+3
|\ \ \ | |_|/ |/| | | | | | | | 9cfe4f1 Allow target_link_libraries with IMPORTED targets.
| * | Allow target_link_libraries with IMPORTED targets.Stephen Kelly2013-01-081-0/+3
| |/ | | | | | | | | | | | | | | | | This makes it possible to use: target_link_libraries(foo LINK_INTERFACE_LIBRARIES bar) where foo is an IMPORTED target. Other tll() signatures are not allowed.
* | Merge topic 'LINK_LIBRARIES-property'Brad King2013-01-084-1/+31
|\ \ | | | | | | | | | | | | | | | 7653862 Add LINK_LIBRARIES property for direct target link dependencies 40cf3fb Make linking APIs aware of 'head' target
| * | Add LINK_LIBRARIES property for direct target link dependenciesStephen Kelly2013-01-084-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we kept direct link dependencies in OriginalLinkLibraries. The property exposes the information in the CMake language through the get/set_property commands. We preserve the OriginalLinkLibraries value internally to support old APIs like that for CMP0003's OLD behavior, but the property is now authoritative. This follows up from commit d5cf644a (Split link information processing into two steps, 2012-11-01). This will be used later to populate the link interface properties when exporting targets, and will later allow use of generator expressions when linking to libraries with target_link_libraries. Also make targets depend on the (config-specific) union of dependencies. CMake now allows linking to dependencies or not depending on the config. However, generated build systems are not all capable of processing config-specific dependencies, so the targets depend on the union of dependencies for all configs.
* | | Merge topic 'include-dirs-convenience'Brad King2013-01-085-1/+36
|\ \ \ | | | | | | | | | | | | | | | | 9ce1b9e Add CMAKE_BUILD_INTERFACE_INCLUDES build-variable.
| * | | Add CMAKE_BUILD_INTERFACE_INCLUDES build-variable.Stephen Kelly2013-01-085-1/+36
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge topic 'deprecate-load_command'Brad King2013-01-085-14/+0
|\ \ \ | |/ / |/| | | | | | | | 09a0da7 Revert "load_command: Deprecate and document pending removal"
| * | Revert "load_command: Deprecate and document pending removal"Brad King2013-01-075-14/+0
| | | | | | | | | | | | | | | This reverts commit d2d43986e7f5013465473a71c393fc3897cecbac. We will add a policy to remove the command more gracefully.
* | | Merge topic 'osx-implicit-link-dirs'Brad King2013-01-072-3/+107
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | cc676c3 OS X: Detect implicit linker framework search paths 2dd67c7 OS X: Detect implicit link directories on modern toolchains ba58d0c OS X: Link with all framework search paths, not just the last
| * | | OS X: Detect implicit linker framework search pathsBrad King2012-12-112-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we hard-coded a list of implicit framework directories but did not account for CMAKE_OSX_SYSROOT or for changes to the list across OS X versions. Instead we should automatically detect the framework directories for the active toolchain. The parent commit added the "-Wl,-v" option to ask "ld" to print its implicit directories. It displays a block such as: Framework search paths: /... Parse this block to extract the list of framework directories. Detection may fail on toolchains that do not list their framework directories, such as older OS X linkers. Always treat the paths <sdk>/Library/Frameworks <sdk>/System/Library/Frameworks <sdk>/Network/Library/Frameworks # Older OS X only /System/Library/Frameworks as implicit. Note that /System/Library/Frameworks should always be considered implicit so that frameworks CMake finds there will not override the SDK copies.
| * | | OS X: Detect implicit link directories on modern toolchainsBrad King2012-12-111-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We detect the implicit link directories for the toolchain by adding a flag to get verbose output from the compiler front-end while linking the ABI detection binary. Newer OS X toolchains based on Clang do not add the implicit link directories with -L options to their internal invocation of "ld". Instead they use a linker that comes with the toolchain and is already configured with the proper directories. Add the "-Wl,-v" option to ask "ld" to print its implicit directories. It displays them in a block such as: Library search paths: /... Parse this block to extract the implicit link directories. While at it, remove the checks introduced by commit efaf335b (Skip implicit link information on Xcode, 2009-07-23) and commit 5195a664 (Skip implicit link info for multiple OS X archs, 2009-09-22). Discard the non-system link directories added by Xcode. Discard all detected implicit libraries in the multi-architecture case but keep the directories. The directories are still useful without the libraries just to suppress addition of explicit -L options for them.