summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Xcode: Add rpath support in Xcode generator.Clinton Stimpson2013-06-031-0/+23
|
* 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.
* 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.
* 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
| |
| * Make cmLocalGenerator::AddArchitectureFlags take a cmGeneratorTarget.Stephen Kelly2012-09-191-1/+4
| |
| * Move GetLinkInformation to cmGeneratorTargetStephen Kelly2012-09-191-1/+2
| |
* | Xcode: Remove unused code reading CMAKE_OSX_SYSROOT_DEFAULTBrad King2012-09-211-10/+0
|/ | | | | The condition for entering the block where the value is used can never be true anymore.
* Xcode: Set ASM source language in project file (#13472)Brad King2012-08-151-0/+4
| | | | | | Also teach the Assembler test to build under Xcode. Suggested-by: Tobias Pape <tobiaspape@gmail.com>
* Merge topic 'xcode-select'David Cole2012-08-131-2/+17
|\ | | | | | | | | e88bae7 Xcode: Run xcode-select to find Xcode version file (#13463)
| * Xcode: Run xcode-select to find Xcode version file (#13463)Brad King2012-08-101-2/+17
| | | | | | | | | | | | | | Multiple versions of Xcode may be installed in different locations. Run "xcode-select --print-path" to detect the active Xcode location and parse its Contents/version.plist file. Note that the Xcode.app directory name may vary in developer versions.
* | Xcode: Fix object library references in multi-project trees (#13452)Brad King2012-08-031-1/+1
|/ | | | | | | | | | | | | | | | | In cmGlobalXCodeGenerator::Generate we generate a .xcodeproj for each directory in the tree containing a project() command. First we iteratively use SetGenerationRoot to add "ALL_BUILD" and other targets to each project. This leaves "CurrentProject" set to the last project when we invoke cmGlobalGenerator::Generate, which is not the same as the top-level project if any subdirectories invoke the project() command. When cmGlobalGenerator::Generate reaches CreateGeneratorTargets it constructs cmGeneratorTarget and calls ComputeTargetObjects exactly once per target. In this context the value of CurrentProject is undefined so we cannot pass it to GetObjectsNormalDirectory. Use "$(PROJECT_NAME)" instead so it will adapt automatically to each project. Also teach Tests/ObjectLibrary to cover this case.
* Refactor generation of shared library flagsStephen Kelly2012-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | CMAKE_SHARED_LIBRARY_<lang>_FLAGS has flags on various platforms for a variety of purposes that are correlated with shared libraries but not exclusive to them. Refactor generation of these flags to use new purpose-specific platform variables CMAKE_<lang>_COMPILE_OPTIONS_DLL CMAKE_<lang>_COMPILE_OPTIONS_PIC CMAKE_<lang>_COMPILE_OPTIONS_PIE Activate the DLL flags specifically for shared libraries. Add a new POSITION_INDEPENDENT_CODE target property to activate PIC/PIE flags, and default to true for shared libraries to preserve default behavior. Initialize the new property from CMAKE_POSITION_INDEPENDENT_CODE to allow easy global configuration in projects. Although the default behavior is unchanged by this refactoring, the new approach ignores CMAKE_SHARED_LIBRARY_<lang>_FLAGS completely. We must leave it set in case projects reference the value. Furthermore, if a project modifies CMAKE_SHARED_LIBRARY_<lang>_FLAGS it expects the new value to be used. Add policy CMP0018 to handle compatibility with projects that modify this platform variable. Add a PositionIndependentCode test on platforms where we can get meaningful results.
* Xcode: Recognize storyboard source files (#13214)Jan Schaffmeister2012-05-141-0/+4
|
* Xcode: Pay attention to custom configuration types (#13082)David Cole2012-04-021-1/+6
| | | | | | | | Previously, we were setting the default configuration for a generated Xcode project to the hard-coded string "Debug" even in cases where users customized their configuration types such that the list did not contain "Debug". Now, we use the first string listed in CMAKE_CONFIGURATION_TYPES as the default config for generated Xcode projects.
* Merge topic 'object-library'David Cole2012-03-201-66/+267
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 93d5509 Merge branch 'ninja-object-library' into object-library 821037c Merge branch 'xcode-object-library' into object-library eb24c99 Merge branch 'object-library' into xcode-object-library 63d1be8 Xcode: Honor $<TARGET_OBJECTS:...> source expressions 020ba38 Merge branch 'object-library' into xcode-object-library e8ea615 Build object library targets in Xcode 8045e17 Pre-compute object file names before Xcode generation 247a132 Allow txt files as ExtraSources in object library targets b063599 Add a default source group for object files. be01f3b Xcode: Re-factor some existing methods into "FromPath" variants 2693dbe Merge branch 'object-library' into ninja-object-library 51997cb Ninja: Honor $<TARGET_OBJECTS:...> source expressions 23ec258 Merge branch 'object-library' into ninja-object-library 61124de Build object library targets in Ninja f5b06cd Pre-compute object file names before Ninja generation a2514f1 Simplify cmNinjaTargetGenerator using cmGeneratorTarget ...
| * Xcode: Honor $<TARGET_OBJECTS:...> source expressionsDavid Cole2012-03-191-0/+33
| | | | | | | | | | Add objects from object libraries referenced using this syntax to the set of objects linked in a target.
| * Build object library targets in XcodeDavid Cole2012-03-191-8/+52
| | | | | | | | | | | | | | | | Treat OBJECT libraries as STATIC libraries. The Xcode project file format provides no way to avoid running the libtool so hide the resulting .a away next to the object files as it should never be referenced. The object files will be left behind for reference by other targets later.
| * Pre-compute object file names before Xcode generationDavid Cole2012-03-191-0/+49
| |
| * Xcode: Re-factor some existing methods into "FromPath" variantsDavid Cole2012-03-161-48/+110
| | | | | | | | | | ...to avoid depending on cmSourceFile instances. Prep work for supporting OBJECT_LIBRARY in the Xcode generator.
| * Xcode: Re-factor code into GetObjectsNormalDirectory methodDavid Cole2012-03-161-9/+22
| | | | | | | | | | ...in preparation for calling it from more than one location. Required to support OBJECT_LIBRARY targets in Xcode.
| * Rename/constify build-time config placeholder lookupBrad King2012-03-091-1/+1
| | | | | | | | | | | | Rename cmGlobalGenerator::GetCMakeCFG{InitDirectory => IntDir} to have a shorter name without a typo. Add a 'const' qualifier since the method is only for lookup and never needs to modify anything.
| * Merge branch 'cleanup-object-file-names' into object-libraryBrad King2012-03-091-33/+0
| |\
* | \ Merge topic 'fix-12621-xcode43'Brad King2012-03-191-2/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | 0f4dfa6 CPack: Use real path to PackageMaker to find its version file (#12621) 4693cf8 Xcode: Detect new default locations of Xcode 4.3 bits and pieces (#12621)