summaryrefslogtreecommitdiff
path: root/Source/cmGlobalXCodeGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-80/+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/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* cmGlobalXCodeGenerator: do not pass char* to cmSystemTools::CollapseFullPath()Rolf Eike Beer2016-04-201-1/+1
| | | | | This takes a std::string&, so directly pass the object to it instead of converting back and forth.
* make cmGlobalXCodeGenerator::XCodeEscapePath() take a std::string&Rolf Eike Beer2016-04-201-17/+16
| | | | | All callers already have one, and it was immediately converted to one internally. Just keep the old one around, and only modify it when needed.
* make cmGlobalXCodeGenerator::BuildObjectListOrString::Add() take a string&Rolf Eike Beer2016-04-201-5/+5
| | | | | All callers already have these objects, and it is only passed to other methods taking such, so avoid all conversions in between.
* cmGlobalXCodeGenerator: directly call CreateString() with std::stringRolf Eike Beer2016-04-201-33/+33
| | | | | This function already takes a const std::string&, no need to convert the input to a char* before passing it in.
* Xcode: ReRunCMake even if files disappeared (#15992)Gregor Jasny2016-03-091-9/+18
|
* Xcode: Write refType only for Xcode 1.5Gregor Jasny2016-02-241-1/+4
| | | | This field is not expected by newer versions.
* Merge topic 'xcode-global-attribute-variant'Brad King2016-01-071-53/+83
|\ | | | | | | | | | | | | | | d8bc26a0 Xcode: Parse variant and genex for CMAKE_XCODE_ATTRIBUTE (#14947) dc0ddb9e Xcode: Store configuration name along with XcodeObject (#14947) 28f98cee Xcode: Make CMAKE_XCODE_ATTRIBUTE calculation last step (#14947) 28db2268 Xcode: Factor out XCODE_ATTRIBUTE_ variant filter (#14947)
| * Xcode: Parse variant and genex for CMAKE_XCODE_ATTRIBUTE (#14947)Gregor Jasny2016-01-031-16/+33
| |
| * Xcode: Store configuration name along with XcodeObject (#14947)Gregor Jasny2016-01-031-10/+9
| |
| * Xcode: Make CMAKE_XCODE_ATTRIBUTE calculation last step (#14947)Gregor Jasny2016-01-031-4/+4
| |
| * Xcode: Factor out XCODE_ATTRIBUTE_ variant filter (#14947)Gregor Jasny2016-01-031-27/+41
| | | | | | | | | | Move the variant=<config> filter out to a helper function so that it can be re-used later for CMAKE_XCODE_ATTRIBUTE_*.
* | Xcode: Escape all backslashes in strings (#15328)Gregor Jasny2016-01-071-22/+9
|/ | | | | | | | | | Before this change backslashes in strings were escaped during compile flags adds via AppendFlag(). But global flags like OTHER_CPLUSPLUSFLAGS are not added as flags but as plain strings so they were not escaped properly. Now the escaping is performed within cmXCodeObject::PrintString() which ensures that strings are always encoded.
* cmake-gui: Add option to specify generator toolsetRobert Dailey2015-11-171-0/+2
| | | | | | | | | | The -T parameter to CMake may now be specified through cmake-gui via a new text field in the first-time configure wizard (below the generator chooser). The generator factories specify whether or not they support toolsets. This information is propagated to the Qt code and used to determine if the selected generator should also display the optional Toolset widgets.
* Xcode: Set LastUpgradeCheck to current Xcode version (#15817)Gregor Jasny2015-10-301-0/+3
| | | | This prevents the project settings upgrade warning.
* cmGlobalGenerator: Remove map from cmTarget to cmGeneratorTargetStephen Kelly2015-10-271-2/+0
| | | | | | | The configure-time and generate-time types should be completely independent. Add ownership of cmGeneratorTarget instances to the cmLocalGenerator.
* cmGlobalGenerator: Remove direct storage of targetsStephen Kelly2015-10-271-5/+10
| | | | Find the target by looping when needed.
* cmGeneratorTarget: Add API for property keysStephen Kelly2015-10-271-5/+5
|
* cmake: Store hardcoded lists of sources and headersStephen Kelly2015-10-271-1/+1
| | | | Don't duplicate this in each cmMakefile.
* cmGeneratorTarget: Move GetFrameworkVersion from cmTargetStephen Kelly2015-10-261-1/+1
|
* cmGeneratorTarget: Add API for target-relative commands.Stephen Kelly2015-10-261-3/+3
|
* Merge topic 'use-generator-target'Brad King2015-10-261-202/+198
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6cac952b VS: Port interface to cmGeneratorTarget 97b37688 VS: Port WriteUtilityDepends to cmGeneratorTarget 600af01d VS: Port utility depends to cmGeneratorTarget 330bfa83 VS: Port target depends to cmGeneratorTarget b13e26e2 VS: Port ProjectDepends to cmGeneratorTarget. 8ac8739b VS: Port TargetIsFortranOnly to cmGeneratorTarget 84fb579f VS: Port WriteProject to cmGeneratorTarget 1eff421a VS: Port loop to cmGeneratorTarget 94fd5a5a VS: Port ImplibDir to cmGeneratorTarget ce9e9a92 VS: Port LinkClosure to cmGeneratorTarget 26e23e84 VS: Port ComputeLongestObjectDirectory to cmGeneratorTarget 01c26986 VS7: Port to cmGeneratorTarget 459c8910 VS10: Port to cmGeneratorTarget. 7f8bb857 VS6: Port to cmGeneratorTarget. a0ebd69b Graphviz: Port to cmGeneratorTarget. bcee21ce C::B: Port API to cmGeneratorTarget. ...
| * Xcode: Port API to cmGeneratorTarget.Stephen Kelly2015-10-241-93/+85
| |
| * Xcode: Prefer to get target state from cmGeneratorTarget.Stephen Kelly2015-10-241-69/+68
| |
| * Xcode: Re-order conditions.Stephen Kelly2015-10-241-3/+3
| |
| * Xcode: Port ForceLinkerLanguage to cmGeneratorTarget.Stephen Kelly2015-10-241-8/+8
| |
| * Xcode: Port loops to cmGeneratorTarget.Stephen Kelly2015-10-241-29/+25
| |
| * Port to GetGeneratorTargets.Stephen Kelly2015-10-241-14/+23
| |
| * cmLocalGenerator: Store a vector of generator targets.Stephen Kelly2015-10-211-2/+2
| | | | | | | | Not a map from cmTarget to cmGeneratorTarget.
* | Merge topic 'xcode-optimization-flags'Brad King2015-10-261-8/+40
|\ \ | |/ |/| | | | | 601e6e1a Xcode: Use regular expression to extract all optimisation flags (#15794)
| * Xcode: Use regular expression to extract all optimisation flags (#15794)Gregor Jasny2015-10-231-8/+40
| |
* | Merge topic 'use-generator-target'Brad King2015-10-211-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c099e00f Access policy status from cmGeneratorTarget at generate time. d74bca5a cmGeneratorTarget: Copy the policy map from the cmTarget. c6e86955 cmTarget: Remove unused NameResolvesToFramework. 18046bd5 cmCommonTargetGenerator: Use NameResolvesToFramework without cmTarget. 91411641 Move ComputeLinkType out of cmTarget. 6d94078e cmGeneratorTarget: Move IsDLLPlatform from cmTarget. 3ebc6285 cmGeneratorTarget: Move HaveWellDefinedOutputFiles from cmTarget. 311018e5 cmGeneratorTarget: Move GetExportMacro from cmTarget. 215cd21a cmGeneratorTarget: Provide direct access to the backtrace. 1df8bd3a cmGlobalGenerator: Port IsRootOnlyTarget to cmGeneratorTarget. 83703bda cmGeneratorTarget: Copy IsExecutableWithExports from cmTarget.
| * | cmGeneratorTarget: Move GetExportMacro from cmTarget.Stephen Kelly2015-10-211-1/+1
| | |
* | | cmLocalGenerator: Simplify semantic of adding generator targets.Stephen Kelly2015-10-201-0/+2
|/ / | | | | | | Don't store on the global generator as a side effect. Update clients to adapt.
* | cmGeneratorTarget: Move IsCFBundleOnApple from cmTarget.Stephen Kelly2015-10-191-5/+5
| |
* | cmGeneratorTarget: Move IsXCTestOnApple from cmTarget.Stephen Kelly2015-10-191-2/+2
| |
* | cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget.Stephen Kelly2015-10-191-8/+11
| | | | | | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* | Xcode: Port internal API to cmGeneratorTarget.Stephen Kelly2015-10-181-14/+17
| |
* | cmLocalGenerator: Port PList handling to cmGeneratorTarget.Stephen Kelly2015-10-181-3/+3
| |
* | cmLocalGenerator: Port some API to cmGeneratorTarget.Stephen Kelly2015-10-171-4/+4
| |
* | cmGeneratorTarget: Move GetTargetVersion from cmTarget.Stephen Kelly2015-10-161-2/+2
|/
* cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-151-66/+66
| | | | | | | 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
* cmLocalGenerator: Store cmGeneratorTargets.Stephen Kelly2015-10-141-2/+2
| | | | Relieve cmMakefile of this responsibility.
* cmGeneratorExpression: Port to cmLocalGenerator.Stephen Kelly2015-10-121-1/+1
|
* Merge topic 'use-generator-target'Brad King2015-10-121-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1c1c2a12 cmGeneratorTarget: Port ExpandLinkItems away from cmTarget. c66084f5 cmGeneratorTarget: Port GetImportLinkInterface away from cmTarget. 83c29e39 cmGeneratorTarget: Port ComputeLinkImplementationLibraries away from cmTarget. 19882554 cmGeneratorTarget: Port handleSystemIncludesDep away from cmTarget. c1f687b1 cmGeneratorTarget: Port GetLinkImplementationLibrariesInternal. a6e1f05c cmGeneratorTarget: Port ComputeLinkInterface away from cmTarget. 654002fe cmGeneratorTarget: Port ComputeLinkInterfaceLibraries away from cmTarget. 922c8901 cmGeneratorTarget: Port GetLinkInterface away from cmTarget. eaa5b9cb cmGeneratorTarget: Port cmTargetCollectLinkLanguages away from cmTarget. f539da12 cmGeneratorTarget: Port GetLinkInterfaceLibraries away from cmTarget. 1c5d70f9 cmGeneratorTarget: Port processILibs away from cmTarget. 064c2488 cmComputeLinkDepends: Port some API to cmGeneratorTarget. 3e428fdc cmGeneratorTarget: Move IsImportedSharedLibWithoutSOName from cmTarget. 110fd2fb cmGeneratorTarget: Move GetOutputTargetType from cmTarget. e7391699 cmGeneratorTarget: Move HasMacOSXRpathInstallNameDir from cmTarget. c5718217 cmGeneratorTarget: Move HaveInstallTreeRPATH from cmTarget. ...
| * cmGeneratorTarget: Move UsesDefaultOutputDir from cmTarget.Stephen Kelly2015-10-091-1/+1
| |
| * cmGeneratorTarget: Move GetDirectory from cmTarget.Stephen Kelly2015-10-091-2/+2
| |