summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraSublimeTextGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* genex: Simplify cmGeneratorExpressionInterpreterBrad King2018-09-071-6/+6
| | | | | | | | | All callers were constructing with a non-empty target name using the target whose pointer was passed anyway. Drop this argument. Simplify logic accordingly. Re-order constructor arguments to match the cmCompiledGeneratorExpression::Evaluate arguments. Also remove unnecessary getters.
* cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-1/+1
| | | | | | | | | | | | | | | After changing the ``cmGeneratedFileStream`` methods to accept ``std::string const&`` instead of ``const char*`` we don't need to call ``std::string::c_str`` anymore when passing a ``std::string`` to a ``cmGeneratedFileStream`` method. This patch removes all redundant ``std::string::c_str`` calls when passing a string to a ``cmGeneratedFileStream`` method. It was generated by building CMake with clang-tidy enabled using the following options: -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-2/+3
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * 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.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-2/+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.
* sourceFile properties: add property INCLUDE_DIRECTORIESMarc Chevrier2018-01-241-10/+32
|
* sourceFile properties: add property COMPILE_OPTIONSMarc Chevrier2018-01-231-2/+9
| | | | | | | Add the support of per-source property COMPILE_OPTIONS, including generator expressions support. Related: #17507
* Genex: Per-source $<COMPILE_LANGUAGE:...> supportMarc Chevrier2017-12-131-7/+13
| | | | Fixes: #17542
* Add generator expression support to per-source COMPILE_DEFINITIONSMarc Chevrier2017-12-051-5/+9
| | | | | | This allows users to specify different genex-based compile definitions for each file in a target. Fixes: #17508
* Refactor per-source generator expression evaluationMarc Chevrier2017-12-041-3/+2
| | | | | | Prepare to add generator expression support to more source properties. Factor out some duplicated code into a helper to avoid further duplication.
* cmake: Add --open option for IDE generatorsGregor Jasny2017-10-131-0/+23
|
* Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-1/+1
|
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-32/+23
| | | | | | 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-5/+5
|
* Performance: Add an index to Change cmLocalGenerator::GeneratorTargets.Aaron Orenstein2017-08-161-2/+3
| | | | | | | | | | | 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.
* 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'
* Sublime: Do not build with verbose outputRichard Collins2017-01-101-9/+3
| | | | Remove the hard-coded use of `make VERBOSE=1` and `ninja -v`.
* clang-tidy: apply readability-redundant-string-init fixesDaniel Pfeifer2016-12-121-1/+1
|
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-6/+8
|
* Merge topic 'src-COMPILE_FLAGS-genex'Brad King2016-11-011-1/+5
|\ | | | | | | | | | | 9a58517d Tests: Add case for Xcode per-config per-source COMPILE_FLAGS diagnostic 1e4bb358 Add generator expression support to per-source COMPILE_FLAGS
| * Add generator expression support to per-source COMPILE_FLAGSZsolt Parragi2016-10-281-1/+5
| | | | | | | | | | | | This allows users to specify different genex-based compile flags for each file in a target, e.g. compiling just a single file with `Od/Ox` in release builds on Visual Studio.
* | Sublime: Add option to specify env vars for the .sublime-projectBruno Pedrosa2016-10-271-1/+33
|/ | | | | | | Create a `CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS` variable to control addition of env vars in the `.sublime-project`. Closes: #16387
* Merge topic 'st2-fix-regex'Brad King2016-10-251-1/+3
|\ | | | | | | | | 9f1429e2 Sublime: Update generated diagnostic matching expression for MSVC
| * Sublime: Update generated diagnostic matching expression for MSVCBruno Pedrosa2016-10-241-1/+3
| | | | | | | | | | | | | | | | | | | | Update the generated `file_regex` to match MSVC-style messages in addition to the GCC-style messages already matched. Use non-capturing sub-patterns to tolerate the differences in message formats while still capturing the four pieces of information in proper group numbers (file name, line number, column number, message). Closes: #16375
* | cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
| |
* | cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-7/+7
|/
* Sublime: Exclude build tree from source tree project only optionallyBruno Pedrosa2016-10-121-2/+9
| | | | | | | | Create a `CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE` variable to control addition of the build tree to `folder_exclude_patterns` in the `.sublime-project`. Change the default of this behavior to OFF. Closes: #16351
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+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-4/+7
|
* Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-161-2/+1
|
* issues: update references to the CMake issue trackerBen Boeckel2016-08-151-1/+1
| | | | | References to specific comments are left as-is since comments were not migrated.
* Refactor extra generator registration to use factoriesTobias Hunger2016-08-031-12/+18
| | | | | | | | | | | This will allow additional information about the availability and capabilities of extra generators to be queried without actually creating them. Instead of a static NewFactory() method like the main generator factories have, use a static GetFactory() method to get a pointer to a statically allocated extra generator factory. This simplifies memory management.
* use CM_NULLPTRDaniel Pfeifer2016-06-281-6/+7
|
* cmExtraSublimeTextGenerator: Use GetTargetCompileFlagsTobias Hunger2016-06-171-24/+3
| | | | | | Replace some custom code with equivalent code from the framework. This also fixes some fixmes left in the custom code.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-214/+158
| | | | | | | | | | | | | 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-1/+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.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* 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.
* Sublime: Port API to cmGeneratorTarget.Stephen Kelly2015-10-241-9/+6
|
* Port to GetGeneratorTargets.Stephen Kelly2015-10-241-12/+14
|
* cmGeneratorTarget: Move GetExportMacro from cmTarget.Stephen Kelly2015-10-201-1/+1
|
* cmLocalGenerator: Port some API to cmGeneratorTarget.Stephen Kelly2015-10-171-3/+3
|
* cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-7/+7
| | | | | | | Mostly automated: values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType") for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
* Sublime: Port some API to cmGeneratorTarget.Stephen Kelly2015-10-121-9/+8
|
* cmLocalGenerator: Add current binary directory accessor.Stephen Kelly2015-10-101-2/+1
|
* cmLocalGenerator: Add Home directory accessors.Stephen Kelly2015-10-081-6/+6
| | | | Reduce reasons for cmLocalGenerator to have a cmMakefile.
* cmLocalGenerator: Add GetProjectName method.Stephen Kelly2015-10-081-2/+2
|
* Access sources through cmGeneratorTarget.Stephen Kelly2015-10-071-1/+1
|
* cmExtra{Kate,SublimeText}Generator: Remove unused cmXMLSafe includesDaniel Pfeifer2015-08-281-1/+0
|
* cmMakefile: Port users of GetStart* methods to new names.Stephen Kelly2015-04-201-2/+2
|