summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/include_directories
Commit message (Collapse)AuthorAgeFilesLines
* include_directories: Fix regression in BEFORE option (#15693)Brad King2015-08-213-0/+6
| | | | | | Refactoring in commit 6ed9c7e0 (cmState: Host buildsystem properties for directories, 2015-07-18) broke include_directories(BEFORE). Fix it and add a test case.
* Tests: Fix failures when running under the default install prefix (#15566)Brad King2015-05-141-0/+3
| | | | | | | Fix test cases whose behavior differs when their source or build tree is under CMAKE_INSTALL_PREFIX by setting an install prefix under the build tree. Otherwise they may fail when run under the default install prefix (e.g. /usr/local).
* Tests: Split part of include_directories test to a generic location.Stephen Kelly2015-02-0936-371/+1
| | | | | | | | | The moved tests are related to paths in INTERFACE_INCLUDE_DIRECTORIES in general, and when exporting, and covering cases of the install location being within the build or source prefix etc. Other build properties containing paths should have similar tests, so this allows some parameterization while keeping the preparation of the various directory structures.
* RunCMake: Remove unneeded files.Stephen Kelly2015-02-097-7/+0
| | | | | The default expectation of RunCMake tests is empty content, so there is no need to specify it.
* Tests: Speed up RunCMake.include_directories testBrad King2014-06-3011-11/+11
| | | | | | Remove unnecessary language initializations. Change the main CMakeLists.txt project() call to specify NONE. Use enable_language(CXX) instead of project() in cases that need it to avoid enabling C too.
* Tests: Refactor RunCMake.include_directories to drop RunCMake_TEST_FILEBrad King2014-06-304-24/+35
| | | | | Drop use of RunCMake_TEST_FILE and pass the test file in through a definition in RunCMake_TEST_OPTIONS.
* CMP0052: Make the warning message more informative.Stephen Kelly2014-04-172-0/+10
| | | | | Print the reason for the offending entry in the INTERFACE_INCLUDE_DIRECTORIES.
* CMP0052: Test that include dirs in install locations cause no warnings.Stephen Kelly2014-04-174-0/+14
|
* Export: Disallow exported interface includes in src/build tree (#14592).Stephen Kelly2014-04-0925-1/+207
| | | | | | | | | | | Allow directories in the source tree or build tree only if the install tree is a subdirectory of the source tree or build tree, as appropriate. Re-use the test files in the RunCMake.include_directories test to run in multiple scenarios. Bump the required CMake version in the test to 3.0 to ensure that the new policy warnings are emitted correctly.
* Export: Process relative includes after genex evaluation.Stephen Kelly2013-11-261-0/+12
| | | | | | | | | | | | | 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.
* Export: Test existing behavior of exporting includes with genexes.Stephen Kelly2013-11-265-1/+54
| | | | Test that no warning or error diagnostic is issued for 'good code'.
* genex: Test preprocessing incomplete expressions.Stephen Kelly2013-09-132-0/+24
|
* Cygwin: Avoid legacy warnings in RunCMake.* testsBrad King2013-08-131-1/+1
| | | | | | Set the minimum required version of CMake high enough to avoid the warning for CMAKE_LEGACY_CYGWIN_WIN32. The warning appears on stderr and breaks the expected output matching.
* Export: Process generator expressions from INCLUDES DESTINATION.Stephen Kelly2013-07-314-0/+13
| | | | Configuration sensitive expressions are not permitted.
* install: Remove error condition using INCLUDES DESTINATION without EXPORT.Stephen Kelly2013-07-294-10/+0
| | | | | | | | | | | | Commit 650e61f8 (Add a convenient way to add the includes install dir to the INTERFACE., 2013-01-05) introduced an error case for using the install(TARGETS) command with specified INCLUDES DESTINATION, but no specified EXPORT set. It is convenient to use a variable to set the various destinations for different outputs (as KDE does), and some targets such as executables are installed but not exported. This was triggering the error case, but as it is a common case, remove the error.
* Add a convenient way to add the includes install dir to the INTERFACE.Stephen Kelly2013-07-244-0/+10
| | | | | | | 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.
* Merge topic 'error-on-exported-missing-include-dir'Brad King2013-05-214-0/+15
|\ | | | | | | | | eabefa8 Error on relative path in INCLUDE_DIRECTORIES target property.
| * Error on relative path in INCLUDE_DIRECTORIES target property.Stephen Kelly2013-05-214-0/+15
| | | | | | | | | | Add policy CMP0021 to preserve existing behavior in projects expecting it from earlier CMake versions.
* | Test transitive includes from setting the LINK_LIBRARIES property.Stephen Kelly2013-05-062-0/+17
|/ | | | | | | | Commit b8259c3d (Centralize maintenance of usage requirement include directories, 2013-04-29) changed the handling of the property. Previously setting the property directly instead of via target_link_libraries would not result in transitive include directory handling.
* Error if linked target has relative paths in INTERFACE_INCLUDE_DIRECTORIESStephen Kelly2013-03-264-0/+15
| | | | | | | | | We can do this check only if the TargetName is non-empty, which means that we're evaluating INTERFACE_INCLUDE_DIRECTORIES from a linked dependency which was set using target_link_libraries. It is possible to have relative paths in INCLUDE_DIRECTORIES already in CMake 2.8.10.2, so that part will require a policy to fix.
* Report an error on IMPORTED targets with a faulty INTERFACEStephen Kelly2013-03-264-0/+24
| | | | | | | | | | It is considered an error if the INTERFACE_INCLUDE_DIRECTORIES contains a directory which does not exist, which indicates a programmer error by the upstream, or a packaging error. One of the RunCMake.CompatibleInterface tests also needs to be updated due to this change. Non-existant includes were used in the test, but are not needed.
* install(EXPORT): Ensure clean INTERFACE_INCLUDE_DIRECTORIESStephen Kelly2013-03-2611-0/+56
| | | | | | | | | | 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.
* Don't populate INTERFACE includes and defines properties in tll.Stephen Kelly2013-02-132-7/+12
| | | | | | | | | This is a partial revert of commit 77cecb77 (Add includes and compile definitions with target_link_libraries., 2012-11-05). As the interface includes and defines are now determined by the link closure, there is no need to populate the corresponding properties explicitly.
* Whitelist target types in target_{include_directories,compile_definitions}Stephen Kelly2013-02-084-0/+12
| | | | | Setting include directories or compile definitions on a target created with add_custom_target does not make sense.
* Test printing origin of include dirs from tll().Stephen Kelly2013-02-072-3/+16
|
* 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.
* Add a way to print the origins of used include directories.Stephen Kelly2013-01-034-0/+82
|
* GenEx: Fix reporting about not-found include directories and libraries.Stephen Kelly2012-10-175-0/+22
This fixes a regression introduced in commit 290e92ad (Move GetIncludeDirectories to cmGeneratorTarget, 2012-09-16) which loops over cmGeneratorTargets before they get created, so the container is empty.