summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
Commit message (Collapse)AuthorAgeFilesLines
* OpenWatcom: Add Linux supportJiri Malak2020-04-293-0/+18
| | | | | It is native Linux support for Linux host executable only (only static library support, no shared library support).
* OpenWatcom: Move non-Windows settings to Modules/CompilerJiri Malak2020-04-281-109/+3
| | | | | Restructure OpenWatcom toolchain support files to simplify adding of new targets DOS, OS/2 and Linux including cross-compilation.
* CUDA: Device linking use now link optionsMarc Chevrier2020-04-191-2/+2
| | | | | | | | | | properties LINK_OPTIONS and INTERFACE_LINK_OPTIONS are propagated to the device link step. To control which options are selected for normal link and device link steps, the $<DEVICE_LINK> and $<HOST_LINK> generator expressions can be used. Fixes: #18265
* Merge topic 'ios_multi_arch_fix'Brad King2020-04-171-11/+76
|\ | | | | | | | | | | | | | | 170e598add iOS: Fix detection of supported SDK architectures Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alexander Köplinger <alex.koeplinger@outlook.com> Merge-request: !4615
| * iOS: Fix detection of supported SDK architecturesAlexandru Croitor2020-04-161-11/+76
| | | | | | | | | | | | | | | | | | | | | | | | Instead of relying on SDKSettings.plist which does not contain the certain architectures, deduce the supported architectures by inspecting libSystem.tbd and libSystem.dylib. .tbd files are text files, so just parse out the archs string. .dylib files can be fat or non-fat, so use lipo -info to extract the architectures and parse lipo output. Fixes: #20588
* | Merge topic 'support_pseudo_sysroots'Brad King2020-04-151-0/+4
|\ \ | | | | | | | | | | | | | | | | | | 8cc384f629 Compilers: Add paths from -print-sysroot to system prefix path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4585
| * | Compilers: Add paths from -print-sysroot to system prefix pathRobert Maynard2020-04-141-0/+4
| | |
* | | Merge branch 'backport-3.17-apple-arch-sysroots' into apple-arch-sysrootsBrad King2020-04-081-2/+2
|\ \ \ | |/ / |/| / | |/
| * Apple: Improve handling of missing SDKs in CMAKE_APPLE_ARCH_SYSROOTSBrad King2020-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | Use `<arch>-SDK-NOTFOUND` instead of an empty string as a placeholder in `CMAKE_APPLE_ARCH_SYSROOTS` for architectures whose SDK is not found. This ensures the length of `CMAKE_APPLE_ARCH_SYSROOTS` matches the length of `CMAKE_OSX_ARCHITECTURES`. It also makes the missing SDKs more visible in the value. Issue: #20534
* | Merge topic 'llvm-rc-include-path'Brad King2020-04-071-1/+1
|\ \ | |/ | | | | | | | | | | 35a29ec827 llvm-rc: Restore include path for data after explicit preprocessing Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4570
| * llvm-rc: Restore include path for data after explicit preprocessingThomas Bernard2020-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 1c2d031cbd (Add -E cmake_llvm_rc to preprocess files for llvm-rc, 2020-01-14, v3.17.0-rc1~24^2) with llvm-rc we explicitly preprocess RC source files and then compile separately without -I flags. This broke cases where the RC source references data files adjacent to itself or in the include path. This change adds the expansion of the include paths when calling the llvm-rc in order for the resource files to be picked up correctly by llvm-rc. Since the RC compiled file is first preprocessed, the file being compiled by llvm-rc resides in the build directory. In order for llvm-rc to find the resource data specified relative to the .rc file being compiled, the source file path is preppended in the include list so that the original source path takes priority over all the other includes paths specified. A space was added in the CMAKE_INCLUDE_FLAG_RC to make the include directive work properly for llvm-rc. Checks on the rc.exe showed that the syntax change doesn't affect it's proper operation. Fixes: #20529
* | Merge topic 'llvm_rc_pp'Brad King2020-03-301-1/+1
|\ \ | |/ | | | | | | | | | | 4bef0e6450 llvm-rc: Enable preprocessing if CMAKE_RC_COMPILER_INIT is an absolute path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4535
| * llvm-rc: Enable preprocessing if CMAKE_RC_COMPILER_INIT is an absolute pathLucas Wang2020-03-271-1/+1
| | | | | | | | | | `CMAKE_RC_COMPILER_INIT` and `CMAKE_RC_COMPILER` can be set by user, for example `llvm-rc-10` and `D:\LLVM\bin\llvm-rc.exe`.
* | Merge topic 'llvm-rc-depfile'Brad King2020-03-271-3/+4
|\ \ | |/ | | | | | | | | | | | | 2c724c3aea llvm-rc: Write depfile to location specified by the generator 4cc876540e llvm-rc: Select preprocessor from active languages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4524
| * llvm-rc: Write depfile to location specified by the generatorThomas Bernard2020-03-261-1/+2
| | | | | | | | | | | | | | | | | | Move the depfile flags to `CMAKE_DEPFILE_FLAGS_RC` so that they are only usedwith generators that use depfiles. Also switch to using the `<DEPFILE>` placeholder for the location of the depfile so that it goes where the generator expects. Fixes: #20493
| * llvm-rc: Select preprocessor from active languagesThomas Bernard2020-03-261-2/+2
| | | | | | | | | | | | The llvm-rc preprocessor is selected according to the CMAKE_C_COMPILER_ID / CMAKE_CXX_COMPILER_ID which are only defined when the C or CXX language is active.
* | Merge topic 'compile-commands-collapse-whitespace'Brad King2020-03-2612-22/+22
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | e565053bce Ninja: Remove unnecessary newlines in compile commands 5d4bab500e Avoid consecutive whitespace in rules d8622fbd0f Modules: Collapse consecutive whitespace in strings Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4512
| * | Modules: Collapse consecutive whitespace in stringsDaan De Meyer2020-03-2312-22/+22
| | |
* | | MinGW: Fix default windres selection when cross-compilingBrad King2020-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | When cross-compiling to MinGW, select the `windres` tool named with the toolchain's prefix. Fixes: #20500
* | | MinGW: Drop unnecessary windres selection code with Unix MakefilesBrad King2020-03-251-4/+0
|/ / | | | | | | | | | | | | | | Since commit 957c2aac7f (RC: Simplify selection of resource compiler based on C/C++ toolchain, 2015-05-07, v3.3.0-rc1~93^2~5) we select windres as the RC compiler on MinGW via `CMAKE_RC_COMPILER_INIT`. Drop the special case from commit be9afbf453 (Find mingw's windres also when Unix Makefiles are used, 2012-08-27, v2.8.10~152^2).
* | CUDA: Abstract language flag to compiler modulesRaul Tambre2020-03-111-4/+4
| | | | | | | | | | Separate this detail out into compiler-specific modules. Required for Clang support, as it uses slightly different language flags.
* | Merge topic 'msvc-librarian'Brad King2020-03-043-3/+3
|\ \ | |/ |/| | | | | | | | | 55196a1440 MSVC: Use 'lib' instead of 'link /lib' to create static libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4409
| * MSVC: Use 'lib' instead of 'link /lib' to create static librariesFrancisco Facioni2020-03-033-3/+3
| | | | | | | | | | | | `link.exe /lib` is an undocumented flag and it just calls `lib.exe`. Also `link.exe` doesn't parse the `/lib` option correctly when in a response file.
* | llvm-rc: Forward DEFINES instead of FLAGSThomas Bernard2020-03-031-1/+1
|/ | | | | | | | Since commit 1c2d031cbd (Add -E cmake_llvm_rc to preprocess files for llvm-rc, 2020-01-14, v3.17.0-rc1~24^2) we pass the full target `<FLAGS>` to the llvm-rc resource compiler, but we should pass only `<DEFINES>`. Fixes: #20414
* PCH: Clang: Update PCH usage flags to include original headerSergey Larin2020-02-242-2/+2
| | | | | | | | | | | | | | | | | | | | | Add an additional include flag to PCH usage command line to fix programs that rely on `compile_commands.json` file. Pass it to the preprocessor directly to avoid compiler driver to change it to '-include-pch'. When preprocessor is requested to preprocess a file, it tries to get the original filename from '.pch' and uses that file for preprocessing. CMake generates a '.pch' file from the '.hxx' file by passing an empty '.cxx' source file to the compiler as a compilation unit and the header file with the '-include' flag. After that, compiler puts compilation unit filename in the '.pch' as the original filename. However, CMake build system uses empty file as the source file and passes the header file using '-include-pch' flag. As a result, Clang uses the wrong file for preprocessing and produces the corrupted preprocessed file. Fixes: #20355 Signed-off-by: Sergey Larin <cerg2010cerg2010@mail.ru>
* Swift: Exclude SDK include pathsYauheni Khnykin2020-02-101-1/+1
| | | | | | | | Populate `CMAKE_Swift_IMPLICIT_INCLUDE_DIRECTORIES` with the macOS SDK's include directory so that we filter such implicit directories out of Swift targets. Fixes: #19845
* Merge topic 'llvm-rc-preprocess'Brad King2020-02-051-0/+17
|\ | | | | | | | | | | | | 1c2d031cbd Add -E cmake_llvm_rc to preprocess files for llvm-rc Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4219
| * Add -E cmake_llvm_rc to preprocess files for llvm-rcThomas Bernard2020-02-041-0/+17
| | | | | | | | | | | | | | | | | | llvm-rc requires preprocessed rc files. The CMake command line tool cmake_llvm_rc enables channing the preprocessor call and the resource compiler and make this appear as single compilation step. When llvm-rc is detected as resource compiler, the RC compilation step is set to use this command.
* | Merge topic 'sdcc-no-default-target'Brad King2020-02-051-11/+0
|\ \ | | | | | | | | | | | | | | | | | | 18d2e6fc8f SDCC: Remove default flags for a specific target Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4321
| * | SDCC: Remove default flags for a specific targetfruit2020-02-041-11/+0
| |/ | | | | | | | | | | | | Remove defaults for a specific target (8051) because they are incorrect for other targets. Fixes: #20308
* | Merge topic 'android-ndk-r19-binutils'Brad King2020-02-041-0/+1
|\ \ | |/ |/| | | | | | | | | e3d3b7ddeb Android: Fix binutils selection with NDK r19+ unified toolchain Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4318
| * Android: Fix binutils selection with NDK r19+ unified toolchainBrad King2020-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | In commit 97bca2f9fa (Android: Use unified toolchain in NDK r19+, 2019-07-26, v3.16.0-rc1~342^2) we hard-coded use of the unified toolchain for NDK r19+ and skipped most of the old detection logic. However, in that fast path we left out setting `_CMAKE_TOOLCHAIN_PREFIX` for `CMakeFindBinutils` to select the matching binutils. Add it. Fixes: #20038
* | Merge topic 'windows-gnu-asm'Brad King2020-02-037-16/+28
|\ \ | | | | | | | | | | | | | | | | | | | | | 97de48b528 Tests: Update Assembler code generation to select MSVC runtime library 6348ffb9e5 ASM: Hook up Windows-specific GNU/Clang compiler information modules Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4287
| * | ASM: Hook up Windows-specific GNU/Clang compiler information modulesMartin Storsjö2020-01-317-16/+28
| | | | | | | | | | | | | | | | | | This allows building .s/.S assembly code, and makes sure that the `-fPIC` option isn't passed to the compiler (as it errors out on Clang and causes a loud warning on GCC).
* | | AIX: Add an option to disable automatic exports from shared librariesBrad King2020-01-312-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 0f150b69d3 (AIX: Explicitly compute shared object exports for both XL and GNU, 2019-07-11, v3.16.0-rc1~418^2~2) we always export all symbols from shared libraries by default. Add a new target property called `AIX_EXPORT_ALL_SYMBOLS` that can be explicitly set to OFF to suppress this behavior and export no symbols by default. Fixes: #20290
* | | AIX: Improve name of internal symbol export list fileBrad King2020-01-312-4/+4
| | |
* | | AIX: Add ExportImportList option to skip the object filesBrad King2020-01-311-14/+18
| | |
* | | AIX: Revise ExportImportList to build output more incrementallyBrad King2020-01-311-2/+5
|/ / | | | | | | This will allow more steps to be added.
* | Merge topic 'aix-skip-exports'Brad King2020-01-311-1/+11
|\ \ | | | | | | | | | | | | | | | | | | a17f6eff43 AIX: Restore pre-3.16 undocumented method to suppress exports with XL Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4303
| * | AIX: Restore pre-3.16 undocumented method to suppress exports with XLBrad King2020-01-301-1/+11
| |/ | | | | | | | | | | | | | | | | | | | | In commit 0f150b69d3 (AIX: Explicitly compute shared object exports for both XL and GNU, 2019-07-11, v3.16.0-rc1~418^2~2) we dropped use of the old `CMAKE_XL_CreateExportList` cache entry for XL exports. However, some people were setting the value to an empty string as a way to disable automatic export of symbols. Restore this behavior when the option is explicitly set to an empty string. Issue: #20290
| * Merge topic 'macOS-Xcode-11-frameworks' into release-3.16Brad King2020-01-131-0/+4
| |\ | | | | | | | | | | | | | | | | | | | | | fcde42751a FindPython: ensure new Xcode framework for Python3 is detected dd7b741b81 macOS: Add support for new Xcode 11 frameworks directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4198
* | | CUDA: Add abstraction for cuda runtime selectionRobert Maynard2020-01-271-0/+5
| | | | | | | | | | | | | | | Fixes #17559 Replace our hard-coded default of cudart=static with a first-class abstraction to select the runtime library from an enumeration of logical names.
* | | MinGW: Update find_library to not find plain .dll filesBrad King2020-01-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Modern distributions of packages built with MinGW tools provide `.dll.a` import libraries. Prefer those instead of finding plain `.dll` files. This avoids accidentally finding unrelated Windows `.dll` files. Fixes: #20019
* | | Ninja: Add a separate job pool for PCH creationDan Johnston2020-01-161-1/+2
| | | | | | | | | | | | | | | | | | | | | Add a `JOB_POOL_PRECOMPILE_HEADER` target property to specify the pool name, and its associated `CMAKE_JOB_POOL_PRECOMPILE_HEADER` variable. Fixes: #20217
* | | Merge topic 'macOS-Xcode-11-frameworks'Brad King2020-01-131-0/+4
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | fcde42751a FindPython: ensure new Xcode framework for Python3 is detected dd7b741b81 macOS: Add support for new Xcode 11 frameworks directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4198
| * | macOS: Add support for new Xcode 11 frameworks directoryMarc Chevrier2020-01-101-0/+4
| | | | | | | | | | | | Update CMAKE_SYSTEM_FRAMEWORK_PATH with new Xcode 11 frameworks directory
* | | Merge topic 'GNUtoMS-vs2019'Brad King2020-01-101-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 08c5b3eff0 GNUtoMS: Add search path for VS 2019 environment scripts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4197
| * | GNUtoMS: Add search path for VS 2019 environment scriptsBrad King2020-01-091-1/+1
| |/ | | | | | | | | | | | | | | Extend the logic from commit abe8a623d9 (GNUtoMS: Add search path for VS 2017 environment scripts, 2017-05-19, v3.8.2~1^2) to consider VS 2019 paths too. Fixes: #20162
* | Swift: move windows handling into platform file (NFC)Saleem Abdulrasool2019-12-221-0/+1
| | | | | | | | | | | | | | This moves the definition of the import library flags for Windows into a platform specific file (much like the Darwin `-sdk` flag). This is in preparation for re-use of the flag to make the flags handling for executables more precise.
* | Merge topic 'fat-ios'Brad King2019-12-171-11/+94
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | a9b41195d2 Handle multi-arch sysroots on Apple platforms 372c89ea38 Refactor -arch and -isysroot code usage 7a44e16d7f Refactor SDK name to path into a function 777d364913 Use xcrun instead of xcodebuild for resolving SDK path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4125