Commit Graph

744 Commits

Author SHA1 Message Date
Brad King cf8ce7a39e RC: Do not override MinGW Makefiles generator preference
Update logic added in commit 957c2aac (RC: Simplify selection of
resource compiler based on C/C++ toolchain, 2015-05-07) to avoid
overriding CMAKE_GENERATOR_RC.  The MinGW and MSYS Makefiles
generators use it to select a windres next to the compiler even
if it is not in the PATH.
2015-05-11 09:00:25 -04:00
Brad King 957c2aac7f RC: Simplify selection of resource compiler based on C/C++ toolchain
Revert the refactoring by commit v2.8.11~105^2~1 (Ninja: use MinGW
generator code in EnableLanguage, 2013-03-09) and move the MinGW-
specific logic back to the "MinGW Makefiles" generator.  Instead teach
the platform information modules for GNU and MSVC on Windows to set the
preferred RC compiler just before enabling the RC language.  This way
we choose the RC compiler based on the C/C++ toolchain that is actually
enabled.
2015-05-07 11:43:02 -04:00
Brad King f47342701c HP-UX: Add GNU compiler information for ASM language
Suggested-by: Gerhard Grimm <gerhard.grimm@detec.com>
2015-05-04 11:06:16 -04:00
Geoff Viola 48004d9dbe Add a 'Green Hills MULTI' generator on Windows
Green Hills MULTI is an IDE for embedded real-time systems.  The IDE's
product page can be found here:

 http://www.ghs.com/products/MULTI_IDE.html

It supports cross compiling on ARM, Intel x86, and other architectures
with various operating systems.  The IDE exists on Linux and Windows
host systems, but CMake will currently only generate the project files
on Windows host systems.
2015-04-20 13:55:40 -04:00
Brad King 81db6506a9 Merge topic 'blugeneq-platform-files'
13807bcb BlueGene/Q Platform files
2015-03-24 11:26:24 -04:00
Gregor Jasny 52642b466e OS X: Look for Xcode 5 platform-specific Frameworks
The Xcode 5 platform specific framework locations differ from the Xcode
6 ones.  Look first for the Xcode 6 ones, then for iOS Xcode 5 ones and
last for the Xcode 5 OS X ones.

For reference, the XCTest.framework is located as follows:

 Xcode511.app/Contents/Developer/Library/Frameworks/XCTest.framework
 Xcode511.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/Developer/Library/Frameworks/XCTest.framework
 Xcode511.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/Developer/Library/Frameworks/XCTest.framework

 Xcode601.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework
 Xcode601.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework
 Xcode601.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-03-24 11:23:40 -04:00
Brad King 7ef5f240c8 Merge topic 'lib64_paths_crosscompiling'
81bfebfe Linux: Ignore Debian-specific case when cross-compiling
2015-03-23 09:22:06 -04:00
Zack Galbreath 81bfebfe8c Linux: Ignore Debian-specific case when cross-compiling
When constructing settings for the target environment during cross
compiling we should not check for /etc/debian_version on the host.
2015-03-23 09:19:54 -04:00
Brad King 00842df48d PGI: Remove invalid -fPIE flag (#15460)
The PGI compilers on Linux do not have the -fPIE flag.  Remove the table
entry added by commit v2.8.9~125^2~2 (Add platform variables for
position independent code flags, 2012-05-05), which likely included it
only as part of a sweeping introduction of such flags.
2015-03-20 12:59:54 -04:00
Todd Gamblin 13807bcb41 BlueGene/Q Platform files
- based on the BlueGene/P platform files.
- tested by Todd Gamblin (LLNL) and David DeMarle (Kitware)
2015-03-18 23:40:12 -07:00
Brad King 4817d2814a Merge topic 'windows-rc-enable-later'
772eae44 RC: Add platform-specific preprocessor definitions (#15404)
4300de3e RC: Enable language after C, CXX, or Fortran is enabled (#15404)
1de4a0fb RC: Drop unused CMAKE_COMPILE_RESOURCE variable setting
2015-02-26 08:52:09 -05:00
Brad King 772eae4464 RC: Add platform-specific preprocessor definitions (#15404)
In Platform/Windows-MSVC the C and CXX flags are initialized to
contain preprocessor definitions describing the platform.  On
WinCE platforms this may not be just -DWIN32.  This information
may be important to RC sources too, so add such preprocessor
definitions to the default RC flags.

Suggested-by: Gunnar Roth <gunnar.roth@gmx.de>
2015-02-25 11:29:45 -05:00
Brad King 4300de3e27 RC: Enable language after C, CXX, or Fortran is enabled (#15404)
The RC language is special in that it is automatically enabled
on Windows-based platforms when another primary language is
enabled.  Move enablement of RC from early in the enablement
of the other language to late.  This will allow it to use
information detected as part of enabling C, CXX, or Fortran.
2015-02-25 11:16:51 -05:00
Brad King 1de4a0fb09 RC: Drop unused CMAKE_COMPILE_RESOURCE variable setting
This variable has long been replaced by CMAKE_RC_COMPILE_OBJECT.
Stop setting it in platform modules.
2015-02-25 11:16:19 -05:00
Brad King 71a610ff29 Merge topic 'refine-MSVC-ARM-WinCE'
3d612c73 MSVC: Compile with arch-specific flags on ARM platforms (#14552)
886dcaa7 MSVC: Distinguish among ARM architectures more precisely (#14552)
ea986676 MSVC: Define /DWINCE when building for WinCE platforms (#14552)
2015-02-25 09:03:03 -05:00
Gunnar Roth 3d612c7352 MSVC: Compile with arch-specific flags on ARM platforms (#14552)
Define the exact ARM architecture name as a preprocessor symbol.
Compile with /QRarch4T or /QRarch5T on ARMV4I or ARMV5I.
2015-02-24 09:33:08 -05:00
Gunnar Roth 886dcaa7c5 MSVC: Distinguish among ARM architectures more precisely (#14552)
Detect the exact ARM architecture instead of just "ARM".  Treat "ARM" as
an architecture family that includes THUMB (ARMV4I and ARMV5I).
2015-02-24 09:33:08 -05:00
Gunnar Roth ea98667682 MSVC: Define /DWINCE when building for WinCE platforms (#14552) 2015-02-24 09:33:06 -05:00
Gregor Jasny 0ee2a004e7 OS X: Add platform-specific Frameworks search path
Otherwise find_library is unable to lookup the XCTest framework which
is not located in the SDK serach path:

In the 10.10 SDK the SDK frameworks are located here:

  $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks

whereas the Platform SDKs are located here:

  $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/Library/Frameworks

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-23 13:10:52 -05:00
Brad King a0f17fbe9c Windows-GNU: Do not tell find_library to treat '.dll' as linkable
Modern software distributions always use a separate ".dll.a" or ".lib"
import library for linking.
2015-02-18 09:40:25 -05:00
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