Commit Graph

724 Commits

Author SHA1 Message Date
Brad King ff90f49d18 Merge topic 'fix-msvc-linker-flags-typo'
467f5bcc MSVC: Fix initialization of RelWithDebInfo shared library link flags (#15385)
2015-02-04 12:30:14 -05:00
Brad King 467f5bcc6e MSVC: Fix initialization of RelWithDebInfo shared library link flags (#15385)
Initialize CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT from the value
of CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT rather than the one for
the DEBUG configuration.  This typo has been present since the logic was
first added in  commit 36db45082e (ENH: fix up several problems with new
stuff, 2002-11-11).

Reported-by: Gunnar Roth <gunnar.roth@gmx.de>
2015-02-03 13:41:21 -05:00
Brad King 101a62aacb Merge topic 'revert-feature_record_msvc'
4ce110bb Tests: Revert workaround for COMPILE_FEATURES genex bug
0b7e7e27 Revert topic 'feature_record_msvc'
2015-01-15 09:53:47 -05:00
Brad King 0b7e7e277c Revert topic 'feature_record_msvc'
Revert commits:

 2d738ce3 Help: Add notes for topic 'feature_record_msvc'
 f73718c9 Features: Enable writing of MSVC compiler feature header.
 64c30bdc Features: Record for MSVC C++ 2015 and MSVC C 2010-2015.
 225c0ef8 Features: Record for MSVC 2010-2013.

This topic was merged to master prematurely, so remove it.
2015-01-14 13:35:58 -05:00
Brad King ac5922317f XL: Fix link flags for executables on Linux with XL compilers
Use "-Wl,-export-dynamic" with XL to match the "-rdynamic" flag used
with GNU-like compilers.
2015-01-12 12:59:52 -05:00
Brad King 16d68daccb Merge topic 'linux-XL-fortran'
4729547a XL: Fix link flags for executables on Linux with XL compilers
2015-01-11 14:58:34 -05:00
Robert Maynard 64c30bdc48 Features: Record for MSVC C++ 2015 and MSVC C 2010-2015.
Initializer lists are only properly supported in 2015 and above.
Previous Visual Studio releases said they supported initializer lists
but silently produced bad code.
2015-01-11 16:47:58 +01:00
Stephen Kelly 225c0ef88b Features: Record for MSVC 2010-2013. 2015-01-11 16:47:58 +01:00
Brad King 4729547a5b XL: Fix link flags for executables on Linux with XL compilers
Use "-Wl,-export-dynamic" with XL to match the "-rdynamic" flag used
with GNU-like compilers.
2015-01-10 12:03:19 -05:00
Brad King b1e7fe9e8d Merge branch 'backport-fix-CMP0054-MSVC' into release 2014-11-20 08:53:47 -05:00
Fraser Hutchison 4d52cd36ad Avoid if() quoted auto-dereference when checking for "MSVC"
When testing CMAKE_<LANG>_COMPILER_ID values against "MSVC", do not
allow the definition of the "MSVC" variable to be expanded.
2014-11-19 16:24:54 -05:00
Fraser Hutchison 543c4304bb Avoid if() quoted auto-dereference when checking for "MSVC"
When testing CMAKE_<LANG>_COMPILER_ID values against "MSVC", do not
allow the definition of the "MSVC" variable to be expanded.
2014-11-19 16:22:56 -05:00
Tim Gallagher b6b37e3037 Makefile: Add assembly and preprocessed targets for Fortran
Extend the FortranOnly test to cover "make <src>.i" targets.
2014-11-10 10:24:53 -05:00
Brad King 5204329315 Merge topic 'watcom-drop-symfile-option'
6b63942e Watcom: Drop symfile linker option
2014-11-04 15:09:43 -05:00
J Decker 6b63942e45 Watcom: Drop symfile linker option
Cleanup of Windows-wcl386.cmake in commit v3.1.0-rc1~693^2 (Watcom:
Cleanup Windows-wcl386 configuration, 2014-04-01) also introduced use of
the 'symfile' link option but did not mention it in the commit message.

There is no way to set the symbol file name of a target, so it is better
to revert that change.  It is easy to run 'wstrip *' if the symbols need
to be stripped, but it is very difficult to get the right names for the
.sym files to install with debug/rel_with_deb_info configurations.
2014-11-03 08:46:48 -05:00
Brad King 4fc3367fcd OS X: Detect deployment target flags from GNU Fortran compilers
Reported-by: Bill Somerville <bill@classdesign.com>
2014-10-27 08:40:55 -04:00
Ben Boeckel 29c3edb87a Avoid if() quoted auto-dereference
When testing CMAKE_<LANG>_COMPILER_ID values, do not explicitly
dereference or quote the variable. We want if() to auto-dereference the
variable and not its value. Also replace MATCHES with STREQUAL where
equivalent.
2014-10-20 11:49:16 -04:00
Brad King 178f56a579 VS: Fix Tegra-Android platform linking of libraries by name
Nsight Tegra Visual Studio Edition handles prefixing of library names
with '-l' automatically, so teach the generator not to do so.

Reported-by: Mourad Boufarguine <mourad@boufarguine.name>
2014-09-30 08:45:35 -04:00
Gilles Khouzam 89da84657a MSVC: Define 'WIN32' for Windows Store and Windows Phone
This was accidentally left out of commit c72f0887 (MSVC: Add default
WindowsPhone and WindowsStore compile flags, 2014-07-28).
2014-09-02 10:17:03 -04:00
Brad King 2b20110f68 MSVC: Select default standard libraries for ARM platform
For Windows ARM targets, only kernel32.lib and user32.lib are standard.
2014-08-12 10:08:42 -04:00
Brad King 2074f58138 MSVC: Add system libs for WindowsPhone and WindowsStore
Use the libraries that are added by default by the VS 2013 IDE
for Windows Phone and Windows Store projects.
2014-07-31 14:08:58 -04:00
Paul Annetts c72f0887ce MSVC: Add default WindowsPhone and WindowsStore compile flags
Also set the list of standard libraries to empty.
2014-07-31 14:08:56 -04:00
Gilles Khouzam 1c94558abb MSVC: Disable incremental linking for WindowsPhone and WindowsStore
Do not add a "/INCREMENTAL" flag when using the toolchains for these
systems.
2014-07-31 14:08:54 -04:00
Gilles Khouzam 592098e2d5 Define 'WINDOWS_PHONE' and 'WINDOWS_STORE' variables
Set one of these when CMAKE_SYSTEM_NAME is "WindowsPhone" or
"WindowsStore", respectively.
2014-07-31 14:08:52 -04:00
Brad King aa42a78f52 Add WindowsPhone and WindowsStore platform information modules
Simply include the "Windows" platform equivalents.  This will allow
-DCMAKE_SYSTEM_NAME=WindowsPhone or -DCMAKE_SYSTEM_NAME=WindowsStore to
select variants of the Windows platform while re-using most of the
platform information from "Windows".
2014-07-31 14:08:50 -04:00
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