summaryrefslogtreecommitdiff
path: root/Source/cmGraphVizWriter.cxx
Commit message (Collapse)AuthorAgeFilesLines
* surround macro arguments with parenthesesDaniel Pfeifer2016-09-051-2/+2
|
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-0/+10
|
* Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-291-3/+2
| | | | | | | | | | | | Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to our own implementation adopted from the KWSys auto_ptr implementation. Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers that do not warn about it. Automate the client site conversions: git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \ 's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
* use CM_NULLPTRDaniel Pfeifer2016-06-281-7/+7
|
* Remove c_str() calls from stream arguments.Daniel Pfeifer2016-06-061-2/+2
| | | | | | Mostly automated: git grep -l '.c_str() <<' | xargs sed -i 's|\.c_str() <<| <<|g'
* Simplify boolean expressionsDaniel Pfeifer2016-06-021-7/+7
| | | | | | 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-259/+171
| | | | | | | | | | | | | 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.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Graphviz: Fix handling of spaces in GRAPHVIZ_GRAPH_NAMEAndrey Mishchenko2015-12-101-1/+1
| | | | | | | Without this patch, `SET (GRAPHVIZ_GRAPH_NAME "hello world")` does not work (it results in a parsing error in GraphViz when the generated output is processed), but `SET (GRAPHVIZ_GRAPH_NAME "\"hello world\"")` does.
* Graphviz: Port to cmGeneratorTarget.Stephen Kelly2015-10-241-27/+25
|
* cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-151-9/+9
| | | | | | | 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
* cmState: Initialize default definitions immediately.Stephen Kelly2015-10-141-0/+1
| | | | Don't leave this as cmMakefile responsibility.
* cmLocalGenerator: Create from already-constructed cmMakefile.Stephen Kelly2015-08-281-3/+3
| | | | Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
* cmGlobalGenerator: Remove MakeLocalGenerator method.Stephen Kelly2015-08-281-1/+1
| | | | Inline implementation to callers.
* cmGlobalGenerator: Require a snapshot to create a local generator.Stephen Kelly2015-08-281-1/+2
|
* cmGraphVizWriter: Re-arrange data layout.Stephen Kelly2015-06-071-1/+1
| | | | Size goes from 272 to 264 bytes.
* cmGlobalGenerator: Require a cmake instance in ctor.Stephen Kelly2015-05-271-2/+1
| | | | It is required anyway, so this makes it explicit.
* Merge topic 'refactor-cmLocalGenerator'Brad King2015-05-191-0/+2
|\ | | | | | | | | | | | | | | | | fa9eb814 cmLocalGenerator: Remove redundant path access. 1933f3d1 cmLocalGenerator: Remove redundant path conversions. 9e4b6cc2 cmState: Store computed relative paths to to current directories. 991f5e49 cmState::Snapshot: Store components for current directories. 57bdc1a2 cmState: Compute and store directory components.
| * cmState: Compute and store directory components.Stephen Kelly2015-05-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to duplicate these in all cmLocalGenerators. Rename the symbols according to current conventions. Add explicit calls to Set{Source,Binary}Directory with empty strings in order to trigger the population of the components containers with the current working directory in cmLocalGenerator. Having directories set to empty is a special case in CMake, which is relied on for the `if(CMAKE_BINARY_DIR)` condition at the end of CMakeDetermineSystem.cmake.
* | cmGlobalGenerator: Add NVI wrapper to create local generator.Stephen Kelly2015-05-161-1/+1
|/
* cmMakefile: Remove always-null first parameter to ReadListFile.Stephen Kelly2015-04-181-1/+1
|
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-2/+2
| | | | All compilers hosting CMake support the std class.
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-3/+3
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* Remove some c_str() calls.Stephen Kelly2014-03-111-6/+6
| | | | | | 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.
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-12/+12
| | | | | | | | | | | 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-4/+4
|
* graphviz: allow to disable per target graphs (#14746)Daniel Pfeifer2014-02-101-0/+14
| | | | | | | In CMakeGraphVizOptions.cmake, allow the options GRAPHVIZ_GENERATE_PER_TARGET and GRAPHVIZ_GENERATE_DEPENDERS to enable the generation of per target graphs and subgraphs respectively. Both options are TRUE per default to maintain current behavior.
* cmGraphVizWriter: Add extra space in comment to suppress warningSean McBride2013-10-081-2/+2
| | | | Clang's -Wdocumentation thought it was malformed doxygen.
* Always use the auto_ptr from cmsys.Stephen Kelly2012-11-211-3/+1
| | | | | | This is for consistency throughout cmake. The cmsys version exists becaues uses of auto_ptr types as return types does not work with some implementations in ancient compilers.
* Also generate dependers-graphviz files.Alex Neundorf2011-02-061-0/+133
| | | | | | | | | | | With this commit, the --graphviz option now also generates dot files which show which other targets depend on some target. So, now there is * a global dot-file which shows all targets and dependencies * a dot file which shows on what a target Foo depends * a dot file which shows which other targets depend on Foo Alex
* GRAPHVIZ_IGNORE_TARGETS is now a list of regular expressionsAlex Neundorf2011-02-051-22/+30
| | | | | | | | | This is similar e.g. to CTEST_CUSTOM_WARNING_EXCEPTION from ctest. GRAPHVIZ_TARGET_IGNORE_REGEX is not supported anymore. I hope this is ok, since this was 100% undocumented and can't break a build. Alex
* Make it possible to exlude external libs from dot filesAlex Neundorf2011-02-051-2/+7
| | | | | | | | | Patch from Christian Ehrlicher. By setting GRAPHVIZ_EXTERNAL_LIBS to TRUE in CMakeGraphVizOptions.cmake you can now exclude external libraries from the produced dot file. I.e. then you see only the dependencies within your project. Alex
* Fix crash in GraphVizWriter when GRAPHVIZ_TARGET_IGNORE_REGEX is usedAlex Neundorf2011-02-041-0/+6
| | | | | | | GraphVizWriter could crash if GRAPHVIZ_TARGET_IGNORE_REGEX was set. Patch from Christian Ehrlicher. Alex
* Exclude targets from the graphviz file based on a regexAlex Neundorf2010-11-141-1/+19
| | | | | | | | | This commit adds support for a GRAPHVIZ_TARGET_IGNORE_REGEX variable which can be set() in CMakeGraphVizOptions.cmake. Targets matching this regex will be skipped when generating the graphviz graphs. Alex
* Collect targets and libs on demand instead of in the ctorAlex Neundorf2010-11-141-4/+18
| | | | | | | This is necessary for the next commit which requires that the targets are collected after the settings have been read. Alex
* Use std::cout instead of fprintfAlex Neundorf2010-11-141-2/+3
| | | | Alex
* Enable/disable generating graphs depending on the target typeAlex Neundorf2010-11-141-8/+40
| | | | | | | | | In CMakeGraphVizOptions.cmake you can now set GRAPHVIZ_EXECUTABLES, GRAPHVIZ_STATIC_LIBS, GRAPHVIZ_SHARED_LIBS and GRAPHVIZ_MODULE_LIBS to TRUE or FALSE depending on whether you want graphs for the targets of the respective types. Alex
* Move the code for generating dot-files into separate class cmGraphVizWriterAlex Neundorf2010-11-091-0/+370
Alex