Commit Graph

56 Commits

Author SHA1 Message Date
Daniel Pfeifer
1d6909a287 use CM_NULLPTR 2016-06-28 09:02:26 -04:00
Kitware Robot
d9fd2f5402 Revise C++ coding style using clang-format
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.
2016-05-16 16:05:19 -04:00
Brad King
0e44f4894f Rename local target lookup methods to clarify purpose
Rename methods:

* `cmMakefile::Find{ => LocalNonAlias}Target`
* `cmLocalGenerator::Find{ => LocalNonAlias}GeneratorTarget`

These names clarify that they are for directory-local target names
and do not consider alias targets.
2016-04-01 15:44:16 -04:00
Stephen Kelly
9d653f9c1c cmFLTKWrapUI: Remove CMake 2.2 compat code.
CMake 3.0 dropped CMake <= 2.4 compatibility.
2015-10-06 20:16:20 +02:00
Stephen Kelly
32b8f03acc cmMakefile: Port users of GetStart* methods to new names. 2015-04-21 00:15:20 +02:00
Stephen Kelly
54d6a9187f cmMakefile: Rename GetCurrent{Output,Binary}Directory.
Match names used in CMake code.
2015-04-21 00:12:52 +02:00
Stephen Kelly
55d80d0a85 cmMakefile: Rename GetCurrent{,Source}Directory.
Match the names used in cmake code.
2015-04-21 00:12:52 +02:00
Stephen Kelly
bd990c803b Remove use of ExpandSourceListArguments.
By now, it is only an expensive copy.
2015-02-05 20:44:25 +01:00
Stephen Kelly
e6971df6ab cmTarget: Make the source files depend on the config.
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.
2014-04-02 23:14:02 +02:00
Stephen Kelly
26d494ba01 cmTarget: Use string API to add sources to cmTarget objects.
Continue to call GetOrCreateSource where necessary to create
cmSourceFile objects which have the GENERATED attribute set.
2014-03-31 23:18:43 +02:00
Stephen Kelly
21c573f682 Remove some c_str() calls.
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.
2014-03-11 15:03:50 +01:00
Ben Boeckel
7abf4e313d stringapi: Use strings for dependency information 2014-03-08 13:05:39 -05:00
Rolf Eike Beer
c768e398f9 cmMakefile: make some methods take const std::string& instead of const char*
Most callers already have a std::string, on which they called c_str() to pass it
into these methods, which internally converted it back to std::string. Pass a
std::string directly to these methods now, avoiding all these conversions.
Those methods that only pass in a const char* will get the conversion to
std::string now only once.
2014-01-16 09:28:29 -05:00
Stephen Kelly
531e40b95e cmTarget: Make GetSourceFiles populate an out-vector parameter.
In a future patch, this will also be populated with extra
sources from the linked dependencies.
2014-01-09 19:38:08 +01:00
Stephen Kelly
0d46e9a029 Store includes from the same include_directories call together.
Otherwise, we get a separate IncludeDirectoriesEntry for each include,
and that causes unnecessary and confusing splitting in the output when
debugging the INCLUDE_DIRECTORIES property.
2013-01-21 09:12:22 +01:00
Kitware Robot
7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Brad King
96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Bill Hoffman
8ef1cedbef BUG: fix for bug 7228 FLTK_WRAP_UI segfault fixed 2008-06-23 11:08:57 -04:00
Ken Martin
0e69d38004 ENH: add return and break support to cmake, also change basic command invocation signature to be able to return extra informaiton via the cmExecutionStatus class 2008-01-23 10:28:26 -05:00
Brad King
35936433e1 ENH: Merging changes from branch CMake-SourceFile2-b between tags
CMake-SourceFile2-bp and CMake-SourceFile2-b-mp1 to trunk.  This
commit is surrounded by tags CMake-SourceFile2-b-mp1-pre and
CMake-SourceFile2-b-mp1-post on the trunk.

The changes re-implement cmSourceFile and the use of it to allow
instances to be created much earlier.  The use of cmSourceFileLocation
allows locating a source file referenced by a user to be much simpler
and more robust.  The two SetName methods are no longer needed so some
duplicate code has been removed.  The strange "SourceName" stuff is
gone.  Code that created cmSourceFile instances on the stack and then
sent them to cmMakefile::AddSource has been simplified and converted
to getting cmSourceFile instances from cmMakefile.  The CPluginAPI has
preserved the old API through a compatibility interface.

Source lists are gone.  Targets now get real instances of cmSourceFile
right away instead of storing a list of strings until the final pass.

TraceVSDependencies has been re-written to avoid the use of
SourceName.  It is now called TraceDependencies since it is not just
for VS.  It is now implemented with a helper object which makes the
code simpler.
2007-06-18 11:59:23 -04:00
Brad King
3f2dd9bc54 ENH: Made cmTarget::GetSourceFiles method return reference to const so addition of cmSourceFile pointers must be done with an access method in cmTarget. 2007-05-28 10:25:03 -04:00
Brad King
ba8ec0d5cf ENH: Made cmSourceFile::GetDepends return reference to const so dependencies can be added only by an access method in cmSourceFile. 2007-05-28 10:11:44 -04:00
Brad King
d2f62e6ac3 ENH: Made cmTarget::GetSourceLists return a reference to const so that all additions of sources must go through access methods in cmTarget. 2007-05-28 09:59:08 -04:00
Ken Martin
5d11564c35 ENH: allow source file properties to chain to Directories and up 2006-12-13 12:19:59 -05:00
Ken Martin
27379d7b08 ENH: make properties a bit more formal with documentation and chaining 2006-12-07 09:45:32 -05:00
Ken Martin
039ec75730 STYLE: fix line length 2006-05-11 10:45:33 -04:00
Ken Martin
2af4710525 STYLE: fix line length 2006-05-10 15:46:45 -04:00
Bill Hoffman
c9cd47deda ENH: make sure command depends on fluid 2006-04-24 11:30:57 -04:00
Ken Martin
3d96e52261 STYLE: some m_ to this-> cleanup 2006-03-15 11:02:08 -05:00
Bill Hoffman
347c5f4b46 ENH: add working directory support 2006-02-08 10:58:36 -05:00
Brad King
18477b194c BUG: Removed bogust dependency. 2006-01-13 19:36:17 -05:00
Ken Martin
76bd115813 ENH; better warning message and fix type per julien 2005-07-29 14:17:24 -04:00
Bill Hoffman
b15852d8b7 ENH: make sure custom command depend on fluid so if fltk is part of project fluid gets built first 2005-07-26 13:25:28 -04:00
Ken Martin
c25e2b9b97 ENH: change workings of command so that it can all happing in the initial pass still works the old way but complains 2005-06-10 10:09:17 -04:00
Brad King
39af9ee1e4 ENH: Updated implementation of custom commands. Multiple command lines are now supported effectively allowing entire scripts to be written. Also removed extra variable expansions and cleaned up passing of commands through to the generators. The command and individual arguments are now kept separate all the way until the generator writes them out. This cleans up alot of escaping issues. 2005-02-22 10:32:44 -05:00
Bill Hoffman
6ccbfe9795 clean up commands so they don't need extra variable 2004-06-16 09:44:03 -04:00
Andy Cedilnik
2ccce878a3 ENH: Cleanups 2004-02-22 13:14:59 -05:00
Ken Martin
af8c7e7616 some updates 2003-07-14 10:13:30 -04:00
Ken Martin
24f4c279d9 some updates 2003-07-14 09:44:05 -04:00
Ken Martin
eacc8da7e5 some updates 2003-07-14 09:31:29 -04:00
Brad King
3303599c75 BUG: Need at least 2 arguments, not exactly 2. 2002-12-17 14:55:49 -05:00
Brad King
1f6a3c67b1 ENH: Added reference to Copyright.txt. Removed old reference to ITK copyright. Changed program name to CMake instead of Insight in source file header. Also removed tabs. 2002-10-23 18:03:27 -04:00
Ken Martin
4dec2a174a remove unused variables 2002-09-15 09:54:08 -04:00
Ian Scott
95a506e6de FLTK_FLUID_EXE -> FLTK_FLUID_EXECUTABLE
because Module files are moving to consistent scheme
2002-09-02 17:29:52 -04:00
Ken Martin
7b5a8762c6 modified how source files store properties 2002-08-16 11:20:18 -04:00
Ken Martin
44a7cd55ff removed all source lists from the system and made them vectors. Also appended _CMAKE_PATH to the end of the automatic cache entries for executables and libraries. Odds of all these changes working are slim but cmake builds and passes all its tests. VTK40 starts building 2002-06-27 15:57:09 -04:00
Bill Hoffman
7d76de4403 make sure ; expansion is done in all commands 2002-03-29 14:20:32 -05:00
Bill Hoffman
8b3b49a010 ENH: major change, the cmMakefile now contains a master list of cmSourceFile objects, the source lists reference the list via pointers, also you can now set properties on a file, like compile flags, abstract, etc. 2002-03-29 10:06:30 -05:00
Bill Hoffman
809b32fe59 ENH: remove several compiler warnings 2002-03-13 10:25:11 -05:00
Will Schroeder
a6a43d5320 ENH:Updated copyright 2002-01-21 15:30:43 -05:00