summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* OS X: Make sure RPATHs are unique to avoid possible corruption.Clinton Stimpson2014-02-031-3/+37
| | | | | | | | When using link_directories() and including CMAKE_CFG_INTDIR, one can end up with duplicate RPATHs in the binary which install_name_tool cannot fix without corrupting the binary. Also, the cmake_install.cmake file has been fixed to correctly handle these generator specific variables.
* cmMakefile: Make FindSourceGroup const.Stephen Kelly2014-01-221-4/+4
| | | | | Return a pointer instead of a reference. This allows making the accessor const with the least impact.
* Xcode: Fix storyboard viewRuslan Baratov2014-01-161-3/+9
| | | | | | | Images and xib files must have 'lastKnownFileType' attribute to be displayed correctly. If xib file has attribute 'explicitFileType' it is displayed as raw xml. If static image has attribute 'explicitFileType' it is displayed as question mark on storyboard.
* Xcode: Remove dead codeRuslan Baratov2014-01-161-4/+0
| | | | | Variable 'ext' already checked for equality to "xib" so remove the branch that will never be executed.
* cmTarget: Make GetSourceFiles populate an out-vector parameter.Stephen Kelly2014-01-091-4/+8
| | | | | In a future patch, this will also be populated with extra sources from the linked dependencies.
* cmGeneratorTarget: Add methods to access source file groups.Stephen Kelly2014-01-091-3/+5
| | | | | These methods and others will be able to get a config parameter later to implement the INTERFACE_SOURCES feature.
* Xcode: Fix storyboard viewRuslan Baratov2014-01-071-1/+4
| | | | | | | | | | Since commit 56831461 (Xcode: Use explicitFileType to mark source types, 2013-04-16) the Xcode generator prefers to use explicitFileType to tell Xcode about each source file type. This works better than lastKnownFileType for some file types, but not for "file.storyboard". If storyboard file has attribute 'explicitFileType' it is displayed incorrectly (as raw xml). Switch it back to 'lastKnownFileType'.
* cmTarget: Remove some of the INTERFACE_LIBRARY whitelisted properties.Stephen Kelly2014-01-061-1/+2
| | | | | | | | | | | There is no need to allow EXCLUDE_* properties, because an INTERFACE_LIBRARY has no direct build output. IMPORTED_LINK_INTERFACE_LANGUAGES are relevant only to static libraries. VERSION is relevant only to the filename of direct build outputs, which INTERFACE_LIBRARY does not have.
* Constify handling of target dependencies.Stephen Kelly2013-12-111-1/+1
|
* Xcode: Fix duplicate target subfolders (#14133)Stephan Tolksdorf2013-12-021-7/+7
| | | | | | | Fix logic introduced by commit eeeeca10 (XCode: Support target folders on XCode, 2011-02-20) to avoid duplicate subfolders. The problem was that no slash was appended to the curr_tgt_folder string on the it != this->TargetGroup.end() path.
* Teach GenerateBuildCommand to find its own make programBrad King2013-11-181-7/+3
| | | | | | | | Add a cmGlobalGenerator::SelectMakeProgram method to select a caller-provided make program, the CMAKE_MAKE_PROGRAM cache entry, or a generator-provided default. Call it from all implementations of the GenerateBuildCommand method with the corresponding generator's default, if any.
* cmGlobalGenerator: Cleanup GenerateBuildCommand APIBrad King2013-11-181-37/+29
| | | | | | | | | All cmGlobalGenerator::GenerateBuildCommand call sites that need to produce a string now generate "cmake --build" commands. The remaining call sites immediately pass the result to cmSystemTools::RunSingleCommand. Avoid the intermediate string and argument parsing by directly producing a vector of strings. Also drop the ignoreErrors argument because no call sites remain that use it.
* Xcode: Generate 'folder' source type for directories (#14498)Michael Priestman2013-10-211-5/+16
| | | | | | Teach the Xcode generator to set 'lastKnownFileType' to be 'folder' for file references that are directories. If you set 'explicitFileType' to 'sourcecode', then Xcode cannot browse the directory.
* Drop the 'Full' field from cmDocumentationEntryBrad King2013-10-161-1/+0
| | | | | We need only 'Brief' for usage documentation. We no longer have builtin 'Full' documentation, which is now in Help/*/*.rst files.
* Add the INTERFACE_LIBRARY target type.Stephen Kelly2013-10-071-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | This target type only contains INTERFACE_* properties, so it can be used as a structural node. The target-specific commands enforce that they may only be used with the INTERFACE keyword when used with INTERFACE_LIBRARY targets. The old-style target properties matching LINK_INTERFACE_LIBRARIES_<CONFIG> are always ignored for this target type. The name of the INTERFACE_LIBRARY must match a validity generator expression. The validity is similar to that of an ALIAS target, but with the additional restriction that it may not contain double colons. Double colons will carry the meaning of IMPORTED or ALIAS targets in CMake 2.8.13. An ALIAS target may be created for an INTERFACE library. At this point it can not be exported and does not appear in the buildsystem and project files are not created for them. That may be added as a feature in a later commit. The generators need some changes to handle the INTERFACE_LIBRARY targets returned by cmComputeLinkInterface::GetItems. The Ninja generator does not use that API, so it doesn't require changes related to that.
* Xcode: Fix OBJECT library support for Xcode 5 (#14254)Brad King2013-10-021-19/+40
| | | | | | | | | | | | | | | Xcode 2.1 through 4 supported $(CURRENT_ARCH) in a PBXFileReference 'path' value used in the "Link Binary with Libraries" build phase. CMake uses this to reference object file locations on link lines to bring in OBJECT library content. However, Xcode 5 now evaluates the $(CURRENT_ARCH) reference in this context as "undefined_arch" so the wrong path is given to the linker. There seems to be no alternative way to produce an architecture-specific value in a PBXFileReference. Fortunately Xcode 5 now also handles link dependencies for paths linked through OTHER_LDFLAGS. For Xcode >= 5, move the OBJECT library object file references from the link build phase to OTHER_LDFLAGS. We can still show the object files in the source group listing in either case.
* Xcode: Drop XCODE_DEPEND_HELPER for Xcode >= 5Brad King2013-10-021-12/+19
| | | | | | Xcode 5.0 now computes dependencies from files linked through OTHER_LDFLAGS, so we no longer need the XCODE_DEPEND_HELPER hack to re-link dependents when targets change.
* Unify the way the flags of a static library are readPatrick Gansterer2013-07-311-15/+19
| | | | | Introduce cmLocalGenerator::GetStaticLibraryFlags() to have a central function for getting the linker flags for a given target.
* Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.Stephen Kelly2013-07-111-2/+3
| | | | Refactor to create AddCompileDefinitions.
* 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.