Commit Graph

699 Commits

Author SHA1 Message Date
Brad King 9f575a26fd Merge topic 'pdb-genex'
f86850ef Genex: Implement generator expressions for target PDB files.
028ad318 Genex: Simplify filesytem artifact code
2014-07-31 09:17:35 -04:00
Nils Gladitz f86850ef60 Genex: Implement generator expressions for target PDB files. 2014-07-31 09:17:53 -04:00
Brad King 128a0c36ec Merge topic 'remove-link-remnants'
250ad08a Ninja: Remove _COMPILER_LINKER_OPTION_FLAG_ remnants
2014-07-30 09:31:50 -04:00
Nils Gladitz 250ad08a08 Ninja: Remove _COMPILER_LINKER_OPTION_FLAG_ remnants 2014-07-29 21:33:38 +02:00
Brad King 8cd83e0b71 Merge topic 'windows-ce-cleanup'
7079f33d WindowsCE: Drop unused Platform/WindowsCE-MSVC module
05373f7e WindowsCE: Refactor setting of "WINCE"
1acde6b0 MSVC: Use STREQUAL to check for WindowsCE
2014-07-29 08:52:21 -04:00
Brad King 7079f33d6a WindowsCE: Drop unused Platform/WindowsCE-MSVC module
This module was created to mirror Platform/Windows-MSVC.cmake, but this
is not necessary because nothing includes "Platform/<os>-<id>.cmake"
directly.  The Platform/Windows-MSVC module is only a helper for the
Platform/Windows-MSVC-<lang> modules.
2014-07-28 16:21:50 -04:00
Brad King 05373f7ea7 WindowsCE: Refactor setting of "WINCE"
Move it to the Platform/Windows module since it is independent of the
compiler used.  While at it, remove redundant "WIN32" setting from
Platform/Windows-MSVC since Plaform/Windows already sets its.
2014-07-28 16:21:47 -04:00
Brad King 1acde6b003 MSVC: Use STREQUAL to check for WindowsCE
In the Platform/Windows-MSVC module it is not necessary to use MATCHES
because we are comparing against an exact string.
2014-07-28 16:21:45 -04:00
Jeremy Huddleston 5b4faeefe3 OS X: Allow deployment target with "/" sysroot (#15040)
Allow the combination

 -DCMAKE_OSX_DEPLOYMENT_TARGET="10.8" -DCMAKE_OSX_SYSROOT="/"

to work.  Treat the "/" sysroot as targeting the current OS X version.
2014-07-28 09:52:21 -04:00
Brad King c86b99c351 Merge topic 'fix-QCC-compile-flags'
3151024d QNX: Add missing flags for configurations and artifact creation.
2014-07-21 10:36:07 -04:00
Stephen Kelly 3151024d24 QNX: Add missing flags for configurations and artifact creation.
Commit v3.0.0-rc1~111^2 (QNX: Introduce QCC compiler id for that
QNX platform compiler., 2014-01-20) split handling of the QNX QCC
compiler into a separate compiler-id.  That refactoring results in
the QCC compiler not using the CMake-compiler-id "GNU", which means
that the __compiler_gnu macro is no longer executed for it.

Add Compiler/QCC*.cmake modules to define and call the __compiler_qcc
macro and teach it to call __compiler_gnu internally.  Remove the
corresponding pieces from the Platform/QNX*.cmake modules.

It is also necessary to change the language conditional to dereference
the lang macro parameter, which is another bug introduced by the
same commit.  The extra -lang-c++ flag is only necessary when the CXX
compiler is specified as 'qcc' instead of 'QCC' in the toolchain file,
which is why this bug was not noticed before.  The flag is also necessary
in that case when linking in order to find the appropriate standard
libraries.  The flag was not previously added when linking executables,
so linking failed even with CMake 2.8.12 with the lower-case compiler-id.

Co-Author: Brad King <brad.king@kitware.com>
2014-07-17 09:36:18 -04:00
Brad King 23eb0aaef5 Merge topic 'wince-fix-dll-linking'
7e1283e4 MSVC: Fix linking of DLLs on WinCE (#15013)
2014-07-14 09:37:57 -04:00
Brad King 7e1283e48c MSVC: Fix linking of DLLs on WinCE (#15013)
On WinCE we must link both shared libraries and executables with the
/subsystem:windowsce flag.  Teach Platform/Windows-MSVC to pass it
to the linker in both cases.

Suggested-by: Gunnar Roth <gunnar.roth@gmx.de>
2014-07-10 15:10:32 -04:00
Brad King 65624c39e3 VS14: Add Visual Studio 14 generator (#14982)
Call the generator "Visual Studio 14" without any year because this
version of VS does not provide a year in the product name.

Copy cmGlobalVisualStudio12Generator to cmGlobalVisualStudio14Generator
and update version numbers accordingly.  Add the VS14 enumeration value.
Teach the platform module Windows-MSVC to set MSVC14 and document the
variable.  Teach module InstallRequiredSystemLibraries to look for the VS
14 runtime libraries.

Teach tests CheckCompilerRelatedVariables, VSExternalInclude, and
RunCMake.GeneratorToolset to treat VS 14 as they do VS 10, 11, and 12.

Co-Author: Pawel Stopinski <diokhan@go2.pl>
2014-06-25 14:51:19 -04:00
Brad King 42f74df6d4 Add basic Android platform module
Create a Platform/Android module that includes Platform/Linux since
Android is based on Linux.  Provide only the minimal settings needed to
get builds with Android NDK toolchains to work.

Disable use of RPATH since the Android loader ignores it and we cannot
predict the install destination anyway.

Android supports soname but shared library names must end in ".so" and
we cannot represent the versioned names with associated symlinks on all
host operating systems anyway.  However, we do want the SONAME of
library files to be set so that linking to them by path to the library
file produces NEEDED entries with the soname and not the path.  Add a
new CMAKE_PLATFORM_NO_VERSIONED_SONAME setting to tell the
cmTarget::GetLibraryNames method that not to use the VERSION or
SOVERSION target properties in the soname.
2014-06-06 14:03:42 -04:00
Brad King c8c359bb0f Merge topic 'GNUtoMS-vs-12'
668e571d GNUtoMS: Add support for VS 2013 (#14936)
2014-05-28 12:34:32 -04:00
Brad King 668e571d61 GNUtoMS: Add support for VS 2013 (#14936)
Add to the Platform/Windows-GNU module list of VS registry entries those
for VS 2013.  Also add the name "vcvars64.bat" used by VS 10 and above
for 64-bit tools.
2014-05-27 09:24:26 -04:00
Rolf Eike Beer bd32b682f2 OpenBSD: honor the LOCALBASE and X11BASE environment variables 2014-05-21 20:38:55 +02:00
Rolf Eike Beer 956b719087 OpenBSD: disable FIND_LIBRARY_USE_LIB64_PATHS
OpenBSD has no multilib paths.
2014-05-20 18:36:34 +02:00
Ben Boeckel e423f1c05d Windows: Avoid () in environment variable references
Use nested variable evaluation instead.
2014-05-08 13:24:49 -04:00
Brad King 2e095099ec Merge topic 'osx-iframework'
1bed75a5 OS X: Use -iframework for system framework directories
2014-05-07 09:13:37 -04:00
Brad King 3e2e15eead Merge topic 'xcode-sdkroot'
5dfe9b7d Xcode: Find fallback SDK if one matching the OS version doesn't exist.
2014-05-07 09:13:35 -04:00
Mikołaj Siedlarek 1bed75a590 OS X: Use -iframework for system framework directories
Just like -I flag has its -isystem counterpart which marks an include
directory as a system directory and prevents unwanted warnings, on Apple
systems there is -iframework -- a system directory replacement for -F.
Use this flag to implement include_directories(SYSTEM) for frameworks.
2014-05-07 09:04:48 -04:00
Clinton Stimpson 5dfe9b7d5a Xcode: Find fallback SDK if one matching the OS version doesn't exist.
For example if one installs Xcode 4.6 on OS X 10.9, it doesn't contain
a 10.9 SDK, so fallback to the next newest version which, in this case,
happens to be a 10.8 SDK.

This fixes bug #14572.
2014-05-06 09:18:00 -06:00
Brad King bbc358c3fc Merge branch 'master' into osx-init-early
Resolve conflict in Source/cmGlobalGenerator.cxx by integrating
changes from both sides.
2014-04-29 09:36:55 -04:00
Brad King 0200d0a9c4 OS X: Factor a Darwin-Initialize module out of Platform/Darwin
Initialize variables CMAKE_OSX_SYSROOT, CMAKE_OSX_DEPLOYMENT_TARGET, and
CMAKE_OSX_ARCHITECTURES prior to enabling any languages.  This will
allow compiler identification to consider these values.
2014-04-29 09:36:14 -04:00
Brad King ef10fc47ae Merge topic 'implicit-libNN-dirs'
cc57ff5c Drop /lib32 and /lib64 from link directories and RPATH (#14875)
2014-04-17 09:10:53 -04:00
Brad King cc57ff5c49 Drop /lib32 and /lib64 from link directories and RPATH (#14875)
Extend CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES with these paths.  We
already have the equivalents under /usr.  Systems that have these
directories have their dynamic loaders configured already.  Do not allow
them to appear in the RPATH explicitly.
2014-04-16 11:40:48 -04:00
Brad King 028aee1a07 Merge topic 'mingw-archive-no-replace'
39d0ade0 Windows-GNU: Support duplicate object names in large archives (#14874)
2014-04-15 10:22:36 -04:00
Brad King 18aaed77c0 Merge topic 'matches-cleanup'
f21ac16e Replace MATCHES test on numbers with EQUAL test
7eacbaed Replace MATCHES ".+" tests with NOT STREQUAL ""
3a71d34c Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient
b0b4b460 Remove .* expressions from beginning and end of MATCHES regexs
5bd48ac5 Replace string(REGEX REPLACE) with string(REPLACE) where possible
2622bc3f Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
2014-04-15 10:22:34 -04:00
Peter Kümmel b735c8cb43 MinGW: link like on Unix and use compile flags when linking 2014-04-15 10:17:06 -04:00
Brad King 39d0ade07e Windows-GNU: Support duplicate object names in large archives (#14874)
Since commit v2.6.0~388 (Added build rule variables
CMAKE_<LANG>_ARCHIVE_..., 2008-01-29) we use separate "ar cr ..." and
"ar r ..." steps to incrementally add a large list of object files to an
archive.  Since the "r" command replaces existing objects of the same
name in an archive, if multiple objects have the same file name and
appear in separate append steps then one overwrites the other.  Instead,
use "ar cq ..." and "ar q ..." to always append to the archive.

We already remove the archive before creating it so this will not cause
objects to be appended to existing archives on incremental rebuilds.
2014-04-14 14:35:19 -04:00
Rolf Eike Beer b0b4b4602f Remove .* expressions from beginning and end of MATCHES regexs
All these expressions work the same:
  "foo"
  ".*foo.*"
  "^.*foo.*$"

This assumes that the "Intel*" expressions were meant to be "Intel.*".
2014-04-14 18:17:11 +02:00
Rolf Eike Beer 5bd48ac534 Replace string(REGEX REPLACE) with string(REPLACE) where possible
The simple replacement is much faster.
2014-04-14 18:17:05 +02:00
Brad King 61ac6d6401 Merge topic 'revert-Android-platform'
4b31f064 Revert "Modules: Add an Andriod platform file"
2014-04-11 09:13:10 -04:00
Stephen Kelly 4b31f0649c Revert "Modules: Add an Andriod platform file"
This reverts commit 77f06b145d.

It may be re-added in the future when the requirements for that
platform are better known and supported by CMake.
2014-04-10 17:34:41 +02:00
Jiri Malak cb9b1e13e4 Watcom: Use single quote for all file/path items in wlink command
Watcom Linker use single quote if necessary for quoting target name,
libraries names and libraries search path.  Object names were already
fixed.
2014-04-08 13:28:54 -04:00
Jiri Malak 1e22b23c81 Watcom: Cleanup Windows-wcl386 configuration
* Remove Watcom linker caseexact options already defined in system
  definition.
* Use win_dll system for SHARED_LIBRARY and SHARED_MODULE.
* Use explicit target definition -bt=.. option for proper initialization
  of compiler Windows environment (predefined macros)
* Reorganize compiler options to global options and configuration
  specific options
* Use option to optimize out stack checking code for release version
2014-04-02 09:14:50 -04:00
Brad King 382c9ee859 Merge topic 'link-line-quoting'
423009c1 Makefile: Generate single-quoted object lists for Watcom
a863a8fe cmLocalUnixMakefileGenerator3: Re-organize ConvertToQuotedOutputPath
2014-04-01 11:06:08 -04:00
Jiri Malak 423009c17f Makefile: Generate single-quoted object lists for Watcom
Drop the CMAKE_NO_QUOTED_OBJECTS internal variable from the Makefile
generators.  The underlying problem is with the Watcom linker, not with
WMake.  The Watcom linker wants object files to be single-quoted.  Add
<LINK-RULE>_USE_WATCOM_QUOTE platform information variables to tell the
generators to use Watcom-style single quotes for object files on link
lines.

On Windows, Watcom uses the GetCommandLine API to get the original
command-line string and do custom parsing that expects single quotes.
On POSIX systems, Watcom approximates the original command line by
joining all argv[] entries separated by a single space.  Therefore we
need to double-quote the single-quoted arguments so that the shell does
not consume them and they are available for the parser to see.
2014-03-27 13:45:29 -04:00
Adrien Destugues 0cc42b871a Haiku: Fix compiler detection when using distcc
Also remove outdated include directories.
2014-03-21 08:19:10 -04:00
Brad King d8fb08a391 Merge topic 'watcom-updates'
64c2342a Watcom: Enable 'WMake Makefiles' generator on Linux
5d9aa66c Watcom: Introduce OpenWatcom compiler id and fix compiler version
9292d3b8 Watcom: Detect compiler target architecture and platform
fbc883c9 Watcom: Add one blank line to Makefile for better readability
2014-03-20 09:22:30 -04:00
Stephen Kelly 77f06b145d Modules: Add an Andriod platform file
It is much like Linux but has no SONAME or RPATH.
2014-03-20 09:04:31 -04:00
Jiri Malak 5d9aa66c91 Watcom: Introduce OpenWatcom compiler id and fix compiler version
Distinguish "Open Watcom" from old "Watcom" by introducing a new
"OpenWatcom" compiler id.  The __WATCOMC__ format is "VVRP" for Watcom
and "VVRP + 1100" for Open Watcom.
2014-03-17 15:00:59 -04:00
Brad King 489b1c23b9 Windows: Use response files to specify link libraries for GNU tools
Work around the command-line-length limit by using an @linklibs.rsp
response file to pass the flags for link libraries.  This allows
very long lists of libraries to be used in addition to the existing
support for passing object files via response file.

Suggested-by: Peter Keuschnigg <peter.keuschnigg@pmu.ac.at>
2014-03-05 13:07:41 -05:00
Brad King ae215492cf Merge topic 'watcom-wlib-quoting'
5c5be193 Watcom: Fix static library name quoting for wlib
2014-03-03 10:06:21 -05:00
Jiri Malak 5c5be193cf Watcom: Fix static library name quoting for wlib
Use double-quotes instead of single-quotes around the static library
target name in 'wlib' invocations.
2014-02-28 13:34:59 -05:00
Brad King 00503d387e Watcom: Fix creation of DLLs without any exported symbols
Create each DLL import library by passing "option implib=..." to the
linker for its SHARED library.  This works even when there are no
symbols to be exported.  Leave the option out for MODULE libraries
because we do not need an import library for them.  For executables,
retain the separate invocation of wlib because we want an import
library only when the ENABLE_EXPORTS property is set, and in that
case the project should provide symbols.

Suggested-by: J Decker <d3ck0r@gmail.com>
2014-02-27 16:22:28 -05:00
Brad King fba51b096e MSVC: Add properties to configure compiler PDB files (#14762)
Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files
2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY
properties.  Those properties now exclusively handle linker PDB files.
Since STATIC libraries do not link their compiler PDB file becomes more
important.  Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and
"COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB
file location and pass the value to the MSVC /Fd option.
2014-02-26 09:34:38 -05:00
Brad King a3bac644f1 Merge topic 'isystemForIcpc'
cab5ebd4 Intel compiler: add -isystem flag under Linux
2014-02-17 09:59:43 -05:00