summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* CMake: enable setting default dir creation permissionsDomen Vrankar2017-11-081-0/+14
| | | | | | | | | Introduces CMAKE_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS variable which enables the user to specify the default permissions for directory creation. This setting is then used to auto set the permissions on directories which are implicitly created by install() and file(INSTALL) commands such as CMAKE_INSTALL_PREFIX directories.
* Merge topic 'server-test-info'Brad King2017-11-071-4/+7
|\ | | | | | | | | | | | | 35a52bd1 server: add "ctestInfo" request to get test info Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1414
| * server: add "ctestInfo" request to get test infoJustin Goshi2017-11-031-4/+7
| |
* | Replace cmArray{Begin,End,Size} by their standard counterpartsMatthias Maennich2017-10-231-2/+2
|/ | | | | | | | | | | std::{begin,end} are part of C++11, std::{cbegin,cend} are part of C++14 and an standard compliant implementation has been introduced within the 'cm' namespace: cm::{cbegin,cend}. std::size is only part of C++17, hence exposing a compliant implementation within namespace cm (cm::size). where possible, the standard implementations are reused.
* Replace empty-string comparisons with checking against `empty()`.Pavel Solodovnikov2017-09-211-2/+2
|
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-145/+105
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* clang-format: format all code as Cpp11Daniel Pfeifer2017-08-301-1/+1
|
* Use C++11 nullptrDaniel Pfeifer2017-08-241-10/+10
|
* Performance: Add an index to Change cmLocalGenerator::GeneratorTargets.Aaron Orenstein2017-08-161-13/+14
| | | | | | | | | | | Add an index to Change cmLocalGenerator::GeneratorTargets for faster lookup by name. Also changed a bunch of uses of cmLocalGenerator::GetGeneratorTargets() to take const references instead of copying the vector. Represent generator targets as a map (name -> target) to make name lookups more efficient instead of looping through the entire vector to find the desired one.
* Allow language extensions without any standard to use a list of optionsBrad King2017-07-141-1/+5
| | | | | | | Fix the logic added by commit a2112257 (Add infrastructure to use language extensions without any standard, 2017-06-29) to support a list of options as has been done since commit v3.9.0-rc1~174^2~2 (CompileFeatures: Let STD compile options be a list, 2016-10-05).
* Merge branch 'backport-fix-lang-std-option-list' into fix-lang-std-option-listBrad King2017-07-141-2/+10
|\
| * Features: Fix support for a list of language standard optionsBrad King2017-07-141-2/+10
| | | | | | | | | | | | The change in commit v3.9.0-rc1~174^2~2 (CompileFeatures: Let STD compile options be a list, 2016-10-05) did not change all the places we add the language standard options. Expand the list in the other places.
* | cmLocalGenerator: Explain standard flag selection logic in commentsBrad King2017-07-141-2/+7
| |
* | Merge topic 'android-system-include-last'Brad King2017-07-131-0/+14
|\ \ | | | | | | | | | | | | | | | | | | 4bafa392 Android: Always add standard include directories last Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1052
| * | Android: Always add standard include directories lastBrad King2017-07-131-0/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic added in commit v3.6.0-rc1~30^2 (Add a variable to specify language-wide system include directories, 2016-05-24) to use `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` incorrectly filters them by `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES`. Rather than recognizing this, commit v3.8.0-rc1~60^2 (Android: Pass sysroot include directory explicitly, 2017-01-20) worked around the problem by incorrectly removing `/usr/include` from `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` so it worked in `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES`. By not filtering out `/usr/include` from user-specified include directories, we allow the code include_directories(${CMAKE_SYSROOT}/usr/include) to place the include directory too early on the command line. Fix support for standard include directories to not be filtered by implicit include directories, and do not remove `/usr/include` from the list of implicit include directories for Android builds. Add a test case to verify that an explicit `/usr/include` is ignored in favor of the standard directory at the end. Fixes: #17059
* | Merge topic 'test_include_files'Brad King2017-07-131-0/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | 117033c1 Add TEST_INCLUDE_DIR[S] unit test ed5bde30 Add TEST_INCLUDE_FILES Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1031
| * | Add TEST_INCLUDE_FILESMatthew Woehlke2017-07-121-0/+11
| |/ | | | | | | | | | | | | | | | | | | Add new directory property TEST_INCLUDE_FILES. This supersedes TEST_INCLUDE_FILE, though the latter is of course retained for compatibility. Basically, this is a list rather than a single file. This allows the feature to be used by generic utilities without conflicting with local use.
* | Merge topic 'labels-for-subprojects'Brad King2017-07-131-0/+20
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 376dc3eb Help: Add notes for topic 'labels_for_subprojects' a70d8e93 Add tests for new directory labels and labels-for-subprojects features 47b3a57c Display subproject timing summary d3859624 Add directory property 'LABELS' and CMAKE_DIRECTORY_LABELS variable d08ec4d2 Add CTEST_LABELS_FOR_SUBPROJECTS as a CTest module and script variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1004
| * | Add directory property 'LABELS' and CMAKE_DIRECTORY_LABELS variableBetsy McPhail2017-07-101-0/+20
| | | | | | | | | | | | | | | The specified LABELS will be passed down to subdirectories as well as any targets or tests in the directory.
* | | Merge topic 'iar_improved'Brad King2017-07-071-7/+17
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d8e6cd9e IAR: Improve support for IAR ARM Compiler 0b1a2876 Add a CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID variable fea7d69d Store CMAKE_ASM_COMPILER_VERSION persistently d2a8b5ce CMakeDetermineASMCompiler: Fix small copy-paste mistake a2112257 Add infrastructure to use language extensions without any standard 8cd28bb0 cmLocalGenerator: Switch order of <LANG>_{EXTENSIONS,STANDARD} check 0fc2d78e cmLocalGenerator: Simplify logic for language standard or extension flag Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !991
| * | Add infrastructure to use language extensions without any standardBrad King2017-06-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `<LANG>_STANDARD` is not set we will not add any language standard flags. If `<LANG>_EXTENSIONS` is not OFF then our default is supposed to be ON. In order to support compilers that do not enable their extensions by default, check a `CMAKE_<LANG>_EXTENSION_COMPILE_OPTION` variable for an extensions flag to use without any language standard. Suggested-by: Norbert Lange <nolange79@gmail.com>
| * | cmLocalGenerator: Switch order of <LANG>_{EXTENSIONS,STANDARD} checkBrad King2017-06-291-5/+5
| | |
| * | cmLocalGenerator: Simplify logic for language standard or extension flagBrad King2017-06-291-2/+2
| |/
* | CPackDeb: Enable the DEB generator on WindowsNils Gladitz2017-06-281-0/+13
|/ | | | | | | | While some features require external Unix tools the generator is mostly portable. By enabling it on Windows it can be used for cross platform packaging.
* IPO: Consider support for each language separatelyBrad King2017-06-141-2/+2
| | | | | | | | | We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and Fortran languages. Do not try to enable support for other languages. Furthermore, each language builds with a different compiler, so check for support by CMake and the compiler for each language independently. Fixes: #16944
* Provide and use CM_FALLTHROUGHDaniel Pfeifer2017-06-031-1/+4
|
* Access string npos without instancePavel Solodovnikov2017-06-011-4/+4
|
* Add const-reference qualificationsPavel Solodovnikov2017-05-261-1/+1
|
* Merge topic 'add_cuda_cxx14_flag'Brad King2017-05-121-0/+1
|\ | | | | | | | | | | | | 036ffe81 CUDA: Add support for the C++14 standard flag. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !830
| * CUDA: Add support for the C++14 standard flag.Robert Maynard2017-05-111-0/+1
| | | | | | | | | | CUDA 9 toolkit has announced support for C++14 flag, so lets allow users to use it.
* | Add options for separate compile and link sysrootsBrad King2017-05-091-3/+22
|/ | | | | | | | | Add `CMAKE_SYSROOT_COMPILE` and `CMAKE_SYSROOT_LINK` variables to as operation-specific alternatives to `CMAKE_SYSROOT`. This will be useful for Android NDKs that compile and link with different sysroot values (e.g. `r14` with unified headers). Co-Author: Florent Castelli <florent.castelli@gmail.com>
* Merge topic 'add-language-standards-to-more-compilers'Brad King2017-05-021-1/+5
|\ | | | | | | | | | | | | | | | | | | 9b97cb55 PGI: Add language standards for PGI daae564d Cray: Add language standards for the Cray compiler 25e83ce5 CompileFeatures: Let STD compile options be a list 1de70845 Compilers: Add common macros to be used by various compilers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !784
| * CompileFeatures: Let STD compile options be a listChuck Atkins2017-05-011-1/+5
| |
* | Features: On SunPro link with language standard compiler flagBrad King2017-05-011-0/+9
| | | | | | | | | | | | When C++ feature requirements or `CXX_STANDARD` cause us to compile on SunPro with the `-std=c++11` option, link with the option too. This is needed to make the compiler use the matching standard library.
* | cmLocalGenerator: Add a hook for compiler flags used at link timeBrad King2017-05-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | When using a compiler to drive linking we add compiler flags from `CMAKE_<LANG>_FLAGS` in case they affect the way the compiler invokes the linker, but we don't add flags from other places that are meant only for compiling sources. Rather than calling the `AddLanguageFlags` method (which is used to add flags for compiling sources) directly, add an intermediate method that is used when adding the flags for linking. This will give us a way to add language-specific compiler flags needed when driving the linker in the same place on the command line as other compiler flags go.
* | Features: Refactor <LANG>_STANDARD updateBrad King2017-05-011-8/+25
|/ | | | | | | | | In order to support generator expressions in target COMPILE_FEATURES we apply them at generate time. Move this step to the beginning of generation instead of doing it on demand while collecting flags. This avoids repeating the process unnecessarily, and will then allow `cmLocalGenerator::AddCompilerRequirementFlag` to be used any time during generation.
* Clang IPO (LTO) supportRuslan Baratov2017-04-281-3/+37
|
* Add IPO compiler flags more consistently in generatorsBrad King2017-04-271-6/+7
| | | | | | Move addition of IPO flags into `cmLocalGenerator::AddLanguageFlags` because all call sites of that need the IPO flags, but not all were following the call with `AppendFeatureOptions`.
* CUDA: Allow sources to be compiled to .ptx filesRobert Maynard2017-04-201-3/+7
| | | | | When the target property `CUDA_PTX_COMPILATION` is enabled CUDA OBJECT libraries will generate ptx files instead of object files.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* Refactoring: s,GetFeatureAsBool,IsIPOEnabled,Ruslan Baratov2017-03-301-1/+1
| | | | | Method 'GetFeatureAsBool' is used only with 'INTERPROCEDURAL_OPTIMIZATION' feature. Substituting 'GetFeatureAsBool' with 'IsIPOEnabled'.
* Merge topic 'revert-CTestTestfile-removal'Brad King2017-03-071-7/+4
|\ | | | | | | | | | | | | 485685fd Revert "Remove CTestTestfile.cmake when BUILD_TESTING is OFF" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !553
| * Revert "Remove CTestTestfile.cmake when BUILD_TESTING is OFF"Brad King2017-03-061-7/+4
| | | | | | | | | | | | This reverts commit v3.8.0-rc1~305^2 (Remove CTestTestfile.cmake when BUILD_TESTING is OFF, 2016-11-14). It breaks projects that never enable testing but create their own `CTestTestfile.cmake` manually instead.
* | fix some include-what-you-use diagnosticsDaniel Pfeifer2017-02-171-1/+0
|/
* CUDA: Now pass correct FLAGS when device link cuda executables.Robert Maynard2017-01-121-1/+4
| | | | | | | | Previously we had a two issues when building cuda executables that required separable compilation. The first was that we didn't propagate FLAGS causing any -arch / -gencode flags to be dropped, and secondly generators such as ninja would use the CXX language flags instead of CUDA when the executable was mixed language.
* Features: Add infrastructure for C++ 17 language standardBrad King2016-12-021-0/+1
| | | | Issue: #16468
* Merge topic 'initial_cuda_language_support'Brad King2016-11-291-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4cc601f2 Help: Add release note for CUDA support 7b9131da CUDA: Add tests to verify CUDA compiler works properly. 9cf5b98d CUDA: Prefer environment variables CUDACXX and CUDAHOSTCXX. a5e806b3 CUDA: Add support for CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY d038559e CUDA: Add separable compilation support to the makefile generator. 43ce4414 CUDA: Add separable compilation support to the ninja generator. 4b316097 CUDA: Add support for the CUDA_SEPARABLE_COMPILATION target property ae05fcc6 CUDA: Add LinkLineComputer that computes cuda dlink lines. 115269a8 CUDA: Refactor cmLinkLineComputer to allow for better derived children. 5dec4031 CUDA: Refactor CMakeCUDAInformation to prepare for separable compilation. 5b20d0ab CUDA: C++ compile features now enable cuda c++11 support. 489c52ce CUDA: Use the host compiler for linking CUDA executables and shared libs. bbaf2434 CUDA: add support for specifying an explicit host compiler. a92f8d96 CUDA: Enable header dependency scanning. ec6ce623 CUDA: State that cuda has preprocessor output and can generate assembly. 4f5155f6 CUDA: We now properly perform CUDA compiler identification. ...
| * CUDA: Use the host compiler for linking CUDA executables and shared libs.Robert Maynard2016-11-141-0/+2
| |
| * CUDA: Add support language levels (98/11)Robert Maynard2016-11-141-0/+3
| |
* | Remove CTestTestfile.cmake when BUILD_TESTING is OFFSylvain Joubert2016-11-151-4/+7
|/ | | | | | | | When disabling BUILD_TESTING after a previous configure, the `CTestTestfile.cmake` was left unchanged. As a result, ctest would see the tests while the user disabled testing. Now when BUILD_TESTING is OFF any existing `CTestTestfile.cmake` is removed ensuring an empty test list.