summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Refactor target COMPILE_OPTIONS and COMPILE_FLAGS handlingBrad King2013-06-271-6/+5
| | | | | | | | | | | | Replace the cmLocalGenerator GetCompileOptions method with an AddCompileOptions method since all call sites of the former simply append the result to a flags string anyway. Add a "lang" argument to AddCompileOptions and move the CMAKE_<LANG>_FLAGS_REGEX filter into it. Move the call sites in each generator to a location that has both the language and configuration available. In the Makefile generator this also moves the flags from build.make to flags.make where they belong.
* Add whitespace after colons in error messages.Stephen Kelly2013-06-211-1/+1
|
* Merge topic 'xcode-framework-paths'Brad King2013-06-051-11/+7
|\ | | | | | | | | 21a0bea Xcode: Fix framework search paths in STATIC library targets (#14191)
| * Xcode: Fix framework search paths in STATIC library targets (#14191)Brad King2013-06-041-11/+7
| | | | | | | | | | | | | | | | | | | | In commit 2bc22bda (Xcode: Add frameworks search paths from link dependeny closure, 2012-12-07) we made framework search paths from the link closure conditional on target type, skipping it on STATIC and OBJECT library targets that do not actually link. However, the framework search paths also influence the compile lines (-F options) so we need them for all target types. The Makefile generator already does this, as did the Xcode generator prior to the above-mentioned commit.
* | Merge topic 'VISIBILITY_PRESET-property'Brad King2013-06-051-0/+3
|\ \ | | | | | | | | | | | | | | | cd1fa53 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property. 0e9f4bc Introduce target property <LANG>_VISIBILITY_PRESET
| * | Introduce target property <LANG>_VISIBILITY_PRESETStephen Kelly2013-06-021-0/+3
| | | | | | | | | | | | | | | | | | This is initialized by CMAKE_<LANG>_VISIBILITY_PRESET. The target property is used as the operand to the -fvisibility= compile option with GNU compilers and clang.
* | | Merge topic 'cfbundle-location'Brad King2013-06-041-7/+1
|\ \ \ | | | | | | | | | | | | | | | | 483e208 OS X: Fix getting of CFBundle LOCATION property.
| * | | OS X: Fix getting of CFBundle LOCATION property.Clinton Stimpson2013-06-031-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes bug #13797. The kinds of changes applied in 373faae5 for frameworks are now applied to CFBundle. The prefix and suffix for CFBundles are now handled in cmTarget::GetFullNameInternal.
* | | | Merge topic 'target-COMPILE_OPTIONS'Brad King2013-06-031-2/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 24466f2 Add target_compile_options command. 80ca9c4 Add COMPILE_OPTIONS target property. 7cb2308 cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries 47f80d9 cmTarget: Rename struct to be more re-usable. 1319a14 Add <LANG>_COMPILER_ID generator expressions. 3549676 Add cmLocalGenerator::GetCompileOptions. f3ad863 VS6: Rename some variables to correspond to config values.
| * | | | Add cmLocalGenerator::GetCompileOptions.Stephen Kelly2013-06-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it only adds the contents of the COMPILE_FLAGS target property, but it can be extended to handle a new COMPILE_OPTIONS generator expression enabled property.
* | | | | Merge topic 'rpath-on-mac'Brad King2013-06-031-0/+23
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc1d025 OS X: Add test for rpaths on Mac. 8576b3f OS X: Add support for @rpath in export files. 00d71bd Xcode: Add rpath support in Xcode generator. 94e7fef OS X: Add RPATH support for Mac.
| * | | | | Xcode: Add rpath support in Xcode generator.Clinton Stimpson2013-06-031-0/+23
| | | | | |
* | | | | | Merge topic 'xcode-shlib-versioning'Brad King2013-06-031-15/+79
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | cbe3f20 Xcode: Add support for shared library versioning
| * | | | | Xcode: Add support for shared library versioningClinton Stimpson2013-05-291-15/+79
| | |/ / / | |/| | | | | | | | | | | | | | | | | | Add a post-build command to shared library targets to create the versioning symbolic links.
* | | | | Merge topic 'framework-refactor'Brad King2013-06-031-2/+7
|\ \ \ \ \ | |/ / / / | | / / / | |/ / / |/| | | 373faae Refactor how bundles and frameworks are supported.
| * | | Refactor how bundles and frameworks are supported.Clinton Stimpson2013-05-231-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make handling of directory separators consistent between non-bundle and bundle code. Remove xcode specific flag from cmTarget when getting install_name. Add (more) consistent convenience functions in cmTarget to get directories inside of bundles and frameworks to add files to. This refactor also fixes bug #12263 where frameworks had the wrong install name when SKIP_BUILD_RPATH. Also make install_name for frameworks consistent between Makefile and Xcode generator.
* | | | Merge topic 'xcode-attributes-variant'Brad King2013-05-231-2/+33
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 332350b Xcode: Support XCODE_ATTRIBUTE_ with [variant=<config>] (#12532)
| * | | | Xcode: Support XCODE_ATTRIBUTE_ with [variant=<config>] (#12532)Cédric OCHS2013-05-221-2/+33
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit c519bb2b (XCode: Also qoute [] as needed to set build-configurations, 2011-04-05) we escape "[]" conditions for XCODE_ATTRIBUTE_ settings. However, we need to handle the "variant" condition with a special case to map it only into the settings for the matching configuration.
* | | | Xcode: Honor CMAKE_(MODULE|SHARED)_LINKER_FLAGS_<CONFIG> (#14161)Matthew Bentham2013-05-221-17/+13
|/ / / | | | | | | | | | | | | | | | Refactor lookup of CMAKE_(EXE|MODULE|SHARED)_LINKER_FLAGS(|_<CONFIG>) variables to ensure all combinations are handled. Use the helper method AddConfigVariableFlags to simplify the implementation.
* | | Merge topic 'xcode-explicitFileType'Brad King2013-05-161-3/+3
|\ \ \ | | | | | | | | | | | | | | | | 5683146 Xcode: Use explicitFileType to mark source types (#14093)
| * | | Xcode: Use explicitFileType to mark source types (#14093)Brad King2013-04-161-3/+3
| |/ / | | | | | | | | | | | | Replace use of lastKnownFileType with explicitFileType to insist that Xcode treat the file as we ask.
* | | Add projectDir parameter to GenerateBuildCommandPetr Kmoch2013-04-121-0/+2
|/ / | | | | | | | | | | | | | | Extend the cmGlobalGenerator::GenerateBuildCommand virtual method signature with a "projectDir" parameter specifying the top of the project build tree for which the build command will be generated. Populate it from call sites in cmGlobalGenerator::Build where a fully-generated build tree should be available.
* | Fix the evaluation of per-config COMPILE_DEFINITIONS (#14037)Stephen Kelly2013-03-251-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The API for retrieving per-config COMPILE_DEFINITIONS has long existed because of the COMPILE_DEFINITIONS_<CONFIG> style properties. Ensure that the provided configuration being generated is also used to evaluate the generator expressions in cmTarget::GetCompileDefinitions. Both the generic COMPILE_DEFINITIONS and the config-specific variant need to be evaluated with the requested configuration. This has the side-effect that the COMPILE_DEFINITIONS does not need to be additionally evaluated with no configuration, so the callers can be cleaned up a bit too.
* | Xcode: Generate recommended artwork setting (#13954)Brad King2013-02-261-0/+2
| | | | | | | | | | Add the COMBINE_HIDPI_IMAGES = YES setting to all Xcode project targets. Otherwise Xcode may ask the user to "Update to recommended settings".
* | Merge topic 'xcode-target-depends'Brad King2013-02-201-41/+19
|\ \ | | | | | | | | | | | | | | | b005140 Xcode: Each target dependency edge needs a unique object (#13935) 781ea6d Xcode: Drop check for circular target dependencies
| * | Xcode: Each target dependency edge needs a unique object (#13935)Brad King2013-02-191-23/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate a unique PBXTargetDependency and PBXContainerItemProxy for every edge in the dependency graph as required by the Xcode format. Xcode only accidentally loads project files that re-use the same PBXTargetDependency for every edge leading to a single target. If one is removed by hand in the IDE then Xcode may crash due to dangling references from the others. Since cmGlobalXCodeGenerator::AddDependTarget is called exactly once for every edge in the target dependency graph we do not need to keep track of which edges have been visited to avoid generating duplicates.
| * | Xcode: Drop check for circular target dependenciesBrad King2013-02-191-18/+0
| | | | | | | | | | | | | | | | | | The modern cmComputeTargetDepends guarantees there will by no cycles. Drop the Xcode generator's check which only handled length 1 and 2 cycles anyway.
* | | Merge topic 'ide-compiler-vars-cleanup'Brad King2013-02-201-2/+0
|\ \ \ | | | | | | | | | | | | | | | | bed6c38 VS,Xcode: Remove unused CMAKE_GENERATOR_* variables
| * | | VS,Xcode: Remove unused CMAKE_GENERATOR_* variablesBrad King2013-02-191-2/+0
| |/ / | | | | | | | | | | | | | | | | | | Since the topic merged to master by commit 34a02846 (Merge topic 'ide-compiler-id', 2012-08-24), these variables are not used by CMakeDetermine*Compiler.cmake for VS and Xcode generators. Drop the code that sets them.
* | | Xcode: Sort source filesAlexander Chehovsky2013-02-181-1/+12
| | | | | | | | | | | | | | | | | | Since Xcode doesn't sort the files on its own, let's sort them in our generator to make navigation easier. Visual Studio, QtCreator, and kdevelop all display files sorted.
* | | Xcode: Fix nested source group handling (#12943)Alexander Chehovsky2013-02-181-1/+1
|/ / | | | | | | | | Teach the code path for nested sources build the group map key in the same way as non-nested code path does.
* | Merge branch 'master' into generator-toolsetBrad King2013-02-071-2/+2
|\ \ | | | | | | | | | We need the latest Tests/CMakeLists.txt so we can refactor all tests.
| * | Move GetCompileDefinitions to cmTarget.Stephen Kelly2013-01-291-2/+2
| | |
* | | Xcode: Implement generator toolset selection (#9831, #13802)Brad King2013-02-071-0/+24
|/ / | | | | | | | | Implement generator toolset selection (cmake -T) for Xcode > 2.0 by adding the GCC_VERSION build setting to project files.
* | XCode generator won't infinitely parse compiler flags (bug #13354).Robert Maynard2013-01-181-5/+10
| | | | | | | | | | | | When parsing the compiler flag list we reduce the search space on each iteration to be the subset of the string we hadn't searched before.
* | Process the INTERFACE_PIC property from linked dependenciesStephen Kelly2013-01-101-2/+4
| | | | | | | | | | | | | | | | | | This allows a dependee to inform a target that it should have its POSITION_INDEPENDENT_CODE property set to ON, or OFF. The value of the POSITION_INDEPENDENT_CODE property, if set, must be consistent with any INTERFACE_POSITION_INDEPENDENT_CODE properties on dependees. Add a test covering the consistency checks on platforms where they run.
* | Make linking APIs aware of 'head' targetStephen Kelly2013-01-081-1/+1
|/ | | | | | | | | | | The 'head' is the dependent target to be linked with the current target. It will be used to evaluate generator expressions with proper handling of mapped configurations and is used as the source target of properties. This requires that memoization is done with a key of a pair of target and config, instead of just config, because now the result also depends on the target. Removing the memoization entirely is not an option because it slows cmake down considerably.
* Xcode: Add frameworks search paths from link dependeny closure (#13397)Brad King2012-12-071-25/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Xcode generator produces FRAMEWORK_SEARCH_PATHS from: (1) Include directories of the form /path/to/Foo.framework become -F/path/to so '#include <Foo/H>' can find H in the framework. (2) Linked frameworks of the form /path/to/Foo.framework become -F/path/to -framework Foo so the linker can find the framework. Originally commit 82bb6fae (add framework support to FIND_FILE, 2005-12-27) added these and used the (then current) old-style link dependency analysis results to get the frameworks. Later a second setting was added by commit 2ed6191f (add initial xcode framework stuff, 2007-05-08) to transform -F/path/to linker options produced by the old link line generation into entries appended to FRAMEWORK_SEARCH_PATHS. Then commit 96fd5909 (Implement linking with paths to library files, 2008-01-22) updated the second setting to directly use the results of full modern link dependency analysis, but forgot to remove the use of old-style link results from the original setting location. The two settings worked together for a while, with the second one appending to the first. Then commit f33a27ab (Generate native Xcode 3.0 and 3.1 projects, 2009-06-29) changed the internal representation format produced by the first setting but did not update the second setting to append to the new representation. As a result, if the first setting added any paths (usually via the old-style link analysis) then the second setting containing the modern link analysis results would not be applied at all. Fix this by removing use of the old-style link analysis results. Replace it using the modern link dependencies and remove the second setting altogether. Now all values for FRAMEWORK_SEARCH_PATHS are collected in one place so no special append logic is needed.
* Revert "Move GetLinkInformation to cmGeneratorTarget"Stephen Kelly2012-11-211-2/+1
| | | | | | | As we can't move all linking related code from cmTarget, it makes sense to reverse the move in some cases. This reverts commit 4f5384e75c6a00d110d3fa3f555a3f6a4f31bb46.
* Make cmGlobalGenerator::GetDocumentation() a static functionPatrick Gansterer2012-11-191-3/+2
| | | | | Making the function static allows us to call it directly, without creating and removing an instance of the generator.
* Allow a GeneratorFactory handling of more than one generatorPatrick Gansterer2012-11-191-2/+4
| | | | | | | | Pass the name of the requested generator to the generator factory, which is now responsible to check if it can create a matching generator for the name. This allows us to add more logic to the factory in a next step, so that not every possible generator needs to get registered explicit in cmake::AddDefaultGenerators().
* Add cmGlobalGeneratorFactory::GetGenerators()Patrick Gansterer2012-11-191-0/+3
| | | | | This allows cmGlobalGeneratorFactory to create more than one type of cmGlobalGenerator in a next step.
* Introduce the abstract class cmGlobalGeneratorFactoryPatrick Gansterer2012-11-191-1/+18
| | | | | This new abstract class allows us move some logic from the cmGlobalGenerator into its own layer in a next step.
* Xcode: Fix ReRunCMake.make path to cmake.check_cache (#13603)Brad King2012-10-241-2/+6
| | | | | | | | The path must be either absolute or relative to the working directory from which the makefile will be loaded. In subprojects this is not relative to the top of the build tree. Reported-by: David Weese <tre@gmx.de>
* Fix config-specific INCLUDE_DIRECTORIES in multi-config generatorsStephen Kelly2012-10-171-1/+2
| | | | | | | | Commit 08cb4fa4 (Process generator expressions in the INCLUDE_DIRECTORIES property, 2012-09-18) contained an incorrect assumption that CMAKE_BUILD_TYPE was set on the makefile for each generated configuration in multi-config generators. Fix that by making the GetIncludeDirectories API depend on the config.
* Merge topic 'generator-expression-target-properties'Brad King2012-09-281-12/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 083de7e Process generator expressions in the COMPILE_DEFINITIONS target property. 08cb4fa Process generator expressions in the INCLUDE_DIRECTORIES property. 0ef091d Early return if there is no target. eb250cd Add a self-reference check for target properties. 7e80747 Add API to check that dependent target properties form a DAG. 239ac84 Add a generator expression for target properties. e028381 Extend the generator expression language with more logic. b8e61d6 Refactor GetCompileDefinitions a bit. 2c2b25b Return a std::string from GetCompileDefinitions. b7e48e0 Add an AppendDefines std::string overload. 9a16087 Convert paths in INCLUDE_DIRECTORIES property to Unix slashes. 4557c8d Don't prepend a path before generator expressions in include_directories. c6abc41 Add include guard for cmGeneratorExpression. 0ff4e3f Port remaining code to GetCompileDefinitions(). f178d53 Fix indentation in the code blocks generator.
| * Return a std::string from GetCompileDefinitions.Stephen Kelly2012-09-211-2/+3
| |
| * Port remaining code to GetCompileDefinitions().Stephen Kelly2012-09-211-12/+4
| |
* | Merge topic 'use-generator-target'David Cole2012-09-251-3/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 879fd35 Revert "Move GenerateTargetManifest to cmGeneratorTarget." 6674583 Fix compiler warning with initialization order. 5285458 Add convenience for getting a cmGeneratorTarget to use. c31f3d9 Add a wrapper for accessing config-specific compile-definitions. d1446ca Append the COMPILE_DEFINITIONS from the Makefile to all targets. 290e92a Move GetIncludeDirectories to cmGeneratorTarget. f9146f6 Port cmLocalGenerator::GetTargetFlags to cmGeneratorTarget. 9facfd1 Move GetCreateRuleVariable to cmGeneratorTarget. 78bfee3 Make cmLocalGenerator::AddArchitectureFlags take a cmGeneratorTarget. 4f5384e Move GetLinkInformation to cmGeneratorTarget 987e12e Move GenerateTargetManifest to cmGeneratorTarget. 14bf778 Store cmGeneratorTargets with the makefile. f428ca2 Add more forwarding API to cmGeneratorTarget.
| * Move GetIncludeDirectories to cmGeneratorTarget.Stephen Kelly2012-09-191-1/+2
| |