summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmSourceFile: Check if a file is GENERATED first in the full path computationSebastian Holtermann2019-02-021-5/+5
| | | | | | | In `cmSourceFile::FindFullPath` check first if the file is GENERATED before aborting on `FindFullPathFailed`. This allows recomputation of the full path when the GENERATED property was set after the file path was computed with an error.
* cmSourceFile: Refactor FindFullPath methodSebastian Holtermann2019-02-021-62/+59
| | | | | Refactors the cmSourceFile::FindFullPath method to use lambdas.
* Use cmSourceFile::GetIsGeneratedSebastian Holtermann2019-02-011-1/+1
|
* cmSourceFile: Add IsGenerated methodSebastian Holtermann2019-02-011-2/+10
| | | | | | | 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-3/+5
|
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-1/+3
| | | | Reduce the number of files relying on `cmake.h`.
* cmMakefile: return directories as const std::string&Vitaly Stakhovsky2018-08-271-2/+2
|
* Add GetSafeProperty method to cmTarget, cmGeneratorTarget and cmSourceFileSebastian Holtermann2018-07-021-0/+9
|
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-1/+1
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* cmSourceFileLocation: allow skipping ambiguous extensionsBen Boeckel2018-01-101-2/+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.
* Various typo fixesLuz Paz2018-01-031-1/+1
| | | | Some are user-facing. Others are source comments.
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-12/+8
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* cmSourceFile: Avoid unnecessary vector copySebastian Holtermann2017-08-261-4/+4
|
* Use C++11 nullptrDaniel Pfeifer2017-08-241-4/+4
|
* Remove AUTOGEN variables from cmSourceFile and cmMakefileSebastian Holtermann2017-08-221-9/+0
|
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-3/+2
|
* 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
|
* 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-0/+5
|
* CMake: don't use else after returnDaniel Pfeifer2016-08-181-2/+1
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-4/+4
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-126/+82
| | | | | | | | | | | | | 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.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* cmake: Store hardcoded lists of sources and headersStephen Kelly2015-10-271-2/+4
| | | | Don't duplicate this in each cmMakefile.
* Remove unused cmLocalGenerator include.Stephen Kelly2015-10-051-1/+0
|
* cmPropertyMap: Remove chaining logic.Stephen Kelly2015-06-071-6/+8
| | | | | | | The chaining logic doesn't belong to the container, and the CMakeInstance pointer doesn't need to be in cmPropertyMap. Size goes from 56 to 48 bytes with GNU libstdc++-5.1.
* cmPropertyMap: Remove scope parameter from API where not used.Stephen Kelly2015-06-071-3/+2
|
* Port to cmMakefile::GetGlobalGenerator.Stephen Kelly2015-05-031-1/+1
|
* cmMakefile: Rename GetCurrent{Output,Binary}Directory.Stephen Kelly2015-04-201-1/+1
| | | | Match names used in CMake code.
* cmMakefile: Rename GetCurrent{,Source}Directory.Stephen Kelly2015-04-201-1/+1
| | | | Match the names used in cmake code.
* Merge topic 'fix-autouic-regression'Brad King2015-01-121-1/+1
|\ | | | | | | | | | | 9a673737 QtAutoUic: Add a test for the regression in the parent commit. 7c585699 QtAutoUic: Restore source file AUTOUIC_OPTIONS settings
| * QtAutoUic: Restore source file AUTOUIC_OPTIONS settingsJustin Borodinsky2015-01-111-1/+1
| | | | | | | | | | | | The "." in the extension was dropped by commit v3.1.0-rc1~556^2~2 (cmSourceFile: Cache the isUiFile check, 2014-02-08) by mistake. This caused the options to not be set.
* | Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-1/+1
| | | | | | | | All compilers hosting CMake support the std class.
* | strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-1/+1
|/ | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* perf: Cache the language property stringBen Boeckel2014-04-291-2/+4
|
* cmSourceFile: Cache the isUiFile checkBen Boeckel2014-04-291-3/+3
| | | | The filename extension call is expensive, so cache the .ui check.
* Genex: Evaluate TARGET_OBJECTS as a normal expression.Stephen Kelly2014-03-311-0/+12
|
* Remove some c_str() calls.Stephen Kelly2014-03-111-3/+3
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* stringapi: Use strings for the languagesBen Boeckel2014-03-081-5/+6
|
* stringapi: Use strings for TryFullPathBen Boeckel2014-03-081-4/+5
|
* stringapi: Use strings for source namesBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings for property namesBen Boeckel2014-03-081-17/+8
| | | | Property names are always generated by CMake and should never be NULL.
* cmSourceFile: Use a const cmMakefile.Stephen Kelly2014-01-221-5/+5
|
* Add automatic uic invocation for Qt.Stephen Kelly2013-10-241-0/+11
| | | | | | | | | | | | The source files are already processed by cmQtAutomoc to look for moc includes, so extend that to also look for ui_ includes and find corresponding .ui files to process. This replaces the need to invoke qt4_wrap_ui(). As the ui files are not likely to be part of the SOURCES of the target, store the options associated with them separately in the cmMakefile for querying during the autogen run.
* Drop builtin property documentationBrad King2013-10-161-174/+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.
* Fix spelling and typos (affecting binary data / module messages)Andreas Mohr2013-05-071-2/+2
|
* Documentation: Correct typos and grammarAndreas Mohr2012-11-071-1/+1
|
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-15/+15
| | | | | | | | | | | | | | | | | 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/ \+$//'
* Fortran: Add support for free- and fixed-form flagsBrad King2011-08-311-0/+9
| | | | | | | Define a "Fortran_FORMAT" target and source file property. Initialize the target property from a "CMAKE_Fortran_FORMAT" variable. Interpret values "FIXED" and "FREE" to indicate the source file format. Append corresponding flags to the compiler command line.