Commit Graph

86 Commits

Author SHA1 Message Date
Ben Boeckel c3833c7da4 stringapi: Use strings for VS project names 2014-03-08 13:05:33 -05:00
Ben Boeckel fabf1fbabb stringapi: Use strings in target name 2014-03-08 13:05:31 -05:00
Stephen Kelly b4ff38a5ef cmGlobalGenerator: Make CheckALLOW_DUPLICATE_CUSTOM_TARGETS const 2014-01-12 20:18:11 +01:00
Brad King 7974dced73 Merge topic 'make-entry-no-parallel'
bd11de0 Makefile: Allow "gmake target1 target2 -j" (#14312)
2013-12-20 09:41:32 -05:00
Brad King bd11de0857 Makefile: Allow "gmake target1 target2 -j" (#14312)
Add the .NOTPARALLEL target to each local Makefile command-line
interface entry point file so that even with -j we launch only
one "make -f Makefile2" at a time.  The actual build rules
in Makefile2 and lower will still run in parallel.

Do not add .NOTPARALLEL for Borland or Watcom make tools because
they do not tolerate it.  Other make tools that do not understand
.NOTPARALLEL will not be hurt.

Suggested-by: Robert Luberda <robert-cmake@debian.org>
2013-12-20 09:35:20 -05:00
Stephen Kelly ef25ba8d06 Constify handling of target dependencies. 2013-12-11 15:30:11 +01:00
Brad King 8904d1410b cmGlobalGenerator: Cleanup GenerateBuildCommand API
All cmGlobalGenerator::GenerateBuildCommand call sites that need to
produce a string now generate "cmake --build" commands.  The remaining
call sites immediately pass the result to cmSystemTools::RunSingleCommand.
Avoid the intermediate string and argument parsing by directly producing a
vector of strings.  Also drop the ignoreErrors argument because no call
sites remain that use it.
2013-11-18 08:26:21 -05:00
Brad King 05923172f9 cmGlobalGenerator: Add method to compute "cmake --build" command line
Create a GenerateCMakeBuildCommand method to generate a command-line
string invoking "cmake --build" for a given target and configuration.
Optionally allow the "-i" make flag and additional native options.
2013-11-14 16:25:31 -05:00
Brad King 684063c036 Refactor tool selection for edit_cache (#14544)
Refactor edit_cache tool selection to ask each global generator for its
preference.  Teach the Ninja generator to always use cmake-gui because
Ninja by design cannot run interactive terminal dialogs like ccmake.
Teach the Makefile generator to use cmake-gui when also using an "extra"
generator whose IDE has no terminal to run ccmake, and otherwise fall
back to CMAKE_EDIT_COMMAND selection for normal Makefile build systems.
2013-11-12 08:47:19 -05:00
Petr Kmoch de8be9ef7d Add projectDir parameter to GenerateBuildCommand
Extend the cmGlobalGenerator::GenerateBuildCommand virtual method
signature with a "projectDir" parameter specifying the top of the
project build tree for which the build command will be generated.
Populate it from call sites in cmGlobalGenerator::Build where a
fully-generated build tree should be available.
2013-04-12 11:35:35 -04:00
Patrick Gansterer 5170a8800f Make cmGlobalGenerator::GetDocumentation() a static function
Making the function static allows us to call it directly,
without creating and removing an instance of the generator.
2012-11-19 12:54:50 -05:00
Patrick Gansterer e8f841473b Introduce the abstract class cmGlobalGeneratorFactory
This new abstract class allows us move some logic from the
cmGlobalGenerator into its own layer in a next step.
2012-11-19 12:54:30 -05:00
Brad King 3baaf6ccec Pre-compute object file names before Makefile generation
Add a virtual cmGlobalGenerator::ComputeTargetObjects method invoked
during cmGeneratorTarget construction.  Implement it in the Makefile
generator to pre-compute all object file names for each target.  Use
the results during generation instead of re-computing it later.
2012-03-09 15:16:02 -05:00
Nicolas Despres a92f14f338 Doxygen: Fix warnings. 2011-10-23 22:18:08 +02:00
Nicolas Despres d0b3a7fa48 Fix typo. 2011-10-23 22:15:30 +02:00
Brad King 32f8437bbf Fix line-too-long style violations
Commit 8a0eb78f (Constify many getters of cmGlobalGenerator, 2011-03-26)
added const qualifiers to many cmGlobalGenerator methods but left the
resulting lines beyond our style's limit of 79 characters.
2011-10-10 09:46:27 -04:00
Nicolas Despres 8a0eb78f3b Constify many getters of cmGlobalGenerator. 2011-10-02 18:30:42 +01:00
Brad King e51bbc14f6 Merge topic 'output-compile-lines'
cdc2b41 Fix CompileCommandOutput test build on Windows
7039d1f Fix CompileCommandOutput test for Make tools not supporting spaces
4268e3d run_compile_commands: Cast istream::get() result to char
c45c60b run_compile_commands: Avoid extra stl vector conversion
7c5be51 run_compile_commands: Avoid shadow in std::map<>::at workaround
169bb05 Provide std::map<>::at for use in run_compile_commands
4e2185c Make std::map usage more portable in language=>flags/defines maps
a7e7a04 Fix run_compile_commands build on Apple GCC 3.3
c9174c0 Fix signed/unsigned comparison in EscapeJSON
8346a28 Only offer the compile command output feature on unix systems
0e6b05f Adds a test for the compile command line output.
5674844 make compile command output optional
fe07b05 implement cxx command output
65c0c24 cache flags and defines
3f064ef refactor flags and defines
2011-05-24 14:48:14 -04:00
Brad King dca304ec8d Merge branch 'MakeCodeBlocksGeneratorNonVerbose2' into rule-messages
Conflicts:
	Source/cmGlobalUnixMakefileGenerator3.cxx
	Source/cmGlobalUnixMakefileGenerator3.h
2011-05-16 11:28:07 -04:00
Brad King 051cee0096 Revert "Honor RULE_MESSAGES property for build target messages" (#12190)
This reverts commit dc36b34994.  It broke
dependency logic instead of only silencing messages.  Revert to previous
behavior.
2011-05-16 11:26:58 -04:00
Manuel Klimek fe07b0557b implement cxx command output 2011-04-25 13:27:58 -04:00
Alex Neundorf a02987a0df Don't enforce VERBOSE makefiles for the CodeBlocks generator
Instead of enforcing verbose makefile, now the generated build command
includes "VERBOSE=1" so the output will be verbose when building in
C::B.
Also removed the now unused setForceVerboseMakefiles().

Alex
2010-11-11 22:06:09 +01:00
Alex Neundorf 7b1421b885 Remove trailing whitespace
Alex
2010-11-11 22:02:07 +01:00
Campbell Barton dc36b34994 Honor RULE_MESSAGES property for build target messages 2010-11-03 10:10:03 -04:00
Brad King 6fc4cd8680 Fix or cast integer conversions in cmake
These were revealed by GCC's -Wconversion option.  Fix types where it is
easy to do so.  Cast in cases we know the integer will not be truncated.
2010-06-25 09:05:15 -04:00
Brad King aa8c003609 Qualify std::map compare functor as const
Some older STL implementations invoke the comparison functor as a const
object, so the function call operator must be 'const' qualified.  This
fixes the commit "Fix support for OLD behavior of policy CMP0002" to
compile on older STLs.
2009-09-29 08:34:39 -04:00
Brad King 0089f9cf8f Fix support for OLD behavior of policy CMP0002
The commit "Cleanup make progress rule generation code" introduced a map
from target name to the progress.make file location.  Policy CMP0002's
OLD behavior allows duplicate target names in different directories, so
only one ends up with a progress.make file.  This commit fixes the map
to order by target name first and build directory second, restoring
support for duplicate target names.
2009-09-28 17:34:23 -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
Brad King cd83f1979d ENH: Cleanup make progress rule generation code
This cleans up the Makefile generator's progress rule code.  Instead of
keeping every cmMakefileTargetGenerator instance alive to generate
progress, we keep only the information necessary in a single table.
This approach keeps most of the code in cmGlobalUnixMakefileGenerator3,
thus simplifying its public interface.
2009-06-25 09:58:51 -04:00
Alexander Neundorf f27a2ca363 COMP: remove unused variable TargetSourceFileCount, it seems it is unused since version 1.88 of cmGlobalUnixMakefileGenerator3.cxx
patch by Daniel DOT Teske AT Nokia DOT com

Alex
2009-02-09 16:45:18 -05:00
Ken Martin 0b4375daf2 BUG: improve progress reporting when there are multiple targets with the same name, bug# 7042 2008-05-29 11:50:33 -04:00
Brad King 1c0595c73f ENH: Add global property ALLOW_DUPLICATE_CUSTOM_TARGETS to help existing projects that depend on having duplicate custom targets. It is allowed only for Makefile generators. See bug#6348. 2008-02-14 16:42:29 -05:00
Bill Hoffman 6903d2df8b ENH: remove const 2008-01-30 22:56:34 -05:00
Brad King 430296dc96 ENH: Moved global inter-target dependency analysis and cycle-prevention code up from cmGlobalUnixMakefileGenerator3 to cmGlobalGenerator. Simplified cmGlobalUnixMakefileGenerator3 to use it. Later other generators may be modified to use it also. 2007-12-23 15:03:42 -05:00
Brad King 2836fc43e7 BUG: Support cyclic dependencies among STATIC libraries by removing one from the generated Makefile rules. 2007-12-22 13:08:26 -05:00
Brad King e23348c5a6 COMP: Remove unused parameter of method. 2007-12-21 18:32:22 -05:00
Brad King d83b4cd255 ENH: Add a depends check step to custom targets. Add support for the IMPLICIT_DEPENDS feature of custom commands when building in custom targets. Convert multiple-output pair checks to be per-target instead of global. 2007-12-21 12:22:12 -05:00
Alexander Neundorf 4ed64cf73a ENH: add GetCleanTargetName() which returns "clean" for makefiles, so it can
be used by the eclipse generator

Alex
2007-11-25 07:34:53 -05:00
Brad King d7118006de BUG: Target exclusion-from-all tests should always use the root local generator associated with the all target being tested. 2007-08-03 15:44:25 -04:00
Brad King bf0c200f0a ENH: Added cmTarget::GetLanguages method to centralize computation of the list of languages compiled in a target. Transformed NeedRequiresStep to use it. 2007-08-03 09:39:32 -04:00
Brad King 8dc897b60c BUG: Removing accidental commit. 2007-08-02 14:28:45 -04:00
Brad King 8b0575c4ce ENH: Added cmTarget::GetLanguages method to centralize computation of the list of languages compiled in a target. 2007-08-02 14:23:46 -04:00
Alexander Neundorf 43de8c8628 ENH: add OPTIONAL keyword to ENABLE_LANGUAGE, so it will be possible to do
something like this:

ENABLE_LANGUAGE(ASM-ATT)
IF(CMAKE_ASM-ATT_COMPILER_WORKS)
  ... do assembler stufff
ELSE(CMAKE_ASM-ATT_COMPILER_WORKS)
  ... fallback to generic C/C++
ENDIF(CMAKE_ASM-ATT_COMPILER_WORKS)

Alex
2007-06-28 09:09:26 -04:00
Alexander Neundorf 1358009382 STYLE: fix comment
Alex
2007-06-05 16:37:27 -04:00
Alexander Neundorf 179943bf14 STYLE: move ForceVerboseMakefiles to cmGlobalUnixMakefileGenerator3, so the
kdevelop generator doesn't need its own CreateLocalGenerator() anymore

Alex
2007-06-05 16:35:24 -04:00
Alexander Neundorf df8f550029 ENH: add install/strip target for makefile generators if strip was found
Alex
2007-05-18 13:43:39 -04:00
Brad King 142210997f BUG: Watcom WMake needs empty rule commands even for symbolic targets. This fixes the cmake_force target. 2007-05-16 13:24:17 -04:00
Ken Martin 2a1e2456ae ENH: some code consolidation and cleanup 2007-04-12 15:46:14 -04:00
Brad King f7611f167c ENH: Made cmMakefileTargetGenerator::GlobalGenerator have full type cmGlobalUnixMakefileGenerator3 to give access to all methods. Fixed broken custom targets with no commands for Borland makefiles when CMAKE_SKIP_RULE_DEPENDENCY is set. 2006-12-14 14:30:41 -05:00
Ken Martin bdb530191d BUG: bad progress for named top level targets 2006-08-29 12:55:11 -04:00