summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetPropCommandBase.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-93/+64
| | | | | | | | | | | | | 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.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-7/+7
| | | | | | | Mostly automated: values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType") for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
* cmTargetPropCommandBase: Change the interface to return bool.Stephen Kelly2014-04-071-6/+8
| | | | | This is needed for the target_compile_features command, which may fail at configure time if an invalid feature is specified.
* Remove some c_str() calls.Stephen Kelly2014-03-111-4/+4
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* cmTarget: Remove the project argument to FindTargetBen Boeckel2014-03-081-1/+1
| | | | All callers passed 0 in, so just remove the branch.
* stringapi: Use strings for property namesBen Boeckel2014-03-081-2/+3
| | | | Property names are always generated by CMake and should never be NULL.
* cmMakefile: make some methods take const std::string& instead of const char*Rolf Eike Beer2014-01-161-2/+2
| | | | | | | | Most callers already have a std::string, on which they called c_str() to pass it into these methods, which internally converted it back to std::string. Pass a std::string directly to these methods now, avoiding all these conversions. Those methods that only pass in a const char* will get the conversion to std::string now only once.
* Add the INTERFACE_LIBRARY target type.Stephen Kelly2013-10-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | This target type only contains INTERFACE_* properties, so it can be used as a structural node. The target-specific commands enforce that they may only be used with the INTERFACE keyword when used with INTERFACE_LIBRARY targets. The old-style target properties matching LINK_INTERFACE_LIBRARIES_<CONFIG> are always ignored for this target type. The name of the INTERFACE_LIBRARY must match a validity generator expression. The validity is similar to that of an ALIAS target, but with the additional restriction that it may not contain double colons. Double colons will carry the meaning of IMPORTED or ALIAS targets in CMake 2.8.13. An ALIAS target may be created for an INTERFACE library. At this point it can not be exported and does not appear in the buildsystem and project files are not created for them. That may be added as a feature in a later commit. The generators need some changes to handle the INTERFACE_LIBRARY targets returned by cmComputeLinkInterface::GetItems. The Ninja generator does not use that API, so it doesn't require changes related to that.
* Add the ALIAS target concept for libraries and executables.Stephen Kelly2013-08-021-0/+5
| | | | | | | | | | | | | | | | | * The ALIAS name must match a validity regex. * Executables and libraries may be aliased. * An ALIAS acts immutable. It can not be used as the lhs of target_link_libraries or other commands. * An ALIAS can be used with add_custom_command, add_custom_target, and add_test in the same way regular targets can. * The target of an ALIAS can be retrieved with the ALIASED_TARGET target property. * An ALIAS does not appear in the generated buildsystem. It is kept separate from cmMakefile::Targets for that reason. * A target may have multiple aliases. * An ALIAS target may not itself have an alias. * An IMPORTED target may not have an alias. * An ALIAS may not be exported or imported.
* Allow target commands to be invoked with no items (#14325).Stephen Kelly2013-07-311-3/+3
| | | | | | | | Code such as target_include_directories(foo PRIVATE ${items}) should not work or break based on whether items is defined or not.
* Add a SYSTEM parameter to target_include_directories (#14180)Stephen Kelly2013-07-021-8/+20
| | | | | | This is similar to the include_directories(SYSTEM) signature in that it allows telling the compiler to ignore warnings from such headers.
* Extend the cmTargetPropCommandBase interface property handling.Stephen Kelly2013-07-021-14/+22
| | | | | This can be used to handle INTERFACE SYSTEM include directories in particular.
* Whitelist target types in target_{include_directories,compile_definitions}Stephen Kelly2013-02-081-0/+9
| | | | | Setting include directories or compile definitions on a target created with add_custom_target does not make sense.
* Make subclasses responsible for joining content.Stephen Kelly2013-01-291-7/+6
| | | | | This way we can add handling of relative/absolute paths and of -D in compile definitions.
* Don't allow targets args in the new target commands.Stephen Kelly2013-01-291-21/+1
|
* Merge topic 'disallow-IMPORTED-interface-porcelain'Brad King2013-01-231-2/+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-211-2/+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.
* | Make sure generator expressions can be used with target_include_directories.Stephen Kelly2013-01-161-0/+12
|/ | | | | Handle the case that a generator expression is used before treating a non-target as an error.
* Add the target_include_directories command.Stephen Kelly2013-01-101-0/+144
This is a convenience API to populate the corresponding properties.