Commit Graph

249 Commits

Author SHA1 Message Date
Brad King 8f0a70e5f0 Xcode: Recognize .hh as C++ (#11307) 2010-10-12 09:06:33 -04:00
Ben Boeckel 96a335fd8d XCode generation should fail if lang isn't known 2010-09-30 14:54:20 -04:00
Brad King a2bbe4bef9 Remove trailing whitespace from Xcode generator source
Reverting abandoned topic xcode_source_group_fix_7932 left this source
slightly different due to trailing whitespace removal on some lines.
Remove all trailing whitespace from the file to make it consistent.
2010-09-29 08:38:18 -04:00
Mikkel Krautz 0790af3bf5 Xcode: Avoid trailing space in ARCHS list (#11244)
With CMAKE_OSX_ARCHITECTURE settings such as $(ARCHS_STANDARD_32BIT),
the space inserted by the for loop would confuse Xcode if quoted. In
this particular example, what would be output would be:

  ARCHS = "$(ARCHS_STANDARD_32BIT) ";

The Xcode UI does not recognize this as the built-in "Standards 32-bit"
architecture setting unless the space is removed.
2010-09-20 10:05:33 -04:00
Brad King b06fb16684 No CMAKE_CONFIGURATION_TYPES in single-config generators (#10202)
Factor out reading of CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE
into cmMakefile::GetConfigurations.  Read the former only in
multi-config generators.
2010-09-08 14:54:49 -04:00
Brad King 5c49aa0c86 Xcode: Archives use STATIC_LIBRARY_FLAGS, not LINK_FLAGS
The LINK_FLAGS property is defined only for targets that really link.
These include executables and shared libraries.  For static libraries we
define the STATIC_LIBRARY_FLAGS property.  Teach the Xcode generator to
make this distinction.
2010-05-28 13:23:31 -04:00
David Cole a41345feca Preemptively fix line too long problem before tomorrow's dashboard has a chance to complain about it. 2010-02-12 15:01:37 -05:00
David Cole e3293f8e46 Fix for issue #9125 - invent CMAKE_XCODE_ATTRIBUTE_* variable mechanism. If there are variables that begin with CMAKE_XCODE_ATTRIBUTE_ then add corresponding attributes into the generated Xcode project file. 2010-02-12 14:09:54 -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 10762565e9 Implement LINK_FLAGS_<CONFIG> property on Xcode
See issue #9841.
2009-11-06 08:04:19 -05:00
Brad King 1024ffad82 Fix Xcode <= 2.0 projects with CMAKE_BUILD_TYPE
The dependency-helper makefiles should not have per-configuration names
for Xcode <= 2.0.  Older Xcodes do not support multiple configurations.
2009-10-28 12:18:24 -04:00
Brad King 95038439ea Keep Xcode intermediate files away from output dir
Previously the Xcode generator set SYMROOT to be the target output
directory.  This told Xcode to put the "<proj>.build" directory in the
output path too.

This commit sets SYMROOT, CONFIGURATION_BUILD_DIR, and OBJROOT to put
intermediate files in the build directory corresponding to the source
directory that created each target.  This is more consistent with the VS
IDE generators.  Now only the build output files (actual targets) go to
the target output directory.
2009-10-28 09:12:38 -04:00
Brad King 7b28fbd656 Fix Xcode dylib version default
The commit "Set version info for shared libs on OSX" taught the Xcode
generator to honor VERSION and SOVERSION properties.  However, it also
set version '1.0.0' as the default when no version property is set,
which is inconsistent with the Makefiles generator.  This commit fixes
the default to '0.0.0' for consistency.

See issue #9773.
2009-10-26 10:05:46 -04:00
Brad King 70e98c73e9 Add Xcode file association for Fortran
Intel Fortran on Mac OS X enables Fortran support in Xcode.  This commit
teaches CMake to associate Fortran sources properly in Xcode projects.

See issue #9739.
2009-10-22 10:57:44 -04:00
Brad King 2dc39b8c32 Define per-target OSX_ARCHITECTURES property
The CMAKE_OSX_ARCHITECTURES variable works only as a global setting.
This commit defines target properties

  OSX_ARCHITECTURES
  OSX_ARCHITECTURES_<CONFIG>

to specify OS X architectures on a per-target and per-configuration
basis.  See issue #8725.
2009-10-21 13:00:49 -04:00
Bill Hoffman 45d22b48ab fix Xcode 30 generator 2009-10-07 08:15:14 -04: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 bd33da9fcc Add Xcode SYMROOT setting for custom targets
Xcode 1.5 writes helper scripts at the projectDirPath location for
targets that do not set SYMROOT.  We now add SYMROOT to custom targets
so that all targets set it.  This prevents Xcode 1.5 from touching the
source directory now that we always set projectDirPath.

See issue #8481.
2009-09-23 14:10:08 -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
Bill Hoffman 43499b1ecb Fix Bug #8332, add support for .pch files for Xcode. 2009-09-21 13:18:45 -04:00
Bill Hoffman 441cd9ce0b Fix Bug #8928, add support for .xib files for Xcode. 2009-09-21 13:15:11 -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
Bill Hoffman 311eb30672 Fix the build for version 2.5 of Xcode. 2009-09-18 10:28:28 -04:00
Bill Hoffman ea282284d5 Fix for bug #9466. Change the implementation of OSX arch lists. If no ARCHs are specified by the user then no flags are set. We no longer use CMAKE_OSX_ARCHITECTURES_DEFAULT. 2009-09-17 11:53:02 -04:00
Bill Hoffman 0a8532c3a0 Bug #8356, add support for image types in Xcode files. 2009-09-14 15:20:15 -04:00
Bill Hoffman 324f51cfc8 Fix for bug #8807, add support for CMAKE_EXE_LINKER_FLAGS_(config) to Xcode generator. 2009-09-14 14:59:28 -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 8ab2548d6c Re-order cmGlobalXCodeGenerator implementation
This defines class cmGlobalXCodeGenerator::BuildObjectListOrString early
in the source file so it can be used in more places.
2009-07-29 16:39:45 -04:00
David Cole 5bea9620dc BUG: Additional fix necessary for issue #8481 so that Xcode builds do not write files into the source tree. Also add a test that runs last to check for local modifications in CMake_SOURCE_DIR based on whether 'cvs -q -n up -dP' output is empty. Test fails on dashboard runs when there are local modifications. Test passes on non-dashboard runs with local modifications so that CMake developers may have mods when running the test locally. 2009-07-24 15:58:23 -04:00
David Cole 17d707254d BUG: Fix issue #8481 - generate Xcode projects such that breakpoints may be used from the Xcode debugger without adjusting any settings within the Xcode GUI first... Thanks to Doug Gregor for the patch. 2009-07-22 11:14:23 -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 173448d988 ENH: Pass config to cmTarget::GetLinkerLanguage
This passes the build configuration to most GetLinkerLanguage calls.  In
the future the linker language will account for targets linked in each
configuration.
2009-07-08 13:04:04 -04:00
Brad King 6ef56f7778 ENH: Use fixed header file type mapping for Xcode
This simplifies computation of the lastKnownFileType attribute for
header files in Xcode projects.  We now use a fixed mapping from
header file extension to attribute value.  The value is just a hint to
the Xcode editor, so computing the target linker language is overkill.
2009-07-08 13:03:34 -04:00
Brad King a608467180 ENH: Simpler cmTarget::GetLinkerLanguage signature
This method previously required the global generator to be passed, but
that was left from before cmTarget had its Makefile member.  Now the
global generator can be retrieved automatically, so we can drop the
method argument.
2009-07-07 07:44:12 -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 f952ead857 ENH: Use logical target names in Xcode projects
Previously we named Xcode targets using the output file name from one of the
configurations.  This is not very friendly, especially because it changes with
CMAKE_BUILD_TYPE.  Instead we should use the original logical target names for
the Xcode target names.  This is also consistent with the way the other IDE
generators work.
2009-07-02 14:13:12 -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
Bill Hoffman 756cb547f3 BUG: fix xcode depend issue and add a test for it 2009-02-19 11:51:24 -05:00
David Cole 6e87aa49e6 BUG: Fix issue #8253 - handle xib file extension in Xcode projects so that double clicking on xib files opens them up in Interface Builder. Thanks to baron_roberts for the patch. 2009-02-19 11:20:09 -05:00
Bill Hoffman 65c1511814 BUG: fix depend bug again for Xcode 2009-02-19 10:31:16 -05:00
Bill Hoffman f535cf99ed BUG: use the top level project name for the xcode depend helper directory names 2009-02-18 12:09:20 -05:00
David Cole 1dee719cdc BUG: Fix issue #6195. Add CMAKE_OSX_DEPLOYMENT_TARGET cache variable to specify the target deployment runtime OS version of the built executables on Mac OSX. Thanks to Mike Jackson for the patch. 2009-01-27 10:30:55 -05:00
Brad King acb0e8fb85 BUG: Fix LOCATION property for Mac AppBundles
Previously cmTarget::GetLocation and cmTarget::GetFullPath would return
for Mac AppBundles the top-level bundle directory but without the .app
extension.  We worked around this at the call sites.  This fixes the
methods and removes the work-arounds.  See issue #8406.
2009-01-20 15:49:37 -05: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
Bill Hoffman 600470e5ca BUG: 7763 fix, OPTIMIZATION was not set right. Also fix for BUG 7764, put XCODE_ATTRIBUTES_ last 2008-10-02 13:49:32 -04:00
Brad King 76c5697a16 ENH: Use improved target dependencies for Xcode
In cmGlobalGenerator we use cmComputeTargetDepends to construct a safe,
non-circular set of inter-target dependencies.  This change enables use
of the results by the Xcode generator.  It also removes a lot of old
code and another use of the old-style linking logic.  See issue #7652.
2008-09-15 09:51:47 -04:00
Bill Hoffman 7ac6912d5e BUG: make sure flag is found even with extra spaces at the start 2008-09-11 14:50:38 -04:00