summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'ios-pch-x-lang-header'Brad King2020-09-092-2/+12
|\ | | | | | | | | | | | | 8d61294c3e PCH: Mark CMake PCH source files as -x <lang>-header Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5188
| * PCH: Mark CMake PCH source files as -x <lang>-headerCristian Adam2020-09-042-2/+12
| | | | | | | | Fixes: #21163
* | Merge topic 'ispc_lang_support'Brad King2020-09-011-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5ece12b7e4 gitlab-ci: add ISPC to the Fedora CI image 8976817d6d ISPC: Update help documentation to include ISPC 2368f46ba4 ISPC: Support building with the MSVC toolchain e783bf8aa6 ISPC: Support ISPC header generation byproducts and parallel builds 34cc6acc81 Add ISPC compiler support to CMake 419d70d490 Refactor some swift only logic to be re-used by other languages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5065
| * | ISPC: Support building with the MSVC toolchainRobert Maynard2020-08-281-0/+8
| | |
* | | llvm-rc: Enable preprocessing for all Windows usage variantsThomas Bernard2020-08-271-0/+2
| | | | | | | | | | | | Fixes: #21096
* | | llvm-rc: Refactor the preprocessing logicThomas Bernard2020-08-271-20/+27
| | |
* | | Merge topic 'clang-cl-restore-preprocess'Brad King2020-08-211-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 7b083d59c2 clang-cl: Restore rules to create preprocessed and assembly output Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5142
| * | | clang-cl: Restore rules to create preprocessed and assembly outputBrad King2020-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | In commit d993ebd4ca (clang-cl: Add '--' before source file, 2020-07-28) we accidentally replaced these rules with those to compile an object file.
* | | | Merge branch 'backport-3.18-llvm-rc-quote-cmake' into llvm-rc-quote-cmakeBrad King2020-08-181-1/+1
|\ \ \ \ | |/ / / |/| | / | | |/ | |/|
| * | llvm-rc: Fix quoting of path to cmake in CMAKE_RC_COMPILE_OBJECTThomas Bernard2020-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When the installation path to cmake includes spaces, the `<CMAKE_COMMAND>` is required to have proper quotation of the cmake call. Fixes: #21095
* | | clang-cl: Add '--' before source fileThomas Bernard2020-08-072-1/+9
| | | | | | | | | | | | | | | | | | | | | On Linux and macOS, absolute paths start with `/` which may be interpreted by clang-cl as an option. To avoid this, we separate the source file path from preceding options with `--` to tell `clang-cl` it is not an option.
* | | cmake: Change cmake_llvm_rc separator from -- to ++ to avoid conflictThomas Bernard2020-08-071-1/+1
| |/ |/|
* | Detect the correct target architecture for clang compilers.Thomas Bernard2020-07-281-0/+5
| | | | | | | | | | | | During compiler identification, if CMAKE_{C,CXX}_COMPILER_TARGET is defined, the corresponding clang target flag is used to guaranty proper target architecture detection.
* | Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/codespell-project/codespell#readme The following command was used: ``` codespell -q6 --skip="\ .git,\ *.json,\ ./Copyright.txt,\ ./Help/command/foreach.rst,\ ./Help/prop_test/REQUIRED_FILES.rst,\ ./Help/variable/CTEST_COVERAGE_COMMAND.rst,\ ./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\ ./Modules/CMakeRCInformation.cmake,\ ./Modules/Internal/CPack/NSIS.template.in,\ ./Modules/FindMatlab.cmake,\ ./Modules/MatlabTestsRedirect.cmake,\ ./Modules/Platform/Windows-Clang.cmake,\ ./Modules/Platform/Windows-Intel-Fortran.cmake,\ ./Modules/Platform/Windows-MSVC.cmake,\ ./Source/CMakeVersion.cmake,\ ./Source/cmConvertMSBuildXMLToJSON.py,\ ./Source/cmCreateTestSourceList.cxx,\ ./Source/cmGlobalVisualStudio10Generator.cxx,\ ./Source/cmExportBuildFileGenerator.cxx,\ ./Source/cmExportInstallAndroidMKGenerator.cxx,\ ./Source/cmExportInstallFileGenerator.cxx,\ ./Source/cmExportSet.cxx,\ ./Source/cmExportTryCompileFileGenerator.cxx,\ ./Source/cmFindPackageCommand.cxx,\ ./Source/cmInstallCommand.cxx,\ ./Source/cmGeneratorExpressionLexer.cxx,\ ./Source/cmLocalVisualStudio7Generator.cxx,\ ./Source/cmOrderDirectories.cxx,\ ./Source/cmTarget.cxx,\ ./Source/kwsys/*,\ ./Source/QtDialog/CMakeSetupDialog.ui,\ ./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\ ./Source/CTest/cmParseCoberturaCoverage.h,\ ./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\ ./Tests/RunCMake/GoogleTest/xml_output.cpp,\ ./Tests/RunCMake/Make/TargetMessages*,\ ./Utilities/*,\ " \ -L "\ dependees,\ endwhile,\ fo,\ filetest,\ helpfull,\ nd,\ objext,\ stoll,\ supercedes,\ superceded,\ vas,\ varn,\ " ```
* | macOS: Always pick latest SDK if user has not set one explicitlyTor Arne Vestbø2020-07-141-21/+12
| | | | | | | | | | | | | | Apple tech note QA1806 recommends always building against the latest SDK. Fixes: #20949
* | Darwin: prefix internal osx variables with "_" to hide them from usersChuck Cranor2020-07-031-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | A simple CMakeLists.txt on osx shows that variable "d" is set (but empty) by the system modules. this pollutes the user's variable namespace. I noticed this when I created a library target "d" and got unexpected policy CMP0054 warnings when trying to find_package(d CONFIG REQUIRED) (triggered from the generated "d-targets.cmake" ...). Note that non-"_" prefixed internal variables are ok within functions due to scoping rules. Fixes: #20898
* | Visual Studio: Add Android supportKyle Edwards2020-06-244-3/+101
|/
* Darwin: honour `CMAKE_OSX_SYSROOT` more faithfullySaleem Abdulrasool2020-05-311-5/+21
| | | | | | | The libraries in the SDK should be given precedence over the system libraries. Check for the default library search path (in default order) of `/usr/lib` and `/usr/local/lib` and use these as system prefix paths for libraries when performing the link step against a specified SDK.
* Merge topic 'support_conda_env'Brad King2020-05-221-0/+4
|\ | | | | | | | | | | | | | | | | 50879ce412 Conda: Add CONDA_PREFIX as an acceptable system prefix path cd9c3c000f Tests: Update QtAutogen codeeditor test only include headers needed d806bd2e8c Tests: Update test suite to run in an Anaconda environment Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4773
| * Conda: Add CONDA_PREFIX as an acceptable system prefix pathRobert Maynard2020-05-211-0/+4
| |
* | Merge branch 'backport-cuda-default-runtime' into cuda-default-runtimeBrad King2020-05-221-1/+0
|\ \ | |/ |/|
| * CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchainRobert Maynard2020-05-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 0d0145138f (CUDA: Add abstraction for cuda runtime selection, 2019-11-29, v3.17.0-rc1~83^2) we add CUDA runtime library selection flags by default. To maintain backwards compatibility the default CUDA runtime library needs to be computed based on what libraries are found on the initial compiler invocation. For example a toolchain could establish initial flags that have all CUDA compilations using the runtime version, and if we don't detect this we will try to link to both the static and shared runtime. Co-Author: Brad King <brad.king@kitware.com> Fixes: #20708
| * Merge topic 'pch-msvc-pragma' into release-3.17Brad King2020-05-121-7/+5
| |\ | | | | | | | | | | | | | | | | | | 6c2514dabe MSVC: Use 'pragma system_header' in PCH only on cl 19.13 and above Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4736
* | \ Merge topic 'doc-CMAKE_SYSTEM_PREFIX_PATH'Craig Scott2020-05-202-0/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 6b3d8f281e Document which environment variables effect CMAKE_SYSTEM_PREFIX_PATH Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4748
| * | | Document which environment variables effect CMAKE_SYSTEM_PREFIX_PATHRobert Maynard2020-05-192-0/+11
| | | |
* | | | CUDA: Add support for Clang compilerRaul Tambre2020-05-151-0/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When crosscompiling we pass the sysroot. We need to try various architecture flags. Clang doesn't automatically select one that works. First try the ones that are more likely to work for modern installations: * <=sm_50 is deprecated since CUDA 10.2, try sm_52 first for future compatibility. * <=sm_20 is removed since CUDA 9.0, try sm_30. Otherwise fallback to Clang's current default. Currently that's `sm_20`, the lowest it supports. Separable compilation isn't supported yet. Fixes: #16586
* | | Merge topic 'pch-msvc-pragma'Brad King2020-05-121-7/+5
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 6c2514dabe MSVC: Use 'pragma system_header' in PCH only on cl 19.13 and above Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4736
| * | MSVC: Use 'pragma system_header' in PCH only on cl 19.13 and aboveBrad King2020-05-111-7/+5
| | | | | | | | | | | | | | | | | | | | | VS 2017 15.6 introduced support for this pragma. Older MSVC versions warn that it is unknown. Fixes: #20692
| * | Merge topic 'android-ndk-r19-binutils' into release-3.16Brad 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
* | | | OpenWatcom: Add cross-compilation support for WindowsJiri Malak2020-05-061-2/+11
| | | | | | | | | | | | | | | | Add system header files directories for cross-compilation
* | | | OpenWatcom: Fix Linux support fileJiri Malak2020-05-061-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Fix CMAKE_SHARED_LINKER_FLAGS_INIT macro Fix executable file name for Linux to be without extension Add system header files directory for cross-compilation
* | | | OpenWatcom: Add OS/2 target supportJiri Malak2020-05-064-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OS/2 16-bit and 32-bit target support files for cross-compilation by OpenWatcom. It is used if CMAKE_SYSTEM_NAME=OS2 is defined. If CMAKE_SYSTEM_PROCESSOR=I86 is defined then 16-bit OS/2 target is used, otherwise 32-bit OS/2 target is used.
* | | | OpenWatcom: Add DOS target supportJiri Malak2020-05-064-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOS 16-bit and 32-bit target support files for cross-compilation by OpenWatcom. It is used if CMAKE_SYSTEM_NAME=DOS is defined. If CMAKE_SYSTEM_PROCESSOR=I86 is defined then 16-bit DOS target is used, otherwise 32-bit DOS target is used.
* | | | 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