summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge topic 'unity_no_skip_autogen'Brad King2020-07-301-1/+0
|\ \ | |/ | | | | | | | | | | 7051250a6c Unity Builds: Do not set SKIP_AUTOGEN to source files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5081
| * Unity Builds: Do not set SKIP_AUTOGEN to source filesCristian Adam2020-07-291-1/+0
| | | | | | | | Fixes: #21028
* | Source: use cmNonempty()Vitaly Stakhovsky2020-07-281-8/+7
| |
* | Factor out generator checks for filtering on non-compiling targetsBrad King2020-07-231-1/+1
| | | | | | | | | | Add a `cmGeneratorTarget::CanCompileSources` helper method to tell generators whether a target might compile anything.
* | Factor out generator checks for filtering out interface librariesBrad King2020-07-231-2/+2
| | | | | | | | | | | | Add a `cmGeneratorTarget::IsInBuildSystem` helper method to tell generators whether a target should participate in the generated build system.
* | Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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,\ " ```
* | Merge topic 'move_more_queries_to_cmStandardLevelResolver'Brad King2020-07-161-141/+6
|\ \ | | | | | | | | | | | | | | | | | | 56cf509a72 Move AddCompilerRequirementFlag to cmStandardLevelResolver Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4989
| * | Move AddCompilerRequirementFlag to cmStandardLevelResolverRobert Maynard2020-07-151-141/+6
| | | | | | | | | | | | | | | | | | | | | The cmLocalGenerator::AddCompilerRequirementFlag was another source of truth on what standard levels existed per language, so fold that into cmStandardLevelResolver to make updating CMake easier
* | | Merge topic 'cmnonempty'Kyle Edwards2020-07-151-5/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | eaad8072ee cmNonempty: Convenience inlines to check for non-empty string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5017
| * | cmNonempty: Convenience inlines to check for non-empty stringVitaly Stakhovsky2020-07-141-5/+3
| | |
* | | cmIsOn: add overload accepting const std::string*Vitaly Stakhovsky2020-07-141-4/+3
|/ /
* | GetFeature(): return cmPropVitaly Stakhovsky2020-07-111-3/+3
| |
* | Merge topic 'refactor-generator-configs'Brad King2020-07-061-22/+13
|\ \ | | | | | | | | | | | | | | | | | | 7a969fe21d cmMakefile: Refactor API to better handle empty config values Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4957
| * | cmMakefile: Refactor API to better handle empty config valuesRobert Maynard2020-07-031-22/+13
| | |
* | | cmStandardLevelResolver: Added to handle standard level queriesRobert Maynard2020-07-011-1/+3
|/ / | | | | | | Refactored out of cmMakefile
* | configure_file: Add option to control file permissions transfer to copyRahul Gottipati2020-06-301-2/+2
| | | | | | | | Issue: #20866
* | Merge topic 'languageStandardRefactor'Brad King2020-06-181-42/+10
|\ \ | |/ |/| | | | | | | | | | | 742ff97f80 Refactor language standard computation 0892c798f7 cmMakefile: Change CompileFeatureKnown to take target name instead of target Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4803
| * Refactor language standard computationJustin Goshi2020-06-161-42/+10
| | | | | | | | | | Instead of mutating the configure-time cmTarget's properties at generate time, compute and store it in a cmGeneratorTarget field.
* | CUDA: Add issue number to Clang separable compilation errorRaul Tambre2020-06-161-1/+2
|/
* CUDA: Pass toolkit path to ClangRaul Tambre2020-06-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Clang isn't very good at finding the installed CUDA toolkit. The upstream recommendation is that we should pass the toolkit explicitly. Additionally: * Avoids Clang having to search for the toolkit on every invocation. * Allows the user to use a toolkit from a non-standard location by simply setting CUDAToolkit_ROOT. The same way as with FindCUDAToolkit. Clang wants the directory containing the device library and version.txt as the toolkit path. We thus pass the newly introduced CUDAToolkit_LIBRARY_ROOT as the toolkit path. We save CUDAToolkit_ROOT_DIR and CUDAToolkit_LIBRARY_ROOT on Clang to have them available in try_compile() and avoid unnecessary re-searching or a possibly different installation being found in FindCUDAToolkit. This however means that the selected toolkit can't be changed after the initial language enablement. We now determine CUDA compiler ID before doing actual detection, as we don't want to spend time finding the CUDA toolkit for NVIDIA. Implements #20754.
* Merge topic 'cuda_clang_separable_error'Brad King2020-06-051-0/+13
|\ | | | | | | | | | | | | | | b1243201e7 CUDA: Don't RunCMake generate separable compilation tests on Clang 1b4c690543 CUDA: Throw error if CUDA_SEPARABLE_COMPILATION is ON when using Clang Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4827
| * CUDA: Throw error if CUDA_SEPARABLE_COMPILATION is ON when using ClangRaul Tambre2020-06-021-0/+13
| | | | | | | | | | Separable compilation isn't supported yet on Clang. Let's throw a helpful error instead of confusing errors during the build.
* | add_library/add_executable: allow local alias to imported targetsMarc Chevrier2020-06-021-7/+18
|/ | | | Fixes: #20641
* Merge topic 'getdef-expand'Brad King2020-06-021-5/+4
|\ | | | | | | | | | | | | 7ed8c9ebe3 cmMakefile: add GetDefExpandList() that splits value into std::vector Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4819
| * cmMakefile: add GetDefExpandList() that splits value into std::vectorVitaly Stakhovsky2020-05-301-5/+4
| | | | | | | | Combines cmMakefile:GetDefinition() and cmExpandList()
* | Single location for cmProp typedefVitaly Stakhovsky2020-06-011-0/+1
|/
* Multi-Ninja: Fix reusable PCHs for MSVCCristian Adam2020-05-271-95/+145
| | | | Fixes: #20721
* AutoMoc: Configure AutoMoc after generated sources (PCH, Unity)Cristian Adam2020-05-261-1/+7
| | | | Fixes: #20119
* Multi-Ninja: Fix PCHs for Visual C++Cristian Adam2020-05-201-1/+3
| | | | Fixes: #20711
* Merge topic 'unity_explicit_groups'Brad King2020-05-111-44/+134
|\ | | | | | | | | | | | | | | 9f4eb352fe Unity Builds: Support explicit specification of sources to groups b00585adcc Unity: Refactor implementation to make it easier to extend Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4716
| * Unity Builds: Support explicit specification of sources to groupsRobert Maynard2020-05-071-3/+64
| | | | | | | | | | Instead of having CMake determine which files should go into each unity file, the user can now use explicitly state the mapping.
| * Unity: Refactor implementation to make it easier to extendRobert Maynard2020-05-061-45/+74
| |
* | PCH: Fix REUSE_FROM in multi-config generatorsAndreas Schönle2020-05-071-1/+3
|/ | | | | | | | | Since commit a55df20499 (Multi-Ninja: Add precompile headers support, 2020-01-10, v3.17.0-rc1~136^2) the re-used PCH file object is added once for each configuration to flags used for all configurations. Put it in the flags for only the corresponding configuration instead. Fixes: #20680
* GetSafeProperty: return std::string const&Vitaly Stakhovsky2020-04-301-1/+2
|
* cmGeneratorTarget::GetProperty: return cmPropVitaly Stakhovsky2020-04-291-71/+76
|
* Merge topic 'apple-merge-same-sysroot'Brad King2020-04-221-1/+22
|\ | | | | | | | | | | | | 3a7d1e9592 Apple: Merge per-arch sysroot parameters if all are the same Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4647
| * Apple: Merge per-arch sysroot parameters if all are the sameGregor Jasny2020-04-211-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit a9b41195d2 (Handle multi-arch sysroots on Apple platforms, 2019-07-26, v3.17.0-rc1~287^2), CMake supports "fat" builds with different sysroots. Those are passed to the compiler with the `-Xarch_<xyz>` parameter. Unfortunately this breaks the Compiler Cache (ccache) because it does not support those compiler flags: https://github.com/ccache/ccache/blob/v3.7.9/src/ccache.c#L2700-L2705 Restore the caching ability for certain "fat" build configurations (e.g. `arm64` and `armv7`) where the sysroot is the same for all selected architectures and thus a plain `-isysroot` parameter could be used.
* | CUDA: Device linking use now link optionsMarc Chevrier2020-04-191-12/+28
| | | | | | | | | | | | | | | | | | | | 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
* | Refactoring: add cm::contains to <cmext/algorithm>Marc Chevrier2020-04-171-6/+6
| |
* | Merge topic 'cuda_architectures'Brad King2020-04-161-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 21131ca60c CUDA: Add CudaOnly.CompileFlags test f0931b0790 CUDA: Convert tests to use CUDA_ARCHITECTURES e98588aaba CUDA: Add CUDA_ARCHITECTURES target property Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Patrick Stotko <stotko@cs.uni-bonn.de> Merge-request: !4568
| * | CUDA: Add CUDA_ARCHITECTURES target propertyRaul Tambre2020-04-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifies CUDA target architecture handling. Required for Clang support as Clang doesn't automatically select a supported architecture. We detect a supported architecture during compiler identification and set CMAKE_CUDA_ARCHITECTURES to it. Introduces CMP0104 for backwards compatibility with manually setting code generation flags with NVCC. Implements #17963.
* | | Merge topic 'cmprop-source'Brad King2020-04-151-5/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | e64fa5f1b6 cmSourceFile::GetProperty: return cmProp fc223f9860 cmGlobalXCodeGenerator: Fix genex interpreter overloads Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4603
| * | | cmSourceFile::GetProperty: return cmPropVitaly Stakhovsky2020-04-141-5/+5
| |/ /
* | | Merge topic 'msbuildUtf8Support'Brad King2020-04-151-19/+24
|\ \ \ | |/ / |/| | | | | | | | | | | | | | bc877a7e94 Add support to indicate UTF-8 custom command pipe output encoding Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4587
| * | Add support to indicate UTF-8 custom command pipe output encodingJustin Goshi2020-04-131-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a flag to indicate that pipe output from a custom command should be interpreted as UTF-8 encoded. This change does not introduce a public way to set the flag, but generators that create internally-generated commands know if they are calling cmake, which uses UTF-8 pipes. MSBuild added support for interpreting output of PreBuildEvent, PreLinkEvent, PostBuildEvent, and CustomBuildStep as UTF-8. This change will appear in Visual Studio 16.6 Preview 3. It is opt-in, and you need to add the StdOutEncoding tag. MSBuild treats these as property bags so if we emit the tag for earlier versions of Visual Studio it would be safely ignored. This change emits the StdOutEncoding tag and sets it to UTF-8 whenever the custom command UTF-8 pipe flag is set. This fixes globalization issues when the output from cmake contained characters that required MSBuild to interpret as UTF-8 before displaying them.
* | | clang-tidy: address bugprone-branch-clone lintsBen Boeckel2020-04-131-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Arguably, many of these are bugs in `clang-tidy`. An if/else tree with other conditionals between cloned blocks may be relying on the intermediate logic to fall out of the case and inverting this logic may be non-trivial. See: https://bugs.llvm.org/show_bug.cgi?id=44165
* | | Merge branch 'backport-3.17-apple-arch-sysroots' into apple-arch-sysrootsBrad King2020-04-081-12/+29
|\ \ \ | |/ / |/| / | |/
| * Apple: Fix mapping CMAKE_APPLE_ARCH_SYSROOTS to custom OSX_ARCHITECTURESBrad King2020-04-081-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `CMAKE_OSX_ARCHITECTURES` value is not used directly by generators. It is used to initialize a per-target `OSX_ARCHITECTURES` property, but that property can also be set explicitly by project code to a subset of the full list of architectures. In order to handle this case, construct a mapping from each `CMAKE_OSX_ARCHITECTURES` entry to the corresponding `CMAKE_APPLE_ARCH_SYSROOTS` entry by name. Use the mapping to find the sysroot for each entry in `OSX_ARCHITECTURES` for a given target. If `CMAKE_APPLE_ARCH_SYSROOTS` does not have the same length as `CMAKE_OSX_ARCHITECTURES`, error out early rather than risking a crash or assertion failure. Fixes: #20534
| * Apple: Improve handling of missing SDKs in CMAKE_APPLE_ARCH_SYSROOTSBrad King2020-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | 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 'file-GetRuntimeDependencies_support_cross_compilation'Brad King2020-04-071-0/+65
|\ \ | | | | | | | | | | | | | | | | | | f867423aa2 file: GetRuntimeDependencies use CMAKE_OBJDUMP when applicable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4538