summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* tidy: Fix readability-redundant-string-cstr issuesGregor Jasny2016-09-041-37/+33
|
* Xcode: Add targets marked as EXCLUDE_FROM_ALL to project (#16101)Gregor Jasny2016-08-311-9/+4
|
* Xcode: Obey SYSTEM keyword for includes (#15687)Gregor Jasny2016-08-091-14/+34
| | | | | | | | | | | | | CMake used to put all header search paths into HEADER_SEARCH_PATHS attribute. Unfortunately this attribute does not support to declare a search path as a system include. As a hack one could add a -isystem /path to the cflags but then include ordering is not deterministic. A better approach was chosen with this patch by not filling HEADER_SEARCH_PATHS at all and to populate the C, C++, and Fortran flags directly. The include paths used by Xcode should be now identical to the ones used by Unix Makefiles and Ninja generator.
* Honor BUNDLE_EXTENSION also for Frameworks (#14742)Gregor Jasny2016-07-221-0/+5
|
* Honor BUNDLE_EXTENSION also for App Bundles (#16148)Gregor Jasny2016-07-221-0/+5
|
* CMake: Report whether generators support platformsTobias Hunger2016-07-141-0/+1
|
* cmGlobalGeneratorFactory: Use CM_OVERRIDE for all derived classesTobias Hunger2016-07-141-5/+5
|
* Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-291-2/+2
| | | | | | | | | | | | Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to our own implementation adopted from the KWSys auto_ptr implementation. Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers that do not warn about it. Automate the client site conversions: git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \ 's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
* Xcode: Properly handle BUNDLE_EXTENSIONGregor Jasny2016-06-181-0/+5
|
* Xcode: Add support for mig filesJames Touton2016-06-171-0/+2
|
* Xcode: Add XCODE_FILE_ATTRIBUTES source file propertyJames Touton2016-06-171-0/+14
| | | | This adds values to the ATTRIBUTES list in PBXBuildFile settings.
* Xcode: Don't emit empty settings blocks.James Touton2016-06-171-6/+7
|
* Remove c_str() calls from stream arguments.Daniel Pfeifer2016-06-061-2/+2
| | | | | | Mostly automated: git grep -l '.c_str() <<' | xargs sed -i 's|\.c_str() <<| <<|g'
* call static cmOutputConverter::GetFortranFormat without objectDaniel Pfeifer2016-06-061-2/+2
|
* cmGlobalGenerator: Make IsMultiConfig() constTobias Hunger2016-06-011-1/+1
|
* 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.
| * Use std::replace for replacing chars in strings.Daniel Pfeifer2016-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | Find uses of `cmSystemTools::ReplaceString` where both `replace` and `with` are string literals with a size of one. Automate with: git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\2', '\3');|g" git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\\\\\\\\\");|std::replace(\1.begin(), \1.end(), '\2', '\\\\\\\\');|g" git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\\\\\\\\\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\\\\\\\\', '\2');|g"
* | Use enums defined in cmOutputConverter using their fully qualified name.Daniel Pfeifer2016-05-251-4/+4
|/ | | | | | | | | Mostly automated: values=("RelativeRoot" "NONE" "FULL" "HOME" "START" "HOME_OUTPUT" "START_OUTPUT" "OutputFormat" "UNCHANGED" "MAKERULE" "SHELL" "WATCOMQUOTE" "RESPONSE" "FortranFormat" "FortranFormatNone" "FortranFormatFixed" "FortranFormatFree") for i in "${values[@]}"; do git grep -l cmLocalGenerator::$i | xargs sed -i "s|cmLocalGenerator::$i|cmOutputConverter::$i|g"; done
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-1897/+1293
| | | | | | | | | | | | | 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-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
| |