summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Store system include directories in the cmTarget.Stephen Kelly2013-07-021-0/+33
| | | | | | | Entries from the cmMakefile are processed and maintained similarly to other include directories. The include_directories(SYSTEM) signature affects all following targets, and all prior targets in the same makefile.
* automoc: add a global AUTOMOC_TARGETS_FOLDER propertyAlex Neundorf2013-06-281-1/+3
| | | | | | | | | | This has been requested, along with a patch, by Shaun Williams in http://public.kitware.com/Bug/view.php?id=13788 . It adds a global property AUTOMOC_TARGETS_FOLDER, which can be used to group the automoc targets together in a folder e.g. in Visual Studio. Alex
* VS: Add support for .NET target framework versionChristian Maaser2013-06-141-0/+5
| | | | | | | | | Teach CMake to generate the TargetFrameworkVersion XML node as documented at http://msdn.microsoft.com/en-us/library/vstudio/ff770576.aspx from target property VS_DOTNET_TARGET_FRAMEWORK_VERSION.
* Merge topic 'add_compile_options-command'Brad King2013-06-051-1/+9
|\ | | | | | | | | a984f32 Introduce add_compile_options command.
| * Introduce add_compile_options command.Stephen Kelly2013-06-041-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This command is similar to add_definitions, in that it affects the compile options of all targets which follow it. The implementation is similar to the implementation of the include_directories command, in that it is based on populating a COMPILE_OPTIONS directory property and using that to initialize the same property on targets. Unlike the include_directories command however, the add_compile_options command does not affect previously defined targets. That is, in the following code, foo will not be compiled with -Wall, but bar will be: add_library(foo ...) add_compile_options(-Wall) add_library(bar ...)
* | Merge topic 'VISIBILITY_PRESET-property'Brad King2013-06-051-0/+33
|\ \ | | | | | | | | | | | | | | | cd1fa53 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property. 0e9f4bc Introduce target property <LANG>_VISIBILITY_PRESET
| * | Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.Stephen Kelly2013-06-021-0/+12
| | | | | | | | | | | | | | | | | | | | | This corresponds to the g++ and clang++ option -fvisibility-inlines-hidden on linux. On Windows with MinGW, this corresponds to -fno-keep-inline-dllexport. That option is not supported by clang currently.
| * | Introduce target property <LANG>_VISIBILITY_PRESETStephen Kelly2013-06-021-0/+21
| | | | | | | | | | | | | | | | | | This is initialized by CMAKE_<LANG>_VISIBILITY_PRESET. The target property is used as the operand to the -fvisibility= compile option with GNU compilers and clang.
* | | Merge topic 'cfbundle-location'Brad King2013-06-041-2/+17
|\ \ \ | |_|/ |/| | | | | | | | 483e208 OS X: Fix getting of CFBundle LOCATION property.
| * | OS X: Fix getting of CFBundle LOCATION property.Clinton Stimpson2013-06-031-2/+17
| | | | | | | | | | | | | | | | | | | | | This fixes bug #13797. The kinds of changes applied in 373faae5 for frameworks are now applied to CFBundle. The prefix and suffix for CFBundles are now handled in cmTarget::GetFullNameInternal.
* | | Merge topic 'target-COMPILE_OPTIONS'Brad King2013-06-031-27/+265
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 24466f2 Add target_compile_options command. 80ca9c4 Add COMPILE_OPTIONS target property. 7cb2308 cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries 47f80d9 cmTarget: Rename struct to be more re-usable. 1319a14 Add <LANG>_COMPILER_ID generator expressions. 3549676 Add cmLocalGenerator::GetCompileOptions. f3ad863 VS6: Rename some variables to correspond to config values.
| * | | Add target_compile_options command.Stephen Kelly2013-06-021-0/+14
| | | | | | | | | | | | | | | | This command populates the COMPILE_OPTIONS target property.
| * | | Add COMPILE_OPTIONS target property.Stephen Kelly2013-06-021-0/+224
| | | | | | | | | | | | | | | | | | | | | | | | This method reads generator expressions from the COMPILE_OPTIONS target property, as well as INTERFACE_COMPILE_OPTIONS from linked dependents.
| * | | cmTarget: Rename LinkInterfaceIncludeDirectoriesEntriesStephen Kelly2013-06-021-6/+6
| | | | | | | | | | | | | | | | This can be used for COMPILE_OPTIONS too.
| * | | cmTarget: Rename struct to be more re-usable.Stephen Kelly2013-06-021-21/+21
| | | | | | | | | | | | | | | | The same struct can be used to represent COMPILE_OPTIONS content.
* | | | Merge topic 'vs-RootNamespace'Brad King2013-06-031-0/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | cca955a VS: Add VS_GLOBAL_ROOTNAMESPACE target property
| * | | | VS: Add VS_GLOBAL_ROOTNAMESPACE target propertyJohn Farrier2013-05-311-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Add a setting for Visual Studio projects for the root namespace in the "Globals" PropertyGroup section of the project file.
* | | | | Merge topic 'fix-style'Brad King2013-06-031-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | e162326 Fix indentation.
| * | | | | Fix indentation.Stephen Kelly2013-05-291-2/+2
| | |/ / / | |/| | |
* | | | | Merge topic 'rpath-on-mac'Brad King2013-06-031-2/+103
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc1d025 OS X: Add test for rpaths on Mac. 8576b3f OS X: Add support for @rpath in export files. 00d71bd Xcode: Add rpath support in Xcode generator. 94e7fef OS X: Add RPATH support for Mac.
| * | | | | OS X: Add support for @rpath in export files.Clinton Stimpson2013-06-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also expand the IMPORTED_SONAME property for targets to match the install_name.
| * | | | | OS X: Add RPATH support for Mac.Clinton Stimpson2013-06-031-2/+99
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RPATH support is activated on targets that have the MACOSX_RPATH property turned on. For install time, it is also useful to set INSTALL_RPATH to help find dependent libraries with an @rpath in their install name. Also adding detection of rpath conflicts when using frameworks.
* | | | | Merge topic 'framework-refactor'Brad King2013-06-031-56/+104
|\ \ \ \ \ | |/ / / / | | / / / | |/ / / |/| | | 373faae Refactor how bundles and frameworks are supported.
| * | | Refactor how bundles and frameworks are supported.Clinton Stimpson2013-05-231-56/+104
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make handling of directory separators consistent between non-bundle and bundle code. Remove xcode specific flag from cmTarget when getting install_name. Add (more) consistent convenience functions in cmTarget to get directories inside of bundles and frameworks to add files to. This refactor also fixes bug #12263 where frameworks had the wrong install name when SKIP_BUILD_RPATH. Also make install_name for frameworks consistent between Makefile and Xcode generator.
* | | Merge topic 'language-generator-expressions'Brad King2013-05-241-3/+7
|\ \ \ | |_|/ |/| | | | | | | | 3241014 Add $<LINK_LANGUAGE> generator expression
| * | Add $<LINK_LANGUAGE> generator expressionStephen Kelly2013-05-241-3/+7
| | | | | | | | | | | | | | | | | | They can't be used when evaluating link libraries, but they can be used for include directories and compile definitions. Later they can be used for compile options.
* | | Merge topic 'LinkLine-typedef'Brad King2013-05-221-2/+0
|\ \ \ | | | | | | | | | | | | | | | | 776225d cmTarget: drop the unused local typedef LinkLine
| * | | cmTarget: drop the unused local typedef LinkLineRolf Eike Beer2013-05-221-2/+0
| | | |
* | | | Merge topic 'add-EXPORT_NAME-property'Brad King2013-05-221-0/+43
|\ \ \ \ | |/ / / |/| | | | | | | | | | | b5d6f5d Add EXPORT_NAME property.
| * | | Add EXPORT_NAME property.Stephen Kelly2013-05-181-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | 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'.
* | | | Merge topic 'unused-cleanup'Brad King2013-05-211-1/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 994dc70 Remove unused vector population. 44258cc Remove unused typedef. 0a4d7d8 Remove unused marker for a variable which is now used.
| * | | | Remove unused marker for a variable which is now used.Stephen Kelly2013-05-161-1/+0
| | |/ / | |/| |
* | | | Merge topic 'fix-style'Brad King2013-05-211-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | 3c7c332 Fix brace indentation. c70b9b5 Fix style.
| * | | | Fix style.Stephen Kelly2013-05-161-1/+1
| |/ / /
* | | | Merge topic 'error-on-exported-missing-include-dir'Brad King2013-05-211-3/+33
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | eabefa8 Error on relative path in INCLUDE_DIRECTORIES target property.
| * | | Error on relative path in INCLUDE_DIRECTORIES target property.Stephen Kelly2013-05-211-3/+33
| |/ / | | | | | | | | | | | | Add policy CMP0021 to preserve existing behavior in projects expecting it from earlier CMake versions.
* | | Merge topic 'doc-improvements'Brad King2013-05-161-5/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7cc2805 Docs: Clarify wording "flag used" => "flag (to|will) be used" 2378a69 Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames 56ca34d Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES) 2bab472 VS10: add detailed comment about MIDL processing e619111 Explain distribution of Win9x binary on all Windows versions. 5ca4336 FindwxWidgets: add DOC strings with usual style f57800d Fix spelling and typos (product names) bf019d7 Fix spelling and typos (non-binary) ddac8d3 Fix spelling and typos (affecting binary data / module messages) 86832ce Fix spelling and typos (affecting users)
| * | | Fix spelling and typos (product names)Andreas Mohr2013-05-071-2/+2
| | | | | | | | | | | | | | | | API, Borland, MinGW, UNIX, Mac OS X.
| * | | Fix spelling and typos (affecting binary data / module messages)Andreas Mohr2013-05-071-3/+3
| | |/ | |/|
* | | Merge topic 'vs-no-compiler-pdb-setting'Brad King2013-05-161-4/+4
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | 87c0d16 Ninja: Fix OBJECT_DIR placeholder path conversion fb9f73d MSVC: Invoke 'link' directly for executables 42ba1b0 VS: Separate compiler and linker PDB files (#11899, #14062)
| * | VS: Separate compiler and linker PDB files (#11899, #14062)Brad King2013-04-051-4/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MS tools create two types of PDB files as explained here: http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.71%29.aspx http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.80%29.aspx http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.90%29.aspx http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.100%29.aspx One is created by the compiler (/Fd) and the other by the linker (/pdb). The two options should not specify the same file. Split them up. In the VS IDE generators, simply drop ProgramDataBaseFileName to take the VS default "/Fd$(IntDir)vc$(PlatformToolsetVersion).pdb". In the Makefile generators, set "/Fd" on the compile line to be the directory containing object files (with a trailing slash the compiler will add the "vc$(PlatformToolsetVersion).pdb" filename automatically). Drop the /Fd option from the exe link command line and add "/pdb" instead (already done for dll linking). Update these rules for both MSVC and Intel tools. Drop support for PDB_OUTPUT_DIRECTORY and PDB_NAME in STATIC libraries because the generated .pdb files are only from /Fd and not real linker-generated .pdb files. Update documentation to clarify that the PDB_* properties are only for linker .pdb files. This regresses the PDBDirectoryAndName test for STATIC libraries. Since it is not clear at this time what should be done for STATIC library .pdb files, comment out the relevant portion of the test and leave a TODO comment.
* | Memoize usage requirement include directories in a config-specific mapStephen Kelly2013-05-061-4/+18
| | | | | | | | | | | | | | Commit 42ebb188 (Memoize includes and defines from interface libraries., 2013-02-22) introduced caching of the includes. Fix the memoization to be configuration-specific so that we do not accumulate entries across multiple evaluations in a multi-config generator.
* | Fix include dir propagation from conditionally linked targetsStephen Kelly2013-05-061-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generator expressions, including configuration-specific expressions may be used as link libraries of targets. The old-style keywords of target_link_libraries are handled in terms of new generator expressions. However, the generator expressions expect target names to be valid against a regular expression, whereas target_link_libraries does not require validation. In generator expression constructed without any action from the user we need to ensure that only valid expressions are generated. Ensure that strings which are not valid target names are not used in generator expressions which validate the argument. Code like target_link_libraries(B debug A) generates usage requirement references such as "$<$<CONFIG:DEBUG>:A>". When cmTarget::GetIncludeDirectories uses such references it generates expressions like: $<TARGET_PROPERTY:$<$<CONFIG:DEBUG>:A>,INTERFACE_INCLUDE_DIRECTORIES> When the conditions are false such references evaluate as an empty string and the expression fails with an error such as: $<TARGET_PROPERTY:tgt,prop> expression requires a non-empty target name. Fix this by teaching cmTarget::GetIncludeDirectories to wrap the above expression inside a conditional: $<$<BOOL:$<$<CONFIG:DEBUG>:A>>:...> so that $<TARGET_PROPERTY:...> will not be evaluated with an empty target.
* | Centralize maintenance of usage requirement include directoriesStephen Kelly2013-05-061-6/+17
|/ | | | | | Maintain a target's internal list of usage requirement include directories whenever the LINK_LIBRARIES property is set by either target_link_libraries or set_property.
* Merge topic 'error-on-exported-missing-include-dir'Brad King2013-03-281-0/+14
|\ | | | | | | | | 634bb33 Error if linked target has relative paths in INTERFACE_INCLUDE_DIRECTORIES
| * Error if linked target has relative paths in INTERFACE_INCLUDE_DIRECTORIESStephen Kelly2013-03-261-0/+14
| | | | | | | | | | | | | | | | | | 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.
* | Merge topic 'error-on-exported-missing-include-dir'Brad King2013-03-261-3/+28
|\ \ | |/ | | | | | | | | 28051f1 Report an error on IMPORTED targets with a faulty INTERFACE af81a3c install(EXPORT): Ensure clean INTERFACE_INCLUDE_DIRECTORIES
| * Report an error on IMPORTED targets with a faulty INTERFACEStephen Kelly2013-03-261-3/+28
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge topic 'fix-COMPILE_DEFINITIONS-config'Brad King2013-03-261-13/+17
|\ \ | |/ |/| | | | | | | 1703b00 Test evaluation of per-config COMPILE_DEFINITIONS (#14037) a6286e9 Fix the evaluation of per-config COMPILE_DEFINITIONS (#14037)
| * Fix the evaluation of per-config COMPILE_DEFINITIONS (#14037)Stephen Kelly2013-03-251-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The API for retrieving per-config COMPILE_DEFINITIONS has long existed because of the COMPILE_DEFINITIONS_<CONFIG> style properties. Ensure that the provided configuration being generated is also used to evaluate the generator expressions in cmTarget::GetCompileDefinitions. Both the generic COMPILE_DEFINITIONS and the config-specific variant need to be evaluated with the requested configuration. This has the side-effect that the COMPILE_DEFINITIONS does not need to be additionally evaluated with no configuration, so the callers can be cleaned up a bit too.