summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Add missing braces around statements.Daniel Pfeifer2016-06-101-7/+14
| | | | | Apply fixits of clang-tidy's readability-braces-around-statements checker.
* Simplify boolean expressionsDaniel Pfeifer2016-06-021-5/+1
| | | | | | Use clang-tidy's readability-simplify-boolean-expr checker. After applying the fix-its, revise all changes *very* carefully. Be aware of false positives and invalid changes.
* Merge topic 'improve-character-find-and-replace'Brad King2016-05-251-1/+1
|\ | | | | | | | | | | | | | | 5784747d Improve string find: prefer character overloads. 5cec953e Use std::replace for replacing chars in strings. 2a1a2033 cmExtraEclipseCDT4Generator: use std::replace. 34bc6e1f cmCTestScriptHandler: don't call find repeatedly.
| * Improve string find: prefer character overloads.Daniel Pfeifer2016-05-241-1/+1
| | | | | | | | | | Apply fix-its from clang-tidy's performance-faster-string-find checker. Ignore findings in kwsys.
* | Add a variable to specify language-wide system include directoriesBrad King2016-05-251-0/+12
|/ | | | | | | Create a `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` variable to specify system include directories for for `<LANG>` compiler command lines. This plays a role for include directories as the existing `CMAKE_<LANG>_STANDARD_LIBRARIES` variable does for link libraries.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-2741/+1907
| | | | | | | | | | | | | 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.
* cmGeneratorTarget: Protect macro code layout from clang-formatBrad King2016-05-161-12/+12
| | | | | | | The `IMPLEMENT_VISIT_IMPL` macro must preserve a space before the `>` character in case the `DATATYPE` is a template type ending in `>`. Manually format the macro layout as clang-format would except for this space. Then add markup to tell clang-format not to format this macro.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-169/+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.
* Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang-format tool can do a good job formatting most code, but well-organized streaming blocks are best left manually formatted. Find blocks of the form os << "...\n" "...\n" ; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}' Find blocks of the form os << "...\n" << "...\n" << "...\n"; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}' Surround such blocks with the pair /* clang-format off */ ... /* clang-format on */ in order to protect them from update by clang-format. Use the C-style `/*...*/` comments instead of C++-style `//...` comments in order to prevent them from ever being swallowed by re-formatting of surrounding comments.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Avoid depending on CMAKE_ROOT cache entry internally (#16015)Brad King2016-03-161-2/+1
| | | | | | Use cmSystemTools::GetCMakeRoot() which always knows the location of our resources. Do not depend on CMAKE_ROOT because the user could unset it from the cache.
* Remove temporary allocations when calling cmGeneratorTarget::GetName.Milian Wolff2016-01-201-1/+1
| | | | | | | | | | | | | | This happens quite often from within comparisons such as in NamedGeneratorTargetFinder or FindGeneratorTargetImpl. It is the top hotspot of both, number of allocations as well as number of temporary allocations - the majority of calls lead to temporary allocations. In raw numbers, this patch removes ~1E6 temporary allocations of 1.5E6 temporary allocations in total when running the cmake daemon on the KDevelop build dir. That is 2/3 of the total. This hotspot was found with heaptrack.
* iOS: Fix framework resource directory layout (#15848)Bartosz Kosiorek2015-12-031-1/+5
| | | | | | | | A typical iOS application bundle (also Framework Bundle) contains the application executable and any resources used by the application (for instance, the application icon, other images, and localized content) in the top-level bundle directory. The same rule applies to Framework Bundles.
* Android: Restore generation of non-versioned soname (#15851)Brad King2015-11-191-0/+1
| | | | | | | | Our check of CMAKE_PLATFORM_NO_VERSIONED_SONAME, originally added by commit v3.1.0-rc1~416^2 (Add basic Android platform module, 2014-06-06), was dropped accidentally by commit v3.4.0-rc1~250^2~21 (cmGeneratorTarget: Move GetLibraryNames from cmTarget, 2015-08-04). Restore the check in the new location of the GetLibraryNames method.
* Refactor `.def` file lookupTim Grothe2015-11-041-4/+10
| | | | | Return a `cmSourceFile const*` from GetModuleDefinitionFile so that callers can get more information than just the path to the file.
* cmGeneratorTarget: Fix IMPLEMENT_VISIT_IMPL for template data typesBrad King2015-11-041-1/+1
| | | | | Update spacing near the DATATYPE reference to prevent construction of `>>` as a preprocessing token if DATATYPE is a template type.
* cmGeneratorTarget: Add API for globally visible IMPORTEDStephen Kelly2015-10-271-0/+5
|
* cmTargetCollectLinkLanguages: Remove cmMakefile dependencyStephen Kelly2015-10-271-3/+3
|
* cmGeneratorTarget: Port cmOptionalLinkImplementationStephen Kelly2015-10-271-2/+2
|
* cmGeneratorTarget: Add API for property keysStephen Kelly2015-10-271-6/+23
|
* cmGeneratorTarget: Move LinkLanguagePropagatesToDependents from cmTargetStephen Kelly2015-10-271-2/+2
|
* cmGeneratorTarget: Add GetUtilityBacktrace APIStephen Kelly2015-10-271-0/+6
|
* cmGeneratorTarget: Add GetUtilities APIStephen Kelly2015-10-271-1/+6
|
* cmGeneratorTarget: Add GetLinkDirectories API.Stephen Kelly2015-10-261-0/+5
|
* cmGeneratorTarget: Move GetFrameworkVersion from cmTargetStephen Kelly2015-10-261-2/+21
|
* cmGeneratorTarget: Add API for target-relative commands.Stephen Kelly2015-10-261-3/+21
|
* Makefiles: Port progress marks to cmGeneratorTarget.Stephen Kelly2015-10-241-0/+12
|
* cmGlobalGenerator: Move GeneratorTargetsType to usage site.Stephen Kelly2015-10-241-12/+0
|
* Access policy status from cmGeneratorTarget at generate time.Stephen Kelly2015-10-201-13/+13
|
* cmGeneratorTarget: Copy the policy map from the cmTarget.Stephen Kelly2015-10-201-0/+2
|
* Move ComputeLinkType out of cmTarget.Stephen Kelly2015-10-201-1/+6
| | | | | Keep it out of the way, so that it does not become part of cmGeneratorTarget, but where it can be used to implement CMP0003.
* cmGeneratorTarget: Move IsDLLPlatform from cmTarget.Stephen Kelly2015-10-201-2/+11
|
* cmGeneratorTarget: Move HaveWellDefinedOutputFiles from cmTarget.Stephen Kelly2015-10-201-1/+11
|
* cmGeneratorTarget: Move GetExportMacro from cmTarget.Stephen Kelly2015-10-201-0/+26
|
* cmGeneratorTarget: Provide direct access to the backtrace.Stephen Kelly2015-10-201-12/+17
|
* cmGeneratorTarget: Copy IsExecutableWithExports from cmTarget.Stephen Kelly2015-10-201-7/+14
|
* cmGeneratorTarget: Move IsCFBundleOnApple from cmTarget.Stephen Kelly2015-10-191-4/+12
|
* cmGeneratorTarget: Move IsXCTestOnApple from cmTarget.Stephen Kelly2015-10-191-1/+8
|
* cmGeneratorTarget: Copy IsAppBundleOnApple from cmTarget.Stephen Kelly2015-10-191-6/+13
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget.Stephen Kelly2015-10-191-7/+15
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* cmGeneratorTarget: Move IsLinkable from cmTarget.Stephen Kelly2015-10-191-0/+11
|
* cmGeneratorTarget: Move GetExportName from cmTarget.Stephen Kelly2015-10-181-0/+20
|
* Use cmGeneratorTarget for property access.Stephen Kelly2015-10-171-1/+1
|
* Use IsImported from cmGeneratorTarget.Stephen Kelly2015-10-161-10/+10
|
* cmGeneratorTarget: Move ComputeVersionedName from cmTarget.Stephen Kelly2015-10-161-2/+19
|
* cmGeneratorTarget: Move GetTargetVersion from cmTarget.Stephen Kelly2015-10-161-0/+38
|
* cmGeneratorTarget: Move CheckCMP0004 from cmTarget.Stephen Kelly2015-10-161-3/+62
|
* cmGeneratorTarget: Move ImportInfo from cmTarget.Stephen Kelly2015-10-161-4/+224
|
* cmGeneratorTarget: Move ImportedGetLocation from cmTarget.Stephen Kelly2015-10-161-0/+10
|
* cmGeneratorTarget: Move GetFullNameImported from cmTarget.Stephen Kelly2015-10-161-1/+9
|