summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraKateGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-155/+118
| | | | | | | | | | | | | 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.
* Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang-format tool can do a good job formatting most code, but well-organized streaming blocks are best left manually formatted. Find blocks of the form os << "...\n" "...\n" ; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}' Find blocks of the form os << "...\n" << "...\n" << "...\n"; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}' Surround such blocks with the pair /* clang-format off */ ... /* clang-format on */ in order to protect them from update by clang-format. Use the C-style `/*...*/` comments instead of C++-style `//...` comments in order to prevent them from ever being swallowed by re-formatting of surrounding comments.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove some obsolete declarationsStephen Kelly2015-10-271-1/+0
| | | | | | | | | | | | | Ensure that cmStandardIncludes.h is included before any platform header in cmGeneratorExpressionEvaluator.h. That file needs to change as a result of removal of the cmMakefile.h header from cmGeneratorExpressionNode.h, affecting the compilation of cmGeneratorExpressionNode.cxx. On AIX we need to include our own headers first to get large file support macros defined consistently within system headers. The old order in this header worked only because it was always included after other headers.
* Port to GetGeneratorTargets.Stephen Kelly2015-10-241-14/+17
|
* 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
* cmLocalGenerator: Add current binary directory accessor.Stephen Kelly2015-10-101-1/+1
|
* cmLocalGenerator: Add Home directory accessors.Stephen Kelly2015-10-081-16/+13
| | | | Reduce reasons for cmLocalGenerator to have a cmMakefile.
* Kate: Remove unused variables.Stephen Kelly2015-10-081-3/+0
|
* Kate: Port API to cmLocalGenerator.Stephen Kelly2015-10-081-6/+12
|
* cmLocalGenerator: Add GetProjectName method.Stephen Kelly2015-10-081-3/+3
|
* cmExtra{Kate,SublimeText}Generator: Remove unused cmXMLSafe includesDaniel Pfeifer2015-08-281-1/+0
|
* Use cmSystemTools::GetCMakeCommand() to get path to cmake internallyBrad King2015-05-201-1/+1
| | | | | This is much simpler than finding a way to lookup "CMAKE_COMMAND" everywhere.
* cmMakefile: Rename GetCurrent{Output,Binary}Directory.Stephen Kelly2015-04-201-1/+1
| | | | Match names used in CMake code.
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
|
* stringapi: Use strings for generator namesBen Boeckel2014-03-081-2/+2
|
* Kate: handle spaces in build dirAlex Neundorf2014-02-171-9/+9
| | | | | | | | They need to be escaped in the json file... I'm quite sure I tested this before, obviously I didn't test it correctly. Alex
* Kate: use cmMakefile::GetSafeDefinition() for a not-required variableAlex Neundorf2014-01-171-1/+1
| | | | | | | | | ...otherwise the generator failed in embedded projects via externalproject(), since there CMAKE_KATE_MAKE_ARGUMENT is not set. Using GetSafeDefinition() is good enough to protect against NULL-pointers. Alex
* kate: put full path to cmake into commentAlex Neundorf2013-12-291-1/+2
| | | | Alex
* kate: support also the build plugin in kate <= 4.12Alex Neundorf2013-12-291-6/+17
| | | | | | | | | With this patch, simply also the information used by the build plugin in kate <= 4.12 is put into the generated json file. The new build plugin (coming in 4.13) simply ignores this (and vice versa). Alex
* kate: the prev_target is not used by kateAlex Neundorf2013-12-291-1/+0
| | | | | | ...this was a leftover from experimenting Alex
* kate: fix ninja supportAlex Neundorf2013-12-191-10/+21
| | | | | | | ninja needs to be run from the toplevel build dir, not from the target dir, as make Alex
* kate: remove unused functionAlex Neundorf2013-12-191-44/+0
| | | | Alex
* kate: insert build targetsAlex Neundorf2013-11-251-8/+136
| | | | | | | This can be used by the build plugin in kate. Code is quite similar to the one for Eclipse. Alex
* kate: add project generator for the Kate project pluginAlex Neundorf2013-11-251-0/+244
This patch adds an extra generator for KDE's kate text editor, or better more specifically, the project plugin. Alex