Commit Graph

122 Commits

Author SHA1 Message Date
Brad King 029ab3102e Constify XCode generator getters to match cmGlobalGenerator
Commit 8a0eb78f (Constify many getters of cmGlobalGenerator, 2011-03-26)
added const qualifiers to many cmGlobalGenerator methods.  Fix the
signature of the virtual function overrides in cmGlobalXCodeGenerator to
match.
2011-10-07 08:22:05 -04:00
David Cole 1834f232a7 Xcode: Save object id values in CMakeCache.txt (#11690)
For project and target objects, save their ids in CMakeCache.txt.

Hopefully, that will be enough to allow user settings to be saved
across multiple CMake generate operations. Other object types may
also need their ids saved: if so, more code than this commit
will be necessary...
2011-08-24 18:11:32 -04:00
Brad King 98dc13e513 Merge topic 'xcode-source_groups-folders-issue-10039'
f09ba0f Fix style errors added by parent and grandparent
eeeeca1 XCode: Support target folders on XCode.
59ed84e Xcode: Support multiple level nesting of XCode folders (#10039)
d0a403f CMake: Move tokenize to cmSystemTools
2011-06-08 15:44:44 -04:00
Johan Björk 59ed84e032 Xcode: Support multiple level nesting of XCode folders (#10039) 2011-06-07 10:21:49 -04:00
Brad King 44cdae921d Xcode: Fix parallel build depends with universal binaries (#11844)
A post-build phase of each target invokes the XCODE_DEPEND_HELPER.make
file to erase any targets that link to it.  Narrow the set of targets
tested by each post-build phase to those that depend on the newly
completed target.  This avoids removing files from partially built
unrelated targets that happen to be building in parallel.
2011-06-06 17:44:11 -04:00
Brad King 809ef3086d Xcode: Make generation depend on all input directories
Previously the Xcode generator would rerun CMake only if input file
dependencies in the top-level directory changed.  Teach it to depend on
input files from all directories.  Other generators already do this.

Reported-by: Johan Björk <phb@spotify.com>
2011-01-13 12:07:23 -05:00
David Cole 0b38bb4c53 Fix issue #2336 - honor the -C arg to ctest. Honor it for all stages of running -D dashboards from the command line and running ctest_configure, ctest_build and ctest_test commands in -S scripts. Also, allow a script to change it by setting the CTEST_CONFIGURATION_TYPE variable: allows for multiple configuration build/test cycles within one script. Add a new signature for the cmake command build_command that accepts CONFIGURATION as one argument. The original build_command signature is still there, but now marked as deprecated in the documentation. Of course... also add CTestConfig tests to verify that -C is honored for -D dashboards and -S scripts. 2009-12-04 12:09:01 -05:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King e55bbab88b Teach Xcode generator to set XCODE_VERSION
We set the variable 'XCODE_VERSION' in the CMake language to the Xcode
version string (e.g. "3.1.2").  Platform config files may use it later.
2009-09-23 08:48:39 -04:00
Brad King 61495cdaae Fix Xcode project references to the source tree
Xcode project source file references need to always be relative to the
top of the source tree in order for SCM and debug symbols to work right.
We must even allow the relative paths to cross outside of the top source
or build directories.

For subdirectory project() command Xcode projects we use the source
directory containing the project() command as the top.  Relative paths
are generated accordingly for each subproject.

See issue #8481.
2009-09-22 16:18:31 -04:00
Brad King d4cfb77ffe Remove cmGlobalXCode21Generator subclass
This subclass of cmGlobalXCodeGenerator only provided two virtual method
overrides, and it made construction of the Xcode generator instance
complicated.  This commit removes it and replaces the virtual methods
with tests of the Xcode version.  The change removes duplicate code.
2009-09-19 12:00:09 -04:00
Brad King 76eb733f3a Separate Xcode flag escaping code from defines
Generalize the core Xcode generator preprocessor flag escaping code to
be useful for escaping all flags.
2009-07-29 16:40:07 -04:00
Brad King a232dbe8d2 BUG: Fix Xcode linker language
Xcode does not seem to support direct requests for using the linker for
a particular language.  It always infers the linker using the languages
in the source files.  When no user source files compile with target's
linker language we add one to help Xcode pick the linker.

A typical use case is when a C executable links to a C++ archive.  The
executable has no C++ source files but we need to use the C++ linker.
2009-07-10 16:51:44 -04:00
Brad King 2247153110 BUG: Do not generate "global" Xcode config
Xcode 2.0 and below supported only one configuration, but 2.1 and above
support multiple configurations.  In projects for the latter version we
have been generating a "global" set of buildSettings for each target in
addition to the per-configuration settings.  These global settings are
not used by Xcode 2.1 and above, so we should not generate them.
2009-07-02 14:14:03 -04:00
Brad King 6bd9d5ab8a ENH: Simplify Xcode CreateBuildSettings method
The cmGlobalXCodeGenerator::CreateBuildSettings had the three arguments
productName, productType, and fileType that returned information used by only
one of the call sites.  This change refactors that information into separate
methods named accordingly.
2009-07-02 14:13:46 -04:00
Brad King f33a27abd6 ENH: Generate native Xcode 3.0 and 3.1 projects
CMake previously generated Xcode project files labeled as 2.4-compatible
by recent versions of Xcode (3.0 and 3.1).  It is better to generate
native Xcode 3.0 and 3.1 projects.  In particular, this can improve
build times by using the "Build independent targets in parallel"
feature.

Patch from Doug Gregor.  See issue #9216.
2009-06-29 13:02:05 -04:00
Brad King 921f3a1ac2 BUG: Do not automatically set HEADER_FILE_ONLY
Long ago the native build system generators needed HEADER_FILE_ONLY to
be set on header files to stop them from building.  The modern
generators correctly handle headers without the help of this property.
This removes automatic setting of the property so that it can be used
reliably as an indicator of project author intention.  It fixes VS IDE
project files to show header files normally instead of excluded (broken
by the fix for issue #7845).
2009-03-16 14:30:24 -04:00
Brad King 10dec2eac8 STYLE: Fix line-too-long 2008-10-10 08:11:08 -04:00
Brad King 576167d381 ENH: Put custom target sources in Xcode projects
Source files in custom targets are now placed in the Xcode project for
convenient editing.  See issue #5848.
2008-10-09 11:01:48 -04:00
Brad King 1342965b05 BUG: Fix Xcode reference to Info.plist resource
- Generated Xcode projects for application bundles list the
    CMake-generated Info.plist input file as a resource.
  - The location of the input file was moved by a previous commit,
    but the reference to it as a resource file was not updated.
  - This change moves the file to CMakeFiles/<tgt>.dir/Info.plist
    to give it a more intuitive name in the Xcode project.
  - We also update the reference to point at the correct location.
  - See bug #7277.
2008-07-03 13:28:54 -04:00
Brad King 8262ccfd4e ENH: Create COMPILE_DEFINITIONS property for targets and source files. Create <config>_COMPILE_DEFINITIONS property as per-configuration version. Add Preprocess test to test the feature. Document limitations on Xcode and VS6 generators. 2008-01-14 09:20:58 -05:00
David Cole fa61182de8 ENH: Improvements to the Xcode generator. Build frameworks using native Copy Headers and Copy Bundle Resources phases. Fix bugs: eliminate folders with no names, ensure source files show up in multiple targets, remove empty utility targets from Sources subtrees, ensure that fileRefs only show up once in each grouping folder. 2007-08-14 11:45:15 -04:00
Alexander Neundorf 43de8c8628 ENH: add OPTIONAL keyword to ENABLE_LANGUAGE, so it will be possible to do
something like this:

ENABLE_LANGUAGE(ASM-ATT)
IF(CMAKE_ASM-ATT_COMPILER_WORKS)
  ... do assembler stufff
ELSE(CMAKE_ASM-ATT_COMPILER_WORKS)
  ... fallback to generic C/C++
ENDIF(CMAKE_ASM-ATT_COMPILER_WORKS)

Alex
2007-06-28 09:09:26 -04:00
Bill Hoffman d0f12061c3 ENH: add copy header stuff 2007-05-24 17:06:32 -04:00
Brad King 6c421971b9 BUG: Fixed generation of XCODE_DEPEND_HELPER.make into proper directory. Cleaned up duplicate code created by recent changes. 2007-05-11 13:52:33 -04:00
Alexander Neundorf 362f81981e STYLE: fix line length
Alex
2007-05-10 11:38:23 -04:00
Alexander Neundorf 7f11536704 ENH: now target names can be used in add_custom_command() and
add_custom_target() as COMMAND, and cmake will recognize them and replace
them with the actual output path of these executables. Also the dependency
will be added automatically. Test included.
ENH: moved TraceVSDependencies() to the end of GlobalGenerator::Configure(),
so it is done now in one central place

Alex
2007-05-09 08:25:45 -04:00
Brad King 789a0f8359 ENH: Removed unused variables LibraryOutputPath and ExecutableOutputPath. Each target is asked for its own output directory. This is a step towards bug#2240. 2007-03-08 15:24:01 -05:00
Bill Hoffman ca0230a33e ENH: check in initial conv library stuff 2007-02-16 16:12:17 -05:00
Brad King 87d4d0e039 BUG: cmGlobalGenerator::Build should not always use the /fast target name because dependency checking is often required. It now takes an argument specifying whether to use the /fast target name, and the argument is currently only true for try-compiles. 2006-06-01 15:51:24 -04:00
Bill Hoffman 0883dee7f0 ENH: fix rebuild problem with xcode and universal binaries 2006-05-16 09:54:49 -04:00
Ken Martin 80f71359c1 STYLE: fix line length 2006-05-11 15:39:46 -04:00
Ken Martin 3d96e52261 STYLE: some m_ to this-> cleanup 2006-03-15 11:02:08 -05:00
Bill Hoffman 89e5fc63fe STYLE: fix line lengths 2006-03-10 13:54:57 -05:00
Brad King 93c95f1cc5 BUG: Fixed installation of MacOSX Bundle executables and the corresponding install_name remapping support. Extended the BundleTest test to check that this all works. Part of these fixes required changing the signature of AppendDirectoryForConfig in all generators. It now accepts prefix and suffix strings to deal with whether leading or trailing slashes should be included with the configuration subdirectory. 2006-03-03 12:58:48 -05:00
Andy Cedilnik 07260a6f27 ENH: Cleanup global targets even more and potentially fix Xcode 2006-03-01 08:28:39 -05:00
Andy Cedilnik c4156b4531 COMP: Even more global target fixes 2006-02-24 17:35:35 -05:00
Brad King 586a9427d3 ENH: Created target property INSTALL_NAME_DIR initalized by CMAKE_INSTALL_NAME_DIR specifying the directory portion of the OSX install_name field in shared libraries. This is the OSX equivalent of RPATH. 2006-02-24 13:13:14 -05:00
Brad King 131c4a3a17 COMP: Added missing method decl to header. 2006-02-03 12:03:57 -05:00
Bill Hoffman 07ef88c985 ENH: add COMPILE_FLAGS to targets 2006-01-25 08:38:06 -05:00
Brad King 22c62c9e65 BUG: Sweeping changes to cleanup computation of target names. This should
fix many bugs related to target names being computed inconsistently.

- Centralized computation of a target's file name to a method in
  cmTarget.  Now that global knowledge is always available the
  *_CMAKE_PATH cache variables are no longer needed.

- Centralized computation of link library command lines and link
  directory search order.

- Moved computation of link directories needed to link CMake targets
  to be after evaluation of linking dependencies.

This also removed alot of duplicate code in which each version had its
own bugs.

This commit is surrounded by the tags

  CMake-TargetNameCentralization1-pre

and

  CMake-TargetNameCentralization1-post

so make the large set of changes easy to identify.
2006-01-13 18:18:32 -05:00
Bill Hoffman 391d3ed631 ENH: make sure depend helper actually works, if a depend library gets updated, then the target needs to be removed, and the CONFIGURATION directory needs to be used 2005-12-21 15:45:55 -05:00
Andy Cedilnik 782bef7374 ENH: Add a way for the generated command to include extra flags. This is useful for CTest (or try compile) to add -j2 2005-12-01 11:41:00 -05:00
Bill Hoffman 47622dde01 ENH: fixes for Xcode 2.2 2005-11-18 14:12:09 -05:00
Andy Cedilnik 93ee345b41 BUG: fix xcode 15 (really bill Hoffman) 2005-09-08 14:35:37 -04:00
Bill Hoffman 6b4c142c7d ENH: add real support for Xcode21 2005-09-02 16:29:32 -04:00
Bill Hoffman a13713818c ENH: if Xcode21 is installed then create 21 compatible project files 2005-07-19 16:40:44 -04:00
Bill Hoffman 6688a725a3 ENH: fix bug 1960 2005-07-15 15:20:52 -04:00
Andy Cedilnik 61d0a75d11 ENH: Add option to ignore errors. Only works on make 2005-04-29 11:49:18 -04:00
Andy Cedilnik 064ca3834b ENH: Start working on command that will abstract generating of build command 2005-04-28 18:34:58 -04:00
Bill Hoffman 1568f73825 ENH: add source groups xcode 2005-03-17 15:35:44 -05:00
Andy Cedilnik 95d6107da2 FIX: fix crashing test SubDir for xcode 2005-03-11 10:53:45 -05:00
Bill Hoffman b7ef8149e8 ENH: add re run cmake if inputs change 2005-02-28 15:07:13 -05:00
Bill Hoffman d680e51777 ENH: fix relative paths in xcode 2005-02-24 17:46:49 -05:00
Andy Cedilnik 8b54b7a683 ENH: fix spaces in paths problems 2005-02-24 15:34:14 -05:00
Ken Martin 4d30cb309c ENH: ctest now uses CMake global generator to do the build part of build-and-test 2005-02-22 09:12:10 -05:00
Bill Hoffman 785b0dc012 ENH: all tests are passing for XCode 2005-02-18 13:32:51 -05:00
Bill Hoffman e930043477 ENH: more tests are passing, relative paths, and external objects are the ones left now 2005-02-17 17:54:14 -05:00
Bill Hoffman cb73410ccb ENH: more tests are passing 2005-02-16 16:35:32 -05:00
Bill Hoffman f508fc9839 ENH: add custom commands, still failing a bunch of tests 2005-02-15 17:25:40 -05:00
Bill Hoffman 34e7e36cae ENH: getting closer 2005-02-14 16:46:32 -05:00
Bill Hoffman ef5db04e24 more work on linking flags 2005-02-11 14:25:05 -05:00
Bill Hoffman f6f765e86f ENH: add link library stuff 2005-02-08 17:12:38 -05:00
Bill Hoffman fd0f29e6f4 ENH: depends work between targets 2005-02-03 17:42:55 -05:00
Bill Hoffman 68c419c780 ENH: getting closer 2005-02-02 17:16:07 -05:00
Bill Hoffman f403811a0c ENH: closer 2005-02-01 17:17:12 -05:00
Bill Hoffman b08e6ecb38 ENH: add trycompile code for xcode 2005-02-01 13:07:42 -05:00
Bill Hoffman 2ca86b868c ENH: move executable xcode stuff to a method 2005-01-28 17:21:35 -05:00
Bill Hoffman 97cd380970 ENH: create mainGroup 2005-01-28 16:00:10 -05:00
Bill Hoffman 97a51d2172 ENH: add more xcode stuff 2005-01-27 16:11:44 -05:00
Bill Hoffman 96daa417cb ENH: add initial non-working XCode stuff 2005-01-25 15:26:57 -05:00
Bill Hoffman e57b17df7e ENH: initial xcode stuff 2005-01-24 17:35:54 -05:00