summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/TargetPolicies
Commit message (Collapse)AuthorAgeFilesLines
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-1/+1
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* CMP0065: Restrict the use of CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGSChuck Atkins2015-09-211-0/+1
| | | | | This new policy restricts the addition of the shared library link flags to executables only when the ENABLE_EXPORTS property is set to True.
* Honor visibility properties for all target types (#15556)Brad King2015-05-261-0/+1
| | | | | | | | | | | | | | | | The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN were first merged in commit v2.8.12~322 (Merge topic 'VISIBILITY_PRESET-property', 2013-06-05) but worked only for shared libraries and executables with exports. Prior to commit v3.0.0-rc1~581^2 (GenerateExportHeader: Deprecate add_compiler_export_flags function., 2013-09-02) the add_compiler_export_flags function was used to add visibility flags to all targets. The visibility flags are useful for sources in all target types because they may be later linked into shared libraries or executables with exports. Introduce policy CMP0063 to enable them for all target types while preserving compatibility with existing projects that do not expect this.
* Link libraries by full path even in implicit directoriesBrad King2015-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | When CMP0003 was first introduced we wanted to link all libraries by full path. However, some projects had problems on platforms where find_library would find /usr/lib/libfoo.so when the project really wanted to link to /usr/lib/<arch>/libfoo.so and had been working by accident because pre-CMP0003 behavior used -lfoo to link. We first tried to address that in commit v2.6.0~440 (Teach find_library to avoid returning library paths in system directories, 2008-01-23) by returning just "foo" for libraries in implicit link directories. This caused problems for projects expecting find_library to always return a full path. We ended up using the solution in commit v2.6.0~366 (... switch library paths found in implicit link directories to use -l, 2008-01-31). However, the special case for libraries in implicit link directories has also proven problematic and confusing. Introduce policy CMP0060 to switch to linking all libraries by full path even if they are in implicit link directories. Explain in the policy documentation the factors that led to the original approach and now to this approach.
* Export: Disallow exported interface includes in src/build tree (#14592).Stephen Kelly2014-04-091-0/+1
| | | | | | | | | | | 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.
* Record more policies on targets when createdBrad King2014-03-061-0/+3
| | | | | Policies CMP0027, CMP0038, and CMP0046 have per-target meaning so record the policy settings on targets as they are created.
* Help: Ensure that target-policies are added to the documentation.Stephen Kelly2014-01-071-0/+5
| | | | The two most-recently-added policies were not tested for.
* 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.
* Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICYStephen Kelly2013-07-116-0/+35
Use preprocessor loops and add a unit test for the appropriate policies. All policies whose value is recorded at target creation time should be part of this list.