Commit Graph

466 Commits

Author SHA1 Message Date
Brad King e3666a1de5 ENH: Allow policy CMP0000 to be set explicitly
- Message for missing cmake_minimum_required is not issued
    until the end of processing the top CMakeLists.txt file
  - During processing a cmake_policy command may set behavior
  - OLD behavior is to silently ignore the problem
  - NEW behavior is to issue an error instead of a warning
2008-03-31 13:33:09 -04:00
Brad King 3374d12ff0 BUG: Fix impl of CMP0005 regex to match value-less definitions. 2008-03-13 17:38:51 -04:00
Brad King 9a83ce6efc ENH: Add policy CMP0005 to decide whether add_definitions should escape defs. 2008-03-13 17:11:57 -04:00
Brad King fb0296656d ENH: Improve error message when invalid policy is given. 2008-03-13 14:13:44 -04:00
Brad King f7f03347a6 ENH: Improve new error/warning message generation
- Add cmListFileBacktrace to record stack traces
  - Move main IssueMessage method to the cmake class instance
    (make the backtrace an explicit argument)
  - Change cmMakefile::IssueMessage to construct a backtrace
    and call the cmake instance version
  - Record a backtrace at the point a target is created
    (useful later for messages issued by generators)
2008-03-13 13:48:57 -04:00
Ken Martin 73df9a5cd4 ENH: change CMP_ to CMP 2008-03-13 11:38:46 -04:00
Bill Hoffman 5ab6c0f0ed ENH: remove abort calls and replace with an IssueMessage INTERANL_ERROR, better to not crash on the end user. 2008-03-12 21:06:32 -04:00
Bill Hoffman c559ce8f6f STYLE: fix line len 2008-03-12 09:25:14 -04:00
Bill Hoffman 84cea9806f ENH: fix warning message a bit 2008-03-11 17:27:24 -04:00
Bill Hoffman a547ff61cd ENH: add a way to suppress the new policy warnings, still need ccmake and gui's 2008-03-11 15:17:58 -04:00
Bill Hoffman dc9245df6c ENH: add enum to IssueMessage 2008-03-11 10:29:56 -04:00
Brad King 7f2bf83132 ENH: Enforce matching PUSH/POP calls for cmake_policy. 2008-03-10 15:41:07 -04:00
Brad King eb6b300978 ENH: Add directory-level context information to error/warning messages when no call stack is present. 2008-03-10 15:40:57 -04:00
Brad King b2d7a839a4 COMP: Avoid using operator-> on const_reverse_iterator to help old compilers. 2008-03-08 09:21:30 -05:00
Brad King 192de486df ENH: Cleanup policy generic documentation. Cleanup some policy error/warning messages. 2008-03-08 09:13:13 -05:00
Brad King 46bf0347a3 ENH: Finish creating, documenting, and enforcing policy CMP_0002. 2008-03-07 16:36:57 -05:00
Brad King d4f66dfa32 ENH: In cmMakefile::IssueMessage use cmDocumentationFormatterText to format the message nicely. 2008-03-07 16:01:22 -05:00
Brad King 5233b75a77 ENH: Improve handling of old-style compatibility.
- Remove CMP_0001 (no slash in target name) and restore
    old CMAKE_BACKWARDS_COMPATIBILITY check for it
  - Replace all checks of CMAKE_BACKWARDS_COMPATIBILITY
    with cmLocalGenerator::NeedBackwardsCompatibility calls
  - Create new CMP_0001 to determine whether or not
    CMAKE_BACKWARDS_COMPATIBILITY is used.
    (old = use, new = ignore)
  - Show CMAKE_BACKWARDS_COMPATIBILITY in cache only when
    CMP_0001 is set to OLD or WARN
  - Update documentation of cmake_policy and cmake_minimum_required
    to indicate their relationship and the 2.4 version boundary
  - When no cmake policy version is set in top level makefile
    implicitly call cmake_policy(VERSION 2.4) which restores
    CMAKE_BACKWARDS_COMPATIBILITY and other 2.4 compatibility
  - Fix tests MakeClean and Preprocess to call
    cmake_policy(VERSION 2.6) because they depend on new policies
2008-03-07 15:30:35 -05:00
Brad King 52ad7a5a97 BUG: Do not produce whitespace-only lines when indenting messages in new error/warning format. 2008-03-07 09:09:21 -05:00
Brad King 680104a490 ENH: New format for warning and error messages
- Add cmMakefile methods IssueError and IssueWarning
  - Maintain an explicit call stack in cmMakefile
  - Include context/call-stack info in messages
  - Nested errors now unwind the call stack
  - Use new mechanism for policy warnings and errors
  - Improve policy error message
  - Include cmExecutionStatus pointer in call stack
    so that errors deeper in the C++ stack under
    a command invocation will become errors for the
    command
2008-03-07 08:40:36 -05:00
Ken Martin adddcea5d7 BUG: change the handling of CMAKE_MINIMUM_REQUIRED and BACKWARDS_COMPATIBILITY and extend the documentaiton quite a bit 2008-03-06 10:57:59 -05:00
Brad King 49549560b2 ENH: Improve cmake_policy command signature
- Replace NEW and OLD modes with a SET mode for clarity
  - Enforce VERSION argument validity (major.minor[.patch])
2008-03-05 18:21:10 -05:00
Ken Martin f2c6e9e480 BUG: some fixes, still a few to go 2008-03-05 11:41:25 -05:00
Brad King ddd6ce04ec BUG: Make sure at least one policy stack entry is created for every cmMakefile instance. 2008-03-04 18:57:14 -05:00
Ken Martin 7b5d1c4c1e COMP: fix warning 2008-03-02 09:11:26 -05:00
Ken Martin 6f6b80fded BUG: bad loop index unsigned compared to zero 2008-03-01 16:21:41 -05:00
Ken Martin d7db2d086c COMP: fix some warnings 2008-03-01 15:44:17 -05:00
Ken Martin d49ef18f8a ENH: add first cut and policies still need to add the doc support 2008-03-01 15:20:35 -05:00
Bill Hoffman f386c2aae0 ENH: make CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS the default and remove the property. If any value is specified in an endif, endforeach, endwhile, etc then make sure it matches the start string. If no values are given then it is no longer an error. 2008-02-29 12:18:11 -05: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
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