summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeBlocksGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Always access target location from a cmGeneratorTarget instance.Stephen Kelly2015-07-271-1/+3
|
* C::B: Get the Makefile from the LocalGenerator, not vice-versa.Stephen Kelly2015-06-221-11/+13
| | | | | | The Makefile is a configure-time concept, and the LocalGenerator is a generate time concept. The LocalGenerator should not be available from the Makefile.
* cmMakefile: Port users of GetStart* methods to new names.Stephen Kelly2015-04-201-5/+5
|
* cmMakefile: Rename GetCurrent{Output,Binary}Directory.Stephen Kelly2015-04-201-1/+1
| | | | Match names used in CMake code.
* Merge topic 'target-language-genex'Brad King2015-03-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | 232a6883 Help: Add release notes for target-language-genex. 9e168941 File(GENERATE): Process genex evaluation files for each language. b734fa44 Genex: Allow COMPILE_LANGUAGE when processing include directories. 0b945ea9 Genex: Allow COMPILE_LANGUAGE when processing compile definitions. 5c559f11 Genex: Enable use of COMPILE_LANGUAGE for compile options. e387ce7d Genex: Add a COMPILE_LANGUAGE generator expression. 4a0128f4 VS6: Compute CMAKE_*_FLAGS and COMPILE_DEFINITIONS* only when needed
| * Genex: Allow COMPILE_LANGUAGE when processing compile definitions.Stephen Kelly2015-03-091-1/+1
| | | | | | | | Issue an error if this is encountered by an IDE generator.
* | CodeBlocks: Declare which source file belongs to which targets.Nils Gladitz2015-03-061-33/+38
|/ | | | | | This should allow the consuming IDE to determine which target specific preprocessor definitions and include directories are relevant for a given source file.
* Use two-iterator std::set::insert where appropriate.Stephen Kelly2015-01-111-18/+4
|
* 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.
* Fix some generator crashes on undefined CMAKE_BUILD_TYPEBrad King2014-06-231-1/+1
| | | | | | | | | | Since commit 84fdc9921 (stringapi: Pass configuration names as strings, 2014-02-09), it is not safe to use GetDefinition("CMAKE_BUILD_TYPE") without checking the return value. Use GetSafeDefinition instead so that a missing definition is treated as an empty string like code paths did prior to the above commit. Reported-by: Richard Wirth <richard@califax.de>
* cmTarget: Make the source files depend on the config.Stephen Kelly2014-04-021-1/+2
| | | | | | | | | | | | | | | | | Disallow the use of config-specific source files with the Visual Studio and Xcode generators. They don't have any way to represent the condition currently. Use the same common-config API in cmQtAutoGenerators. While it accepts config-specific files, it doesn't have to support multiple configurations yet. Loop over the configs in cmTargetTraceDependencies and cmGlobalGenerator::WriteSummary and consume all source files. Loop over the configs in cmComputeTargetDepends and compute the object library dependencies for each config.
* Watcom: Introduce OpenWatcom compiler id and fix compiler versionJiri Malak2014-03-171-1/+1
| | | | | | Distinguish "Open Watcom" from old "Watcom" by introducing a new "OpenWatcom" compiler id. The __WATCOMC__ format is "VVRP" for Watcom and "VVRP + 1100" for Open Watcom.
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-2/+2
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* Remove some c_str() calls.Stephen Kelly2014-03-111-7/+7
| | | | | | 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.
* speedup: Cache strings for comparisonsBen Boeckel2014-03-081-1/+2
|
* stringapi: Use strings for generator namesBen Boeckel2014-03-081-4/+5
|
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-2/+2
| | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* stringapi: Use strings in target nameBen Boeckel2014-03-081-2/+3
|