summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Add generator expression support to per-source COMPILE_FLAGSZsolt Parragi2016-10-281-1/+18
| | | | | | This allows users to specify different genex-based compile flags for each file in a target, e.g. compiling just a single file with `Od/Ox` in release builds on Visual Studio.
* cmGlobalGenerator: Allow FindMakeProgram to failBrad King2016-10-201-1/+2
| | | | | Revise its signature to return `bool` so that it can fail and abort configuration early.
* cmState: Move CacheEntryType enum to separate namespaceStephen Kelly2016-10-191-3/+4
| | | | Port dependent code to the change.
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-66/+66
|
* Factor IDE folder name retrieval out into helper methodGregor Jasny2016-10-171-2/+2
| | | | | | Add a `cmGeneratorTarget::GetEffectiveFolderName` helper to abstract lookup of the `FOLDER` property in combination with checking for generator support of folders.
* VS: Provide an option to use x64 host toolsBrad King2016-10-141-0/+13
| | | | | | | | | | Visual Studio provides toolchains that are themselves built for 32-bit or 64-bit host architectures. By default it uses the 32-bit tools, but it can be told to prefer the 64-bit tools on 64-bit hosts. Extend the `CMAKE_GENERATOR_TOOLSET` specification to provide a way to request use of the 64-bit host tools. Closes: #15622
* Xcode: Inline ConvertToRelativePath callsStephen Kelly2016-10-061-3/+3
| | | | | Avoid violations of Interface Segregation Principle. These two calls now simply call different methods.
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Xcode: Add option to set Swift language versionBrad King2016-09-261-1/+7
| | | | | | | | | | Create a new CMAKE_Swift_LANGUAGE_VERSION variable to specify the SWIFT_VERSION attribute in a generated Xcode project. Ideally this would be a `<LANG>_STANDARD` property but since Swift support is very minimal we should reserve that property for more complete treatment later. Issue: #16326
* Xcode: Port rudimentary Swift support to Xcode 8Brad King2016-09-231-0/+3
| | | | | | The `.pbxproj` file must now specify a `SWIFT_VERSION` value. Set it to the legacy value of "2.3" for now. Later this can be made configurable (e.g. to "3.0").
* Xcode: Remove unused memberStephen Kelly2016-09-191-3/+0
| | | | | It is unused since commit v3.4.0-rc1~492^2~3 (Remove CMAKE_USE_RELATIVE_PATHS variable., 2015-06-01).
* 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.