summaryrefslogtreecommitdiffstats
path: root/Modules/CompilerId
Commit message (Collapse)AuthorAgeFilesLines
* VS: Propagate CMAKE_VS_GLOBALS into compiler id projectsAlexander Boczar2019-10-171-0/+1
| | | | Issue: #19708
* VS: Add support to override VCTargetsPath through toolsetAlexander Boczar2019-10-151-0/+1
| | | | Fixes: #19708
* cuda: Extend cuda compiler detection to work with custom cuda pathBenjamin Wozniak2019-08-301-0/+1
|
* Xcode: Derive stdlib from CXX flagsGregor Jasny2019-02-071-0/+1
| | | | Closes: #18396
* Xcode: Completely disable code signing for compiler id detectionGregor Jasny2019-02-041-2/+1
| | | | Issue: #17870
* GHS: Add Compiler ID detectionFred Baksik2019-01-162-0/+11
| | | | | | | | | | | | -- Detect GHS compiler and version Detect ARCHITECTURE_ID for PPC / ARM / 86 targets Detect PLATFORM_ID for Integrity and Integrity178 platforms Using defines specified in the documents for the compilers: 201416 PPC / 201754 ARM / 201714 86 -- Fallback C/CXX compiler ID to GHS if not otherwise detected and using GHS MULTI generator Works around issue with some GHS compilers not setting __ghs__ compiler define -- Tweak Compiler ID checking so major id of 002017 is not replaced with 217 -- Prefer try_compile() library targets when testing for working GHS compilers -- Avoid CMake errors if reading past end of file for checking if file is PE executable
* Xcode: Set CODE_SIGN_IDENTITY during compiler identificationRafal Parzych2018-08-241-0/+1
| | | | | | | If `CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY` is set then propagate it to the compiler id test project too. Fixes: #18292
* Xcode: Detect architecture(s) using ARCHS instead of CURRENT_ARCHBrad King2018-06-181-1/+1
| | | | | | | | | Xcode 10 no longer populates `CURRENT_ARCH` with the current architecture in shell scripts and instead uses `undefined_arch`. Instead we must use `ARCHS`. It lists all architectures separated by spaces. Fixes: #18085
* VS: Add option to select the version of the toolset used by VS 2017Basil Fierz2018-05-291-0/+1
| | | | | | | | Add new `version=` parameter in the toolset setting to select the version. Add variable `CMAKE_VS_PLATFORM_TOOLSET_VERSION` to hold the version, if one is set (blank indicates default). Fixes: #17549
* Xcode: Add team to compiler-id projectGregor Jasny2017-09-191-0/+1
| | | | Closes #16839
* Xcode: Drop support for Xcode versions below 3Brad King2017-04-222-239/+0
|
* Xcode: Detect CURRENT_ARCH for use by generatorBrad King2017-03-311-1/+1
| | | | | | | During compiler identification, extract the Xcode `CURRENT_ARCH` value and save it for later use by the Xcode generator in an internal compiler information variable. This will be useful to know the locations of object files when only one architecture is built.
* VS: Add more placeholders to compiler id detection project file templateBrad King2017-03-101-0/+8
|
* VS: Refactor compiler id detection project file templateBrad King2017-03-101-2/+2
| | | | | | Make the `ClCompile` element name and `PostBuildEvent/Command` value configurable. Move the current content into default values for the corresponding variables.
* VS: Fix CSharp compiler identification for VS 2017Gilles Khouzam2017-01-311-4/+4
| | | | | | The CSharp compiler for VS 2017 has moved from `MSBuildTools` to `RoslynTargets`. Account for both locations giving priority to the `MSBuildTools` location.
* C# support: add compiler detection for MSVCMichael Stürmer2016-12-151-0/+55
|
* VS: Provide an option to use x64 host toolsBrad King2016-10-141-0/+3
| | | | | | | | | | Visual Studio provides toolchains that are themselves built for 32-bit or 64-bit host architectures. By default it uses the 32-bit tools, but it can be told to prefer the 64-bit tools on 64-bit hosts. Extend the `CMAKE_GENERATOR_TOOLSET` specification to provide a way to request use of the 64-bit host tools. Closes: #15622
* Xcode: Port rudimentary Swift support to Xcode 8Brad King2016-09-231-0/+1
| | | | | | The `.pbxproj` file must now specify a `SWIFT_VERSION` value. Set it to the legacy value of "2.3" for now. Later this can be made configurable (e.g. to "3.0").
* Drop Visual Studio 6 generatorBrad King2016-03-091-48/+0
| | | | | | This generator has been deprecated since CMake 3.3. Remove it. Update documentation, modules, and tests to drop content specific to this generator.
* VS: Add support for selecting the Windows 10 SDK (#15670)Gilles Khouzam2015-10-021-0/+1
| | | | | | | | | Teach the VS 2015 generator to produce a WindowsTargetPlatformVersion value. Use the CMAKE_SYSTEM_VERSION to specify the version and if not set choose a default based on available SDKs. Activate this behavior when targeting Windows 10. Co-Author: Brad King <brad.king@kitware.com>
* Swift: Fix Compiler-Id detection for Swift 2Gregor Jasny2015-09-031-1/+1
|
* Add rudimentary support for the Apple Swift language with XcodeBrad King2015-07-061-0/+1
| | | | | | | Allow the `Swift` language to be enabled with the Xcode generator for Xcode >= 6.1. Reject it on other generators and with older Xcode versions. Since Apple is the only vendor implementing the language right now, the compiler id can be just `Apple`.
* Xcode: Set ARCHS only when CMAKE_OSX_ARCHITECTURES is specified (#14736)Brad King2015-03-271-1/+0
| | | | | | Teach the Xcode generator that ONLY_ACTIVE_ARCH=YES means to use ARCHS, and that the default of ONLY_ACTIVE_ARCH=NO means to use NATIVE_ARCH and ignore ARCHS. In the latter case there is no reason to generate ARCHS.
* Xcode: Do not require code signing for compiler id (#15214)Brad King2015-01-111-1/+1
| | | | | | | | The approach in commit v3.1.0-rc1~1^2 (Xcode: Fix compiler id detection when code signing is required, 2014-10-22) still requires a code signing key when targeting a real device. Instead set CODE_SIGNING_REQUIRED to "NO" to tell Xcode not to sign at all. Drop the corresponding setting of the code signing identity.
* Xcode: Fix compiler id detection when code signing is requiredBrad King2014-10-221-0/+1
| | | | | | | | | | The iOS product type 'com.apple.package-type.bundle.unit-test' requires code signing on Xcode 6. Other iOS target types do too. Until CMake learns to add the CODE_SIGN_IDENTITY build attribute itself, toolchain files can set CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY to tell the Xcode generator to add the attribute. Teach CMakeDetermineCompilerId to recognize this variable and add the CODE_SIGN_IDENTITY build attribute to the compiler id project.
* Xcode: Fix compiler id detection for iOS tools (#15214)Brad King2014-10-221-1/+1
| | | | | | | | | | | | | Since commit 0cce556b (Xcode: Use sysroot and deployment target to identify compiler, 2014-04-29) our compiler id detection project uses the target platform SDK in case Xcode selects a different compiler based on it. Now the compiler id project actually compiles with the target compiler and SDK when cross-compiling. The iOS tools do not support the 'com.apple.product-type.tool' product type we use in our compiler id detection project. When targeting iPhone, use product type 'com.apple.product-type.bundle.unit-test' instead.
* VS: Detect compiler id of Nsight Tegra-Android toolchainsBrad King2014-09-291-0/+56
| | | | | | | | | | Teach CMakeDetermineCompilerId to recognize the Tegra-Android platform and generate a test project for Nsight Tegra tools. Locate the full path to CMAKE_<LANG>_COMPILER by computing it within the test project build environment. Also teach CMakeFindBinUtils that this variant of the Visual Studio generator uses UNIX-like instead of MS-like archiving and linking tools.
* CMakeDetermineCompilerId: Fix detection for VS ARM platformBrad King2014-08-121-0/+1
| | | | | | | | | Add WindowsSDKDesktopARMSupport to the compiler id .vcxproj to avoid 'error MSB8022: Compiling Desktop applications for the ARM platform is not supported.' from VS. Inspired-by: Minmin Gong <minmin.gong@gmail.com> Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
* CMakeDetermineCompilerId: Recognize WindowsPhone and WindowsStoreGilles Khouzam2014-07-311-0/+2
| | | | | | | | | When CMAKE_SYSTEM_NAME is set to target one of these, add ApplicationType and ApplicationTypeRevision elements to the .vcxproj file used to identify the compiler so that the WindowsPhone or WindowsStore toolchains can work. Co-Author: Brad King <brad.king@kitware.com>
* Xcode: Use sysroot and deployment target to identify compilerBrad King2014-04-291-0/+2
| | | | | | | | Use CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET to set the Xcode SDKROOT and MACOSX_DEPLOYMENT_TARGET build settings. This is necessary because some versions of Xcode select a different compiler based on these settings. We need to make sure the compiler identified during language initialization matches what will be used for the actual build.
* VS: Detect Intel Fortran compiler id and versionBrad King2013-10-181-0/+42
| | | | | | Teach CMakeDetermineCompilerId to use a .vfproj project file to build the Fortran compiler id source file under the Visual Studio generators.
* VS: Replace ArchitectureId with PlatformNamePatrick Gansterer2013-08-052-9/+9
| | | | | | | | Since we do not need the information about the target architecture we can use the PlatformName only to specify the this information. This also removes setting of the MSVC_*_ARCHITECTURE_ID variable which is not required, because this variable gets set by the compiler detection code in CMAKE_DETERMINE_COMPILER_ID_CHECK().
* VS10: Do not set the TargetMachine when detecting the compilerPatrick Gansterer2013-08-051-1/+0
| | | | | | | The Microsoft linker is intelligent enough to detect the target machine type depending on the input files. This allows us to get the target architecture from the compiler instead of maintaining the mapping to the platform name.
* VS6: Hardcode id_machine_6 for compiler detectionPatrick Gansterer2013-08-051-3/+3
| | | | | id_machine6 is never set to an other value than x86. So it is safe to remove the replacements with "x86" directly.
* Xcode: Use explicitFileType to mark source types (#14093)Brad King2013-04-163-3/+3
| | | | | Replace use of lastKnownFileType with explicitFileType to insist that Xcode treat the file as we ask.
* Xcode: Implement generator toolset selection (#9831, #13802)Brad King2013-02-071-0/+1
| | | | | Implement generator toolset selection (cmake -T) for Xcode > 2.0 by adding the GCC_VERSION build setting to project files.
* VS: Ignore LIBC.lib when linking the CompilerId executablesPatrick Gansterer2012-11-301-0/+1
| | | | | Some Windows CE linkers want to link against LIBC.lib, but can not find them. Since they are not required we can simply ignore it.
* VS: Add the entry point when compiling for WindowsCEPatrick Gansterer2012-11-301-1/+1
| | | | | Set the entry point to mainACRTStartup to make sure that main() can be found when linking the application to check the compiler.
* VS: Set the correct SubSystem when determinating the CompilerIdPatrick Gansterer2012-11-301-1/+1
| | | | Some WinCE linker only work when the subsystem is set to WINDOWSCE.
* VS: Make DetermineCompilerId working with WinCE tooPatrick Gansterer2012-11-271-1/+1
| | | | | | Add a dummy mainCRTStartup() function, since the linker searches for it instead of main() and set the CMAKE_SYSTEM_* variables depending on the MSVC_C_ARCHITECTURE_ID and CMAKE_VS_WINCE_VERSION variables.
* VS: Remove TargetMachine for linker when checking compiler idPatrick Gansterer2012-11-201-1/+0
| | | | | | If the TargetMachine isn't defined the linker will choose the correct target depending on the input file. This helps us later with additional compiler platforms for WinCE.
* VS: Detect the compiler id and tool locationBrad King2012-08-223-0/+161
| | | | | | | Configure a hand-generated Visual Studio project to build the compiler id source file since we cannot run the compiler command-line tool directly. Add a post-build command to print out the full path to the compiler tool. Parse the full path to the compiler tool from the build output.
* Xcode: Detect the compiler id and tool locationBrad King2012-08-223-0/+346
Configure a hand-generated Xcode project to build the compiler id source file since we cannot run the compiler command-line tool directly. Add a post-build shell script phase to print out the compiler toolset build setting. Run xcodebuild to compile the identification binary. Parse the full path to the compiler tool from the xcodebuild output.