summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'lint-function-args'Brad King2017-06-051-2/+2
|\ | | | | | | | | | | | | b1ec5dea Pass large types by const&, small types by value Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !927
| * Pass large types by const&, small types by valueDaniel Pfeifer2017-06-031-2/+2
| |
* | Provide and use CM_FALLTHROUGHDaniel Pfeifer2017-06-031-0/+3
|/
* Remove second arg: npos in substr usagesPavel Solodovnikov2017-06-011-1/+1
|
* Access string npos without instancePavel Solodovnikov2017-06-011-2/+2
|
* Features: Refactor <LANG>_STANDARD updateBrad King2017-05-011-0/+12
| | | | | | | | | 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.
* Merge topic 'include-style'Brad King2017-04-131-4/+4
|\ | | | | | | | | | | | | | | | | 1d829c86 Use quotes for non-system includes 26ee9e42 CPack: drop CPack prefix for includes 5afac50f cmConfigure: Ensure separate include block in headers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !691
| * Use quotes for non-system includesDaniel Pfeifer2017-04-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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'
* | cmGlobalGenerator: Abort generation earlier on export() errorBrad King2017-04-111-4/+5
|/
* Add GENERATOR_IS_MULTI_CONFIG global propertyBastien Schatt2017-04-041-0/+1
| | | | Fixes: #16768
* Apple: Fix Resources location for all generatorsGregor Jasny2017-03-231-0/+5
| | | | Issue: #16680
* fix include order of windows.hDaniel Pfeifer2017-03-141-7/+8
| | | | | | Comments that indicate a special include order is necessary because GetCurrentDirectory might get redefined are outdated. Remove those outdated comments and use the normal ordering of includes.
* cmWorkingDirectory: use the new classBen Boeckel2017-03-061-7/+2
| | | | | | These functions just need to change the directory for a block of code and then go back to the caller's expected location. Use cmWorkingDirectory to ensure that all return paths are handled.
* Add policy CMP0068 separate install_name and RPATH settings on macOSClinton Stimpson2017-02-141-0/+25
| | | | | | | | BUILD_WITH_INSTALL_RPATH, SKIP_BUILD_RPATH, CMAKE_SKIP_RPATH and CMAKE_SKIP_INSTALL_RPATH no longer any effect on the install name of a target on macOS. Fixes: #16589
* Xcode: Control emission of EFFECTIVE_PLATFORM_NAMEGregor Jasny2017-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with multiple SDKs within one project Xcode requires the usage of ${EFFECTIVE_PLATFORM_NAME} to put temporary and build outout into separate directories. For example an iOS device and simulator build use two different SDKs (iphoneos and iphonesimulator). In the past cmake tries to detect embedded toolchains that could possibly use simulators and emitted EFFECTIVE_PLATFORM_NAME (EPN) at the proper locations. In #16253 Mark noticed that if he uses macosx and iphoneos in combination the necessary EPN is not emitted. This is because CMake by default assumes macosx SDK which does not trigger EPN emission. The fist naive approach - enabling EPN unconditionally revealed that then the EPN leaks into generator expressions like $<TARGET_FILE:xxx> which might be a regression and thus is unacceptable. The next approach was to add an CMake property to enable EPN emission unconditionally. This solved the reported problem. But the EPN leakage also happened for the embedded toolchains already without anyone noticing. So the control property was turned into a tri-state one: * No definition: EPN is activated for embedded toolchains like before * ON: EPN is always emitted * OFF: EPN is never emitted That approach gives the user the chance to disable EPN for embedded toolchains and restores generator expression functionality for those. Closes: #16253
* Tolerate removed/replaced CMakeCache.txt with old CMakeFiles/Brad King2016-11-171-0/+20
| | | | | | | | | | | Users or scripts commonly remove or replace `CMakeCache.txt` without also removing `CMakeFiles/`. In this case the information saved in the cache from platform information initialization is missing, so we need to re-initialize it. In such a case, remove the platform information directory so that re-initialization will occur and restore needed information to the cache. Closes: #14820
* Merge topic 'import-librhash'Brad King2016-11-101-9/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cd8a57ae Add option to build CMake against a system librhash 71180fc8 FindLibRHash: Add module to find the librhash package 3216e94c Remove unused cm_sha2 infrastructure 5420278d Port hash computation to cmCryptoHash 9a596b33 cmCryptoHash: Re-implement in terms of librhash 47f91a61 cmCryptoHash: Avoid using subclasses at client sites d0ff3e70 librhash: Port to KWIML for ABI and integer type information 465a85fb librhash: Avoid signed left-shift overflow fc2cb74f librhash: Implement bswap_32 as a function even in strict C90 mode 0bd333bc librhash: Implement bswap_64 even in strict C90 mode 7189d62c librhash: Use __builtin_bswap{32,64} on Clang af7ebf8a librhash: Install COPYING file with CMake documentation bb01f20e librhash: Disable warnings to avoid changing 3rd party code 31bb727f librhash: Build the library within CMake 53048afa librhash: Remove source fragments not needed for CMake 5cb1b345 Merge branch 'upstream-librhash' into import-librhash ...
| * Port hash computation to cmCryptoHashBrad King2016-11-101-9/+4
| | | | | | | | | | Avoid using KWSys MD5 or `cm_sha2` and use the `cmCryptoHash` abstraction instead.
* | Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-10/+11
|/
* cmGlobalGenerator: Allow FindMakeProgram to failBrad King2016-10-201-3/+7
| | | | | Revise its signature to return `bool` so that it can fail and abort configuration early.
* cmListFileCache: Remove cmState header includeStephen Kelly2016-10-191-0/+1
| | | | | Include it in dependents which have previously relied on it transitively.
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* cmState: Port dependent code to new cmStateSnapshot nameStephen Kelly2016-10-191-7/+7
|
* cmState: Port dependent code to new cmStateDirectory nameStephen Kelly2016-10-191-2/+2
|
* cmState: Move CacheEntryType enum to separate namespaceStephen Kelly2016-10-191-4/+4
| | | | Port dependent code to the change.
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-14/+14
|
* Factor IDE folder name retrieval out into helper methodGregor Jasny2016-10-171-1/+1
| | | | | | Add a `cmGeneratorTarget::GetEffectiveFolderName` helper to abstract lookup of the `FOLDER` property in combination with checking for generator support of folders.
* cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGeneratorStephen Kelly2016-10-101-4/+4
| | | | | | | | | | | | | | | Add a cmOutputConverter to the cmLinkLineComputer and factory methods to facilitate shell escapes. Add state to the cmLinkLineComputer to record whether outputting for response files or for watcom, to satisfy the cmOutputConverter API. These are constant for the lifetime of the cmLinkLineComputer, even when its functionality is extended in the future. This also keeps the signatures of cmLinkLineComputer relatively simple. Pass the cmComputeLinkInformation as a method parameter so that cmLinkLineComputer is free from target-specific state. An instance should be usable for all targets in a directory.
* cmLinkLineComputer: Extract from cmLocalGeneratorStephen Kelly2016-10-101-0/+14
| | | | | | | | | | | CMake has several classes which have too many responsibilities. cmLocalGenerator is one of them. Start to extract the link line computation. Create generator-specific implementations of the interface to account for generator-specific behavior. Unfortunately MSVC60 has different behavior to everything else and CMake still generates makefiles for it. Isolate it with MSVC60-specific names.
* cmGlobalGenerator: Add API to get settings from top-level cmMakefileStephen Kelly2016-10-061-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | At generate-time, definitions are sometimes read from a nearby cmMakefile, making the value directory-specific because they are read once per directory. Often however, the intention is more often to create a 'global' setting, such that the user writes for example: set(CMAKE_IMPORT_LIBRARY_SUFFIX something) once at the top level of their project. Many of these are also set by internal platform files, such as CMAKE_EXTRA_LINK_EXTENSIONS. The set() definitions are not really suitable for 'global' settings because they can be different for each directory, and code consuming the settings must assume they are different for each directory, and read it freshly each time with new allocations. CMake has other variable types which are global in scope, such as global properties, and cache variables. These are less convenient to populate for users, so establish a convention and API using the value as it is at the end of the top-level CMakeLists file.
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* cmGlobalGenerator: Optimize FindMakefile method with an indexBrad King2016-09-261-6/+17
| | | | | | | This method is used by directory get/set APIs. With the new `SUBDIRECTORIES` and `BUILDSYSTEM_TARGETS` methods projects may now make heavy use of these APIs to traverse their directory structure and process targets. Make this faster by indexing the directory lookups.
* Ninja: Refactor Fortran rejection logicBrad King2016-09-221-0/+10
| | | | | | | | | Delay rejection of Fortran until after we've determined the version of the `ninja` tool to be used. This will later allow us to enable Fortran support based on the version of ninja. While at it, make the rejection an immediate fatal error. Also provide a stack trace so readers know what code tried to enable Fortran.
* Convert: Avoid HOME_OUTPUT enum when converting to relative pathsStephen Kelly2016-09-191-1/+1
|
* Merge topic 'find-package-mode-fixes'Brad King2016-09-191-0/+1
|\ | | | | | | | | | | a098ca0d cmake: Fix --find-package mode link line output d9c600c5 cmGlobalGenerator: Fix use of uninitialized value in --find-package mode
| * cmGlobalGenerator: Fix use of uninitialized value in --find-package modeBrad King2016-09-161-0/+1
| |
* | cmGlobalGenerator: Refactor global target constructionBrad King2016-09-151-109/+95
| | | | | | | | | | | | Avoid using partially-constructed cmTarget instances. Collect the information about how to construct each target in a separate structure and then actually create each cmTarget with full construction.
* | cmGlobalGenerator: Split CreateDefaultGlobalTargets implementationBrad King2016-09-151-35/+51
|/ | | | | Divide this long method into multiple helpers each dedicated to one of the targets. This also avoids having to clear/re-use local structures.
* cmTarget: Construct with basic information up frontBrad King2016-09-141-2/+2
| | | | | Avoid having partially constructed cmTarget instances around, except for the special case of GLOBAL_TARGET construction.
* Avoid requiring default cmTarget constructor for map indexingBrad King2016-09-141-32/+52
| | | | | | The `std::map<>` index operator requires a default constructor on the value type. Avoid requiring a default constructor on `cmTarget` just for this purpose.
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-6/+14
|
* Convert: Replace trivial conversion with new methodStephen Kelly2016-08-271-2/+2
|
* Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-161-9/+12
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-26/+28
|
* Remove redundant arguments from fstream constructorsDaniel Pfeifer2016-06-141-1/+1
| | | | Don't pass the default value of the openmode parameter explicitly.
* cmGlobalGenerator: Don't use cmMakefile::IssueMessage after configureStephen Kelly2016-06-121-3/+4
|
* Simplify boolean expressionsDaniel Pfeifer2016-06-021-2/+1
| | | | | | Use clang-tidy's readability-simplify-boolean-expr checker. After applying the fix-its, revise all changes *very* carefully. Be aware of false positives and invalid changes.
* Pass arguments that are not modified as const&.Daniel Pfeifer2016-05-261-1/+1
| | | | | | | Use clang-tidy's performance-unnecessary-value-param checker to find value parameter declarations of expensive to copy types that are not modified inside the function. Ignore findings in kwsys. After applying the fix-its, manually change `const T&` to `T const&`.
* Merge topic 'standard-include-directories'Brad King2016-05-251-0/+20
|\ | | | | | | | | | | | | c1340827 Add a variable to specify language-wide system include directories 44199097 cmMakefile: Optimize AddSystemIncludeDirectories for empty set a896043b GHS: Compute include directories consistently with other generators
| * Add a variable to specify language-wide system include directoriesBrad King2016-05-251-0/+20
| | | | | | | | | | | | | | Create a `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` variable to specify system include directories for for `<LANG>` compiler command lines. This plays a role for include directories as the existing `CMAKE_<LANG>_STANDARD_LIBRARIES` variable does for link libraries.