summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.h
Commit message (Collapse)AuthorAgeFilesLines
* Treat the '.mpp' file extension as C++ codeBen Boeckel2021-01-051-1/+1
| | | | This is the extension required in build2 for C++ module support.
* GENERATED prop: Add implementation for policy CMP0118 being set to NEWDeniz Bahadir2020-11-241-8/+28
| | | | | | | | | | | | | | | | | | * Adding implementation for policy CMP0118 being set to `NEW`. * Adding new tests for policy CMP0118 being set to `NEW`. * Checking the `GENERATED` property with `get_source_file_property` or `get_property` now always returns exactly `1` or `0`. No other values will be returned. Note, that this is a backwards-incompatible change, even when policy CMP0118 is unset or set to `OLD`. * Additionally, as `get_source_file_property` and `get_property` now always check if a source-file was marked globally visible, even when CMP0118 is unset or set to `OLD`, they possibly return `1` where they might have returned `0` before the changes introduced by this commit. Note, that this is a backwards-incompatible change, even when policy CMP0118 is unset or set to `OLD`. * As a consequence, the tests for policy CMP0118 being unset or set to `OLD` got slightly adjusted, too, to reflect these changes in behavior.
* cmSourceFile::GetPropertyForUser: return cmPropVitaly Stakhovsky2020-11-041-2/+2
| | | | also fix GetSafeProperty() return type
* CMP0115: Require source file extensions to be explicitKyle Edwards2020-10-131-2/+3
|
* Modernize: Use #pragma once in all header filesKitware Robot2020-09-031-4/+1
| | | | | | | | | | | | | | | | #pragma once is a widely supported compiler pragma, even though it is not part of the C++ standard. Many of the issues keeping #pragma once from being standardized (distributed filesystems, build farms, hard links, etc.) do not apply to CMake - it is easy to build CMake on a single machine. CMake also does not install any header files which can be consumed by other projects (though cmCPluginAPI.h has been deliberately omitted from this conversion in case anyone is still using it.) Finally, #pragma once has been required to build CMake since at least August 2017 (7f29bbe6 enabled server mode unconditionally, which had been using #pragma once since September 2016 (b13d3e0d)). The fact that we now require C++11 filters out old compilers, and it is unlikely that there is a compiler which supports C++11 but does not support #pragma once.
* Single location for cmProp typedefVitaly Stakhovsky2020-06-011-2/+1
|
* PCH: Fix source group of per-architecture PCH headersBrad King2020-05-221-1/+1
| | | | | | | In commit f593b354da (PCH: Add support for multi architecture iOS projects, 2020-04-02) we forgot to update our regex that assigns PCH headers to the `Precompile Header File` source group to account for the `_<arch>` suffix that can now appear on their name.
* cmSourceFile::GetProperty: return cmPropVitaly Stakhovsky2020-04-141-1/+3
|
* AppendProperty: convert value param to std::stringVitaly Stakhovsky2020-01-251-1/+1
|
* Fortran: Add .F extension to Source Files groupJohnny Jazeix2019-10-231-3/+2
| | | | | | While at it, improve source layout of the regex string literal. Fixes: #8768
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-4/+4
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* cmSourceFile: Add backtraces for a few source propertiesJustin Goshi2019-09-261-0/+22
| | | | | Adding backtrace support for INCLUDE_DIRECTORIES, COMPILE_OPTIONS, and COMPILE_DEFINITIONS.
* cmSourceFile: Remove non-const GetProperties accessorDaniel Eiband2019-09-211-1/+2
| | | | | | Manipulating the property map of cmSourceFile directly may invalidate the class invariant of the cached value IsGenerated. Provide the setter SetProperties which also updates IsGenerated.
* Precompile Headers: Add precompile header file to source listCristian Adam2019-09-191-0/+2
| | | | | | | The precompile header file will be added to the list of files, and be part of the newly "Precompile Header File" source group. Also make sure the sources have the header as dependency.
* cmSourceFile: use unique_ptr for CustomCommandTushar Maheshwari2019-09-131-11/+6
|
* cmSourceFile: Rename mutating GetFullPath() overloadDaniel Eiband2019-08-291-7/+8
| | | | Rename mutating GetFullPath() overload to ResolveFullPath().
* cmSourceFile: Rename non-const GetLanguageTushar Maheshwari2019-08-271-1/+1
| | | | | | | | GetOrDetermineLanguage: - Read the property if available - Determine the Language using the file extension Fix all usage of the non-const member in the repository.
* Fix invalid ///! doxygen comment line startsSebastian Holtermann2019-03-311-4/+4
| | | | | In various places `///!` was used to start a comment line. This is not valid Doygen syntax. This patch replaces `///!` comment starts with `//!`.
* Delete some default constructors and assignment operatorsAlbert Astals Cid2019-02-151-0/+3
| | | | | | They are unused, but if someone used them they would lead to problems since they would copy the internal raw pointers and the destructor would cause double delete
* cmSourceFile: Refactor FindFullPath methodSebastian Holtermann2019-02-021-1/+0
| | | | | Refactors the cmSourceFile::FindFullPath method to use lambdas.
* cmSourceFile: Add IsGenerated methodSebastian Holtermann2019-02-011-2/+7
| | | | | | | All cmSourceFiles are checked at least once whether they're `GENERATED` or not. This adds a convenience method `GetIsGenerated` that returns a private boolean cache variable `IsGenerated`. `IsGenerated` is updated every time the `GENERATED` property is written.
* cmSourceFile: Additional static property stringsSebastian Holtermann2019-02-011-0/+2
|
* Add GetSafeProperty method to cmTarget, cmGeneratorTarget and cmSourceFileSebastian Holtermann2018-07-021-0/+3
|
* cmSourceFile: mark known locations as suchBen Boeckel2018-01-101-0/+1
| | | | | | | | | | Primarily, this includes: - the rule files generated for custom targets; - source files representing custom targets directly; - outputs of custom commands; - byproducts of custom commands; and - dependencies of custom commands.
* cmSourceFileLocation: allow skipping ambiguous extensionsBen Boeckel2018-01-101-1/+3
| | | | | | | | | | | The ambiguous extension logic is an old behavior that ends up taking lots of extra compute cycles to execute. This is triggered by various CMake codepaths which pass extension-less paths down when CMake actually knows that they are not ambiguous. These codepaths will be indicated in upcoming changes. Various APIs have gained a cmSourceFileLocationKind parameter, but they are all optional and default to the existing behavior.
* CUDA: Add cu as default source file extensionRobert Maynard2018-01-081-1/+2
|
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+1
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-1/+1
|
* Remove AUTOGEN variables from cmSourceFile and cmMakefileSebastian Holtermann2017-08-221-1/+0
|
* Add more extensions to Resources source group by defaultUfoXp2017-07-101-0/+6
| | | | | | | | | Extend the Resources group regex to match pdf, png, jpeg, jpg, storyboards, and xcassets. This cleans up more complex Xcode projects a lot. While at it, factor the regular expressions for both "Resources" and "Source Files" into macros.
* 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'
* VS: add VS_CSHARP_<tagname> sourcefile propertyMichael Stürmer2017-03-011-0/+1
|
* 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.
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-3/+7
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-1/+1
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-8/+7
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* cmSourceFile: Re-arrange data.Stephen Kelly2015-06-071-2/+2
| | | | Size goes from 304 to 296 bytes.
* cmSourceFile: Take a stringBen Boeckel2014-04-291-1/+1
|
* perf: Cache the language property stringBen Boeckel2014-04-291-0/+2
|
* cmSourceFile: Cache the isUiFile checkBen Boeckel2014-04-291-0/+1
| | | | The filename extension call is expensive, so cache the .ui check.
* Remove extra semicolons from C++ code.Stephen Kelly2014-04-031-1/+1
| | | | | Clang based tools running over the code complain about these, but clang has a fixit for removing them.
* Genex: Evaluate TARGET_OBJECTS as a normal expression.Stephen Kelly2014-03-311-0/+4
|
* stringapi: Use strings for the languagesBen Boeckel2014-03-081-2/+2
|
* stringapi: Use strings for TryFullPathBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings for source namesBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings for property namesBen Boeckel2014-03-081-5/+6
| | | | Property names are always generated by CMake and should never be NULL.
* Drop builtin property documentationBrad King2013-10-161-3/+0
| | | | | | Drop all DefineProperty calls for non-chained properties. Drop the documentation from the chained ones. The documentation for all properties is now in Help/prop_*/*.rst files.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-1/+1
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Classify known header file extensions as headersBrad King2012-03-281-0/+3
| | | | | | | | | | Commit 328c0f65 (Simplify cmVisualStudio10TargetGenerator source classification, 2012-03-19) introduced the first use of source classification from cmGeneratorTarget (which originated as Makefile generator logic) in a Visual Studio generator for handling of header files. Fix classification of header files to match known header extensions instead of only the HEADER_FILE_ONLY property. Make it consistent with the "Header Files" source group.