summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Document and extend the CMAKE_SUPPRESS_REGENERATION variableShane Parris2018-02-231-1/+1
| | | | Fixes: https://gitlab.kitware.com/cmake/cmake/issues/16815
* Xcode: Generate ZERO_CHECK generator target only onceGregor Jasny2018-02-221-1/+5
| | | | | | | | | | | In case CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY has been enabled generate only the root-level ZERO_CHECK target so targets in subdirectories pick up the root generator target of ZERO_CHECK. For the case that CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY is not enabled more investigation and a proper and final fix is still needed. Issue: 14297
* cmGlobalXCodeGenerator: Properly initialize TARGETS variableGregor Jasny2018-02-131-0/+1
| | | | Fixes: #17711
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-1/+2
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* cmGlobalXCodeGenerator: Avoid -Wconditional-uninitialized warningBrad King2018-01-291-1/+1
| | | | | | | Clang incorrectly warns about a case where we initialize a variable inside a condition in such a way that it will always be initialized before we use it. Simply initialize the variable when defining it to silence the warning.
* sourceFile properties: add property INCLUDE_DIRECTORIESMarc Chevrier2018-01-241-0/+10
|
* sourceFile properties: add property COMPILE_OPTIONSMarc Chevrier2018-01-231-0/+5
| | | | | | | Add the support of per-source property COMPILE_OPTIONS, including generator expressions support. Related: #17507
* LocalGenerator: refactoringMarc Chevrier2018-01-231-1/+1
| | | | | Introduce method AppendCompileOptions to support future source file property COMPILE_OPTIONS.
* Genex: Enable COMPILE_LANGUAGE for INCLUDE_DIRECTORIES with VS and XcodeBrad King2018-01-121-2/+4
| | | | | | | | | | | | | | | The set of compile flags used for a target's C and C++ sources is based on the linker language. By default this is always the C++ flags if any C++ sources appear in the target, and otherwise the C flags. Therefore we can define the `COMPILE_LANGUAGE` generator expression in `INCLUDE_DIRECTORIES` to match the selected language. This is not exactly the same as for other generators, but is the best VS and Xcode can do. It is also sufficient for many use cases since the set of include directories for C and C++ is frequently similar but may be distinct from those for other languages like CUDA. Fixes: #17435
* Genex: Enable COMPILE_LANGUAGE for COMPILE_DEFINITIONS with VS and XcodeBrad King2018-01-121-1/+5
| | | | | | | | | | | | | | | The set of compile flags used for a target's C and C++ sources is based on the linker language. By default this is always the C++ flags if any C++ sources appear in the target, and otherwise the C flags. Therefore we can define the `COMPILE_LANGUAGE` generator expression in `COMPILE_DEFINITIONS` to match the selected language. This is not exactly the same as for other generators, but is the best VS and Xcode can do. It is also sufficient for many use cases since the set of definitions for C and C++ is frequently similar but may be distinct from those for other languages like CUDA. Issue: #17435
* Merge topic '17431-iphone-deployment-target'Brad King2018-01-081-3/+24
|\ | | | | | | | | | | | | | | 4017bf40 Darwin: Emit deployment target that matches the SDK 8f4663ff Xcode: rename embedded SDK query function Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1447
| * Darwin: Emit deployment target that matches the SDKGregor Jasny2017-12-221-1/+22
| | | | | | | | Closes: #17431
| * Xcode: rename embedded SDK query functionGregor Jasny2017-12-221-2/+2
| |
* | Various typo fixesLuz Paz2018-01-031-1/+1
|/ | | | Some are user-facing. Others are source comments.
* Genex: Per-source $<COMPILE_LANGUAGE:...> supportMarc Chevrier2017-12-131-12/+17
| | | | Fixes: #17542
* Add generator expression support to per-source COMPILE_DEFINITIONSMarc Chevrier2017-12-051-2/+5
| | | | | | This allows users to specify different genex-based compile definitions for each file in a target. Fixes: #17508
* Refactor per-source generator expression evaluationMarc Chevrier2017-12-041-18/+43
| | | | | | Prepare to add generator expression support to more source properties. Factor out some duplicated code into a helper to avoid further duplication.
* server: return whether or not a target is generator providedJustin Goshi2017-11-201-6/+6
| | | | | | Some generators auto-generate targets. For example VS generators create the ALL_BUILD target. Add the ability to mark targets as generator provided and return that info through cmake-server codemodel.
* cmSourceGroup: Return strings from GetName and GetFullNameBrad King2017-11-151-2/+2
|
* Merge topic 'xcode64'Brad King2017-11-141-2/+2
|\ | | | | | | | | | | | | 23dd8b9e cmGlobalXCodeGenerator: Support XCTest for XCode 6.4 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1471
| * cmGlobalXCodeGenerator: Support XCTest for XCode 6.4Benito Palacios Sanchez2017-11-091-2/+2
| |
* | Xcode: use ranged for loops, cleanup existing for loopsCraig Scott2017-11-101-170/+108
|/ | | | | | | | | | The changes are mostly converting old-style explicit iterator for loops into ranged for statements. A number of for loops had already been changed over, but local variables had been left behind instead of being absorbed into the ranged for statement, so these have been cleaned up too. A couple of minor improvements were made in areas already being updated by the for loop changes to slightly simplify the code or to avoid unnecessary conversions between `const char*` and `std::string`.
* Merge topic '16780-write-single-xcodeproj'Brad King2017-11-011-0/+11
|\ | | | | | | | | | | | | e4e9ce7c Xcode: Add option to generate only topmost project file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1395
| * Xcode: Add option to generate only topmost project fileGregor Jasny2017-10-311-0/+11
| | | | | | | | Closes #16780
* | Xcode: Do not create ZERO_CHECK source groupGregor Jasny2017-10-301-2/+6
|/ | | | Closes #15468
* VS,Xcode: Add CMakeLists.txt sources without mutating targetsBrad King2017-10-181-12/+27
| | | | | | | | | | | | Rather than injecting `CMakeLists.txt` files into each target's `SOURCES`, teach the generators to add them during generation using dedicated code. This avoids mutating the original targets, and avoids polluting `$<TARGET_PROPERTY:foo,SOURCES>` with generator-specific content. This also avoids listing the `CMakeLists.txt` sources in the results of `CMAKE_DEBUG_TARGET_PROPERTIES==SOURCES` so the `RunCMake.TargetSources` test no longer needs a separate case for IDEs.
* cmake: Add --open option for IDE generatorsGregor Jasny2017-10-131-0/+34
|
* VS,Xcode: Fix TARGET_PROPERTY genex in source COMPILE_FLAGS propertyBrad King2017-10-031-1/+2
| | | | | | This already worked in other generators. Also add a test case. Fixes: #17314
* Fix some occurrences of readability-braces-around-statementsMatthias Maennich2017-09-281-14/+22
| | | | | | Fix issues diagnosed by clang-tidy [readability-braces-around-statements] Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Convert some leftover loops to C++11 range-based loopMatthias Maennich2017-09-281-187/+133
| | | | | | Fix issues diagnosed by clang-tidy [modern-loop-convert] Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Fix left-over occurrences of else-after-returnMatthias Maennich2017-09-281-10/+6
| | | | | | | | Fix issues diagnosed by clang-tidy [readability-else-after-return] These were mostly only showing up on OSX. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Fix minor clang-tidy findingsMatthias Maennich2017-09-281-2/+2
| | | | | | | | | | | Fix issues diagnosed by clang-tidy - modernize-use-bool-literals - misc-string-integer-assignment - performance-faster-string-find - readability-redundant-string-cstr - readability-delete-null-pointer Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Fix some occurrences of missing override keywordsMatthias Maennich2017-09-281-3/+6
| | | | | | | | Fix issues diagnosed by clang-tidy [modernize-use-override]. These occurrences are only showing up on OSX. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Fix some occurrences using string by value rather than by const&Matthias Maennich2017-09-281-2/+2
| | | | | | | | Fix issues diagnosed by clang-tidy - performance-unnecessary-value-param - performance-unnecessary-copy-initialization Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Replace several occurrences of empty string comparisons by string::empty()Matthias Maennich2017-09-281-4/+4
| | | | | | Fix issues diagnosed by clang-tidy [readability-container-size-empty] Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-4/+6
| | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Use C++11 nullptr (cont.)Matthias Maennich2017-09-191-32/+33
| | | | | | | Fix remaining occurrences of the issue addressed in commit 5962db4389 (Use C++11 nullptr, 2017-08-22) that are only showing up on macOS. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Use C++11 override instead of CM_OVERRIDEBrad King2017-09-151-5/+5
| | | | | | | | We now require C++11 support including `override`. Drop use of the old compatibility macro. Convert references as follows: git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' | xargs sed -i 's/CM_OVERRIDE/override/g'
* clang-format: format all code as Cpp11Daniel Pfeifer2017-08-301-5/+5
|
* Merge topic 'cxx11-nullptr'Brad King2017-08-251-2/+2
|\ | | | | | | | | | | | | 5962db43 Use C++11 nullptr Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1175
| * Use C++11 nullptrDaniel Pfeifer2017-08-241-2/+2
| |
* | Merge topic 'revert-xcode-9-new-buildsystem-support'Brad King2017-08-251-11/+0
|\ \ | |/ |/| | | | | | | | | 9ecee256 Xcode: Revert addition of "outputPaths" to custom command build phase Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1183
| * Xcode: Revert addition of "outputPaths" to custom command build phaseBrad King2017-08-241-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The change in commit v3.9.0~3^2 (Xcode: Add "outputPaths" to custom command script build phase, 2017-07-13) was meant to support Xcode 9's new build system. However, without matching "inputPaths", Xcode will not re-run the build phase if its outputs have already been generated. This broke the old Xcode build system too. Revert the change for now so at least the old Xcode build system works. Further investigation will be needed to add proper support for Xcode 9's new build system. Fixes: #17178
* | Performance: Fix a few more unnecessary vector copies missed in af3fd6fAaron Orenstein2017-08-181-7/+7
| |
* | Merge topic 'xcode9support'Brad King2017-07-171-0/+11
|\ \ | |/ | | | | | | | | | | 0348383b Xcode: Add "outputPaths" to custom command script build phase Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1054
| * Xcode: Add "outputPaths" to custom command script build phaseHarry Mallon2017-07-141-0/+11
| | | | | | | | | | | | | | This is needed for Xcode 9's "New Build System", whose release notes mention "that output must be declared as an explicit output by the script which generates it" in reference to outputs of custom script build phases.
* | Merge topic 'xcode-cross-sdk-object-libraries'Brad King2017-06-301-4/+4
|\ \ | |/ | | | | | | | | | | c2a6df94 Xcode: Use correct Object Library paths for cross-SDK builds Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1016
| * Xcode: Use correct Object Library paths for cross-SDK buildsGregor Jasny2017-06-291-4/+4
| | | | | | | | | | | | | | | | When calculating Object Library paths take a look at the `XCODE_EMIT_EFFECTIVE_PLATFORM_NAME` property to enable builds with different SDKs. Otherwise a hard-coded architecture could be chosen. Fixes: #16040
* | Xcode: Add XCTest support to schema generatorGregor Jasny2017-06-281-2/+28
|/ | | | Closes: #16961
* IPO: Consider support for each language separatelyBrad King2017-06-141-1/+1
| | | | | | | | | We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and Fortran languages. Do not try to enable support for other languages. Furthermore, each language builds with a different compiler, so check for support by CMake and the compiler for each language independently. Fixes: #16944