Commit Graph

437 Commits

Author SHA1 Message Date
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
Brad King 5b02a4a864 ENH: Re-enable diagnosis of non-unique target names.
- Re-enable enforcement in cmMakefile::EnforceUniqueName
  - Improve error message to help user resolve the problem
  - Fix Modules/CTestTargets.cmake to not duplicate testing targets
  - Move commands used by the changes to Modules/CTestTargets.cmake
    to build during bootstrap: DEFINE_PROPERTY, GET_PROPERTY
2008-02-14 11:58:32 -05:00
Brad King 8175b10078 BUG: Disable enforcement of unique target names until CTestTargets can be fixed. 2008-02-12 10:19:38 -05:00
Brad King ac0e58dcfb ENH: Enforce global target name uniqueness.
- Error if imported target is involved in conflict
  - Error for non-imported target conflict unless
    CMAKE_BACKWARDS_COMPATIBILITY <= 2.4
  - Include OUTPUT_NAME property in error message
  - Update add_executable and add_library command documentation
2008-02-11 13:35:39 -05:00
Brad King 739a463539 ENH: Add cmMakefile::NeedBackwardsCompatibility method to pass through to cmLocalGenerator::NeedBackwardsCompatibility for convenience. 2008-02-11 13:35:30 -05:00
Brad King 45d0dd1344 BUG: Fix misuse of stl vector that caused definitions to be dropped by cmMakefile::PushScope. 2008-01-30 08:37:38 -05:00
Brad King 5594ad4885 ENH: Updated exporting and importing of targets to support libraries and configurations.
- Created cmExportFileGenerator hierarchy to implement export file generation
  - Installed exports use per-config import files loaded by a central one.
  - Include soname of shared libraries in import information
  - Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() commands
  - Move addition of CMAKE_INSTALL_PREFIX to destinations to install generators
  - Import files compute the installation prefix relative to their location when loaded
  - Add mapping of importer configurations to importee configurations
  - Rename IMPORT targets to IMPORTED targets to distinguish from windows import libraries
  - Scope IMPORTED targets within directories to isolate them
  - Place all properties created by import files in the IMPORTED namespace
  - Document INSTALL(EXPORT) and EXPORT() commands.
  - Document IMPORTED signature of add_executable and add_library
  - Enable finding of imported targets in cmComputeLinkDepends
2008-01-28 08:38:36 -05:00
Brad King 7213408287 ENH: Added cmMakefile::NeedCacheCompatibility method and support for it in cmCacheManager. This will allow commands to modify their behavior when running with a cache loaded from an earlier CMake version. 2008-01-24 07:37:08 -05: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
Alexander Neundorf 52b96e5bd9 BUG: don't crash if cmMakefile::RaiseScope() is called from a cmake file in
the top level directory in normal code (i.e. not within a function)

Alex
2008-01-18 17:11:50 -05:00
Brad King 9d57dbd098 ENH: Make per-configuration COMPILE_DEFINITIONS_<CONFIG> directory property initialized from parent. 2008-01-17 20:34:10 -05:00
Brad King 7f589c9f23 BUG: COMPILE_DEFINITIONS directory property needs to be inherited from parent when a directory is created. 2008-01-17 19:50:39 -05:00
Brad King 433099ecdd ENH: Converted cmMakefile DefineFlags added by ADD_DEFINITIONS command into a COMPILE_DEFINITIONS directory property. 2008-01-17 19:29:43 -05:00
Brad King caca9b8065 ENH: Add AppendProperty methods for use by C++ code in CMake. Simplify implementation of SET_PROPERTY command by using them. 2008-01-17 18:13:55 -05:00
Amitha Perera 4d9259c15b STYLE: Spelling fixes on documentation 2008-01-09 22:09:19 -05:00
Ken Martin ac4c2f675a ENH: change raise_scope signature to be safer for returned varuables 2008-01-03 11:22:33 -05:00
Brad King dcd9a1b59f BUG: Make RAISE_SCOPE function work when variable is not defined. 2008-01-02 17:49:16 -05:00
Bill Hoffman b479c6a8a9 ENH: add ability to have manifest files and incremental linking with make and nmake 2008-01-01 15:13:41 -05:00
Alexander Neundorf 3a304f8e1b STYLE: nicer error message:
"Command options() is not scriptable" is IMO better to understand than
"Command options not scriptable" (with all uppercase commands it was easier to see)

Alex
2007-12-19 16:46:15 -05:00
Ken Martin f4b1c3880b ENH: add functions and raise scope 2007-12-03 13:35:41 -05:00
Ken Martin 433a914910 ENH: different way of testing properties 2007-11-06 14:16:00 -05:00
Ken Martin 923b51ece0 COMP: fix for when STRICT is defined, and fix for props that have no docs 2007-10-23 10:40:49 -04:00
Ken Martin 6cdf032505 ENH: change to make the documentation class more generic, about halfway there, also provides secitons for Variables now 2007-10-22 12:49:09 -04:00
Alexander Neundorf fc9f19b202 COMP: explicitely cast to int to silence warning with msvc8
Alex
2007-08-28 16:27:10 -04:00
Alexander Neundorf f55dd81190 COMP: parent is not used anymore with this patch, since now the name is
given as a vector of components

Alex
2007-08-26 03:17:11 -04:00
Alexander Neundorf 9220e97401 BUG: fix #4057 (which had several duplicates): handle recursivew source groups better, i.e. multiple sourcegroups with the same end component work now
Alex
2007-08-24 14:21:49 -04:00
Alexander Neundorf 512e0d40ef ENH: set UNIX, WIN32 and APPLE in cmMakefile.cxx as it was before, so it
works for scripts, then reset them in CMakeSystemSpecificInformation.cxx, so
the platform modules can set them again for the target system

Alex
2007-08-10 09:07:39 -04:00
Alexander Neundorf 176fe63d15 ENH: UNIX, CYGWIN, WIN32, APPLE, QNXNTO and BEOS are not longer set in
cmMakefile.cxx, but now in the platform files and are now valid for the
target platform, not the host platform.
New variables CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE and
CMAKE_HOST_CYGWIN have been added in cmMakefile.cxx (...and have now to be
used in all cmake files which are executed before
CMakeSystemSpecificInformation.cmake is loaded). For compatibility the old
set is set to the new one in CMakeDetermineSystem.cmake and reset before the
system platform files are loaded, so custom language or compiler modules
which use these should still work.

Alex
2007-08-09 14:45:23 -04: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
Alexander Neundorf 581518919b STYLE: even more output when --debug-output is used
Alex
2007-07-20 08:48:32 -04:00
Alexander Neundorf 55303d6dd2 STYLE: fix line lengths
Alex
2007-07-20 08:36:16 -04:00
Alexander Neundorf 8c77fe55dc STYLE: fix some typos, nicer debug output
Alex
2007-07-19 11:13:01 -04:00
Alexander Neundorf 95a8331edb ENH: produce a lot more output when running with --debug-output
-try to fix build error on HPUX

Alex
2007-07-17 09:25:08 -04:00
Alexander Neundorf fac8604810 BUG: GET_DIRECTORY_PROPERTY(INCLUDE_DIRECTORIES|LINK_DIRECTORIES) wasn't
working, for both the result was always empty, since
cmMakefile::GetProperty() recognized it as a special property, constructed a
correct return value and called cmMakefile::SetProperty() with this list of
directories, which then didn't actually set the property, but applied it to
the internal vector of include/link directories. The following
getPropertyValue in cmMakefile::GetProperty() then still didn't find it and
returned nothing. Now for all special property the static string output is
used and its content is returned. I'm not sure it is the right way to fix
this problem but at least it seems to work and it fixes the Paraview3 build

Alex
2007-07-16 13:26:56 -04:00
Alexander Neundorf ab10b43ec5 ENH: change the way #cmakedefine is changed to #undef, so it is similar to
what autoconf does. This makes porting software from autoconf to cmake
easier, since it's easier to diff the resulting config headers.

Now the following
#cmakedefine HAVE_STRING_H 1
#cmakedefine HAVE_STRLCAT 1

produce:

#define HAVE_STRING_H 1
/* #undef HAVE_STRLCAT */

whereas before they produced:

#define HAVE_STRING_H 1
/* #undef HAVE_STRLCAT 1 */

Since it's commented out anyway, it's now change in behaviour.

Alex
2007-07-11 15:50:32 -04:00
Ken Martin 8c641677e9 ENH: some cleanup of get property commands 2007-07-10 13:52:41 -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
Ken Martin 509f1fb9cb ENH: some property cleanup and added GetProperty 2007-06-25 09:51:37 -04:00
Alexander Neundorf f7d4f27c2a ENH: add IMPORT keyword to ADD_LIBRARY, dependencies are not yet working
STYLE: fix line lengths and indentation, use enum as argument to AddLibrary() instead of int (which was initialized from a bool in some cases)

Alex
2007-06-22 09:58:10 -04: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 28e94533dd BUG: More problems with cmMakefile copy-constructor. It seems the regular expression class cannot be assigned but does not enforce this limitation at compile time. 2007-06-11 10:25:40 -04:00
Brad King 5e0da0b0eb BUG: Copy constructor needs to copy regular expression members. 2007-06-08 17:44:36 -04:00
Alexander Neundorf 0ddc9f62e5 ENH: add cmExternalMakefileProjectGenerator, which should make it easier to
write generators for IDE projects, which use already existing makefiles
(current the kdevelop generator)
-first stept of the export interface, iniitial export() command
-more replacements for the FIND_XXX docs

Alex
2007-06-08 11:57:16 -04:00
Brad King db0f26e852 BUG: Fixed @ONLY configuration to not try to parse ${} syntax at all. This fixes the original fix to bug#4393 and adds a test. 2007-06-06 16:20:02 -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
Brad King ba7780a3c4 ENH: Fixed INSTALL_FILES and INSTALL_PROGRAMS commands to not create targets. No targets of type cmTarget::INSTALL_FILES or cmTarget::INSTALL_PROGRAMS are created, so we do not need to check for them everywhere anymore. 2007-05-23 15:40:12 -04:00
Alexander Neundorf 4878c00905 ENH: add the IMPORT keyword to ADD_EXECUTABLE(), which generates an
"imported" executable target. This can then be used e.g. with
ADD_CUSTOM_COMMAND() to generate stuff. It adds a second container for
"imported" targets, and FindTarget() now takes an additional argument bool
useImportedTargets to specify whether you also want to search in the
imported targets or only in the "normal" targets.

Alex
2007-05-22 10:24:59 -04:00
Brad King 9a5b4eba97 BUG: All variable accesses should produce watch callbacks, including IF(DEFINED <var>) ones. Instead we define a new access type for IF(DEFINED) so that the error does not show up for backward compatibility variables. 2007-05-17 17:40:59 -04:00
Brad King b8928b0c8e BUG: Do not complain about missing watched variables when they are accessd with IF(DEFINED VAR). 2007-05-17 15:12:13 -04:00
Brad King bdc7792e40 COMP: GCC 2.95 does not have std::string::clear() method. 2007-05-17 14:47:18 -04:00