summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeBlocksGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* CodeBlocks: add option to exclude external filesAlexandr (Sagrer) Gridnev2017-09-141-0/+20
| | | | | | | | | | | | Add variable `CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES` to optionally exclude files from outside the project root from the project file written by the CodeBlocks extra generator. This optionally restores logic that had been removed by commit v2.8.3~40^2 (CodeBlocks Generator: Do not omit files in the project file listing, 2010-10-05) in response to QTCREATORBUG-2250. Issue: #12110 Fixes: #17188
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-91/+61
| | | | | | 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-2/+2
|
* CodeBlocks: Avoid listing files multiple timesAlexandr (Sagrer) Gridnev2017-08-301-6/+7
| | | | Fixes: #17187
* Use C++11 nullptrDaniel Pfeifer2017-08-241-6/+6
|
* Performance: Add an index to Change cmLocalGenerator::GeneratorTargets.Aaron Orenstein2017-08-161-4/+6
| | | | | | | | | | | 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.
* Add const-reference qualificationsPavel Solodovnikov2017-05-261-4/+4
|
* Allow CodeBlocks for NMake Makefiles JOMKonstantin Podsvirov2017-01-101-1/+2
|
* clang-tidy: apply readability-redundant-control-flow fixesDaniel Pfeifer2016-12-121-1/+0
|
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-6/+5
|
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-21/+21
|
* 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-3/+10
|
* CodeBlocks: List C++ includes firstKevin Ottens2016-08-261-2/+2
| | | | | | | | When using the Clang Code Model in QtCreator, it turned out that having the C system include dirs can make it report false positives for most uses of the STL. This is due to the order the Clang Code Model looks at the include directories and some C includes in /usr/include could be incompatible with the used STL if found first.
* CMake: don't use else after returnDaniel Pfeifer2016-08-181-22/+21
|
* issues: update references to the CMake issue trackerBen Boeckel2016-08-151-2/+2
| | | | | References to specific comments are left as-is since comments were not migrated.
* Refactor extra generator registration to use factoriesTobias Hunger2016-08-031-11/+17
| | | | | | | | | | | 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-7/+7
|
* Merge topic 'CodeBlocks-generated-sources'Brad King2016-06-171-2/+4
|\ | | | | | | | | afd6cc6b CodeBlocks: Show generated files in non-utility targets
| * CodeBlocks: Show generated files in non-utility targetsEnrico Bedau2016-06-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | Since 2.6.3 the UTILITY target may have source files. A defect was filed that these files are now visible in the source tree. A fix later removed all generated files from the source tree, regardless of the target type. You can't even include them by using the SOURCES option. This fix adds generated files again, except for the UTILITY target which cluttered the source tree. Fixes #14272.
* | Merge topic 'CodeBlocks-include-order'Brad King2016-06-171-7/+11
|\ \ | |/ |/| | | | | 76b462ea cmExtraCodeBlocksGenerator: Do not shuffle include directories
| * cmExtraCodeBlocksGenerator: Do not shuffle include directoriesTobias Hunger2016-06-171-7/+11
| | | | | | | | | | Report include directories in a sensible order. Do not shuffle them when trying to make them unique.
* | Merge topic 'size-empty'Brad King2016-06-031-2/+2
|\ \ | | | | | | | | | | | | c6220de2 Use the empty() method to check for emptyness.
| * | Use the empty() method to check for emptyness.Daniel Pfeifer2016-06-021-2/+2
| |/ | | | | | | | | Apply fix-its from clang-tidy's readability-container-size-empty checker.
* | Simplify boolean expressionsDaniel Pfeifer2016-06-021-4/+4
|/ | | | | | 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.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-372/+224
| | | | | | | | | | | | | 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/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* cmExtraCodeBlocksGenerator: port to cmXMLWriterDaniel Pfeifer2016-03-211-89/+145
|
* Avoid depending on CMAKE_ROOT cache entry internally (#16015)Brad King2016-03-161-2/+1
| | | | | | Use cmSystemTools::GetCMakeRoot() which always knows the location of our resources. Do not depend on CMAKE_ROOT because the user could unset it from the cache.
* Merge topic 'CodeBlocksParallelFlag'Brad King2016-02-241-11/+24
|\ | | | | | | | | 84ccd4f7 CodeBlocks: generate parallel project files (make -j)
| * CodeBlocks: generate parallel project files (make -j)Alex Neundorf2016-02-231-11/+24
| | | | | | | | | | | | | | | | This is done the same way as for Eclipse: cmake tries to determine the number of CPUs, and then adds the respective -jN to the make invocations in the project file. Alex
* | CodeBlocks: improve support for different compilersMelven Roehrig-Zoellner2016-02-161-6/+55
|/ | | | | | | | | | More elaborate selection of the `compiler` tag in the generated CodeBlocks project file: * Fortran language support * support for several of the predefined compilers recognized by CodeBlocks (16.01)
* cmake: Store hardcoded lists of sources and headersStephen Kelly2015-10-271-5/+9
| | | | Don't duplicate this in each cmMakefile.
* C::B: Port API to cmGeneratorTarget.Stephen Kelly2015-10-241-6/+6
|
* Port to GetGeneratorTargets.Stephen Kelly2015-10-241-20/+19
|
* Merge topic 'clean-up-cmTarget'Brad King2015-10-161-20/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | 55474e61 cmState: Move GetTargetTypeName from cmTarget. 38df5c36 Remove now-obsolete casts. 4ee2b267 cmGeneratorTarget: Use enum for GetType. eac15298 cmState: Move TargetType enum from cmTarget. 482b3811 cmTarget: Move link type enum out. 2ee1cb85 cmTarget: Move ImportInfoMap out of internal class. a48bcabd cmTarget: Move backtrace member out of internal class. 6694d993 cmTarget: Remove unneeded constructors. 983c00f8 Generators: Use GetType from the cmGeneratorTarget.
| * cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-20/+20
| | | | | | | | | | | | | | 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: Port GetTargetDirectory to cmGeneratorTarget.Stephen Kelly2015-10-141-14/+11
|/
* Merge topic 'add-cmLocalGenerator-API'Brad King2015-10-121-13/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 223d0efe Remove some needless GetMakefile() calls. a367416c cmLocalGenerator: Add current source directory accessor. bbef3c2d cmLocalGenerator: Add current binary directory accessor. 12cb3bdc cmLocalGenerator: Add Home directory accessors. 72efa15d Eclipse: Port API to cmLocalGenerator. f2a641d6 Kate: Remove unused variables. 10cf42f5 Kate: Port API to cmLocalGenerator. e46ef270 export: Port internal method to cmGeneratorTarget. 53d3a1c9 cmMakefile: Remove unused GetProjectName calls. 4ab2750c cmLocalGenerator: Add GetProjectName method. c8187f41 cmCPluginAPI: Inline code to get project name. 8c6e6dd3 cmMakefile: Inline initialization of project name. 27916f2c cmLocalGenerator: Add cmake instance accessor.
| * cmLocalGenerator: Add current binary directory accessor.Stephen Kelly2015-10-101-8/+6
| |
| * cmLocalGenerator: Add Home directory accessors.Stephen Kelly2015-10-081-3/+3
| | | | | | | | Reduce reasons for cmLocalGenerator to have a cmMakefile.
| * cmLocalGenerator: Add GetProjectName method.Stephen Kelly2015-10-081-2/+2
| |
* | C::B: Remove unused variables.Stephen Kelly2015-10-081-2/+0
|/
* Access sources through cmGeneratorTarget.Stephen Kelly2015-10-071-1/+3
|
* cmGeneratorTarget: Move compile defintions processing from cmTarget.Stephen Kelly2015-08-261-1/+1
|
* Move GetLocation to cmGeneratorTarget.Stephen Kelly2015-07-271-1/+1
|