Commit Graph

18590 Commits

Author SHA1 Message Date
Brad King e48796b26b KWSys: Fix SystemTools environment memory handling (#13156)
The SystemTools::PutEnv function tries to provide the "putenv" API
without leaking memory.  However, the kwsysDeletingCharVector singleton
frees memory that may still be referenced by the environment table,
having been placed there by putenv.  If any static destruction or
processing by an external tool happens after the singleton is destroyed
and accesses the environment it will read invalid memory.

Replace use of putenv with setenv/unsetenv when available.  The latter
manage internal copies of the values passed instead of referencing the
original memory.  When setenv/unsetenv are not available use putenv with
a singleton that removes its values from the environment before freeing
their memory.  This requires an "unputenv" implementation.  On at least
some platforms it must be written in terms of "putenv" because other
APIs are not available and direct modification of the "environ" global
is not safe (e.g. on Windows there is interaction with "wenviron").
Fortunately either putenv("A=") or putenv("A") will remove "A" from the
environment on these platforms.  On other platforms fall back to direct
manipulation of "environ".

Also add UnPutEnv to the API and add a test for the behavior of both.
2012-04-27 08:13:52 -04:00
Brad King b10c5cbb87 CTest: Simplify environment save/restore
Replace use of AppendEnv/RestoreEnv pairs with instances of
SaveRestoreEnvironment.  Simplify the signature of AppendEnv and use it
in place of similar loops elsewhere.  Move the RestoreEnv implementation
inside the SaveRestoreEnvironment destructor which is the only place
left that calls it.
2012-04-24 16:56:14 -04:00
Kitware Robot 93e6069553 CMake Nightly Date Stamp 2012-04-23 00:01:02 -04:00
Kitware Robot 3a50392601 CMake Nightly Date Stamp 2012-04-22 00:01:04 -04:00
Kitware Robot 2809379f15 CMake Nightly Date Stamp 2012-04-21 09:43:50 -04:00
Brad King 0c7029c642 Refactor CMake version handling
Move the CMake version number components out of "CMakeLists.txt" into
dedicated file "Source/CMakeVersion.cmake".  Set the TWEAK level to the
date explicitly.  Add a "Source/CMakeVersion.bash" script to update the
date, thus replacing KWSys DateStamp for CMake.  Teach the bootstrap
script to extract the version components from their new location.
2012-04-20 11:25:55 -04:00
KWSys Robot 20ba4fe1bf KWSys Nightly Date Stamp 2012-04-20 09:37:16 -04:00
Brad King fe0f7e362d Merge branch 'developer-setup' 2012-04-19 09:07:55 -04:00
KWSys Robot 168f38ee5f KWSys Nightly Date Stamp 2012-04-19 00:05:04 -04:00
David Cole e9c0d3a017 Begin post-2.8.8 development 2012-04-18 17:54:30 -04:00
David Cole 6218aba37a CMake 2.8.8 2012-04-18 12:03:39 -04:00
David Cole d17c58c853 Merge branch 'release' 2012-04-18 12:01:24 -04:00
KWSys Robot 32e0b1975d KWSys Nightly Date Stamp 2012-04-18 00:05:05 -04:00
KWSys Robot 233b5cbaf7 KWSys Nightly Date Stamp 2012-04-17 00:05:04 -04:00
KWSys Robot 31e7fadbb3 KWSys Nightly Date Stamp 2012-04-16 00:05:05 -04:00
KWSys Robot 38ebdf0c33 KWSys Nightly Date Stamp 2012-04-15 00:05:05 -04:00
KWSys Robot b4cb977f76 KWSys Nightly Date Stamp 2012-04-14 00:05:12 -04:00
KWSys Robot ad3d2b450f KWSys Nightly Date Stamp 2012-04-13 00:05:03 -04:00
KWSys Robot 89a67804bf KWSys Nightly Date Stamp 2012-04-12 00:05:05 -04:00
KWSys Robot 621c0893b8 KWSys Nightly Date Stamp 2012-04-11 00:05:04 -04:00
David Cole 194545643a Merge topic 'check_include_files_output'
5adb6b7 CheckIncludeFiles: Shorten check description message
2012-04-10 15:19:51 -04:00
David Cole 23dcf6ecd0 Merge topic 'new-boost-versions'
63d4960 FindBoost: add support for 1.49 and 1.50
2012-04-10 15:19:42 -04:00
David Cole 104f7cc00a Merge topic 'osx-search-paths'
6190415 OS X: Mark find_program results as advanced
d9edf46 OS X: Use correct extra path when searching for applicaton bundles (#13066)
98b9a7f OS X: Use OSX_DEVELOPER_ROOT for app search path (#13066)
2012-04-10 15:19:31 -04:00
David Cole 082fba0662 Merge topic 'CPackNSIS-smallDocTypoFix'
fcf265f CPackNSIS: Rewrite variable documentation to make it more readable.
8fe0da5 Fix some doc typo and add an undocumented var.
2012-04-10 15:19:22 -04:00
KWSys Robot 797653b8a7 KWSys Nightly Date Stamp 2012-04-10 00:05:05 -04:00
Brad King 5adb6b7a34 CheckIncludeFiles: Shorten check description message
Since commit 44d007b6 (CheckIncludeFiles: fix status output, 2012-02-01)
check_include_files reports the list of files tested instead of the name
of the variable storing the result.  Some projects incrementally test
and concatenate very long lists leading to long messages that do not
provide much information.  Users report confusion especially when the
lines wrap.

For lists of more than two files produce messages of the format

 Looing for N include files first.h, ..., last.h

where N is the list length and "..." is literal.  Leave the log file
entries and cache entry description unchanged as they should have the
full detail of the check performed.
2012-04-09 15:57:02 -04:00
KWSys Robot dcecea3953 KWSys Nightly Date Stamp 2012-04-09 00:05:08 -04:00
KWSys Robot a00aa8ec8c KWSys Nightly Date Stamp 2012-04-08 00:05:09 -04:00
Rolf Eike Beer 63d4960aef FindBoost: add support for 1.49 and 1.50
Boost 1.49 has already be released. Add this and the next to come version
number to the search list.
2012-04-07 10:21:02 +02:00
KWSys Robot bad16ab075 KWSys Nightly Date Stamp 2012-04-07 00:05:06 -04:00
David Cole 6190415436 OS X: Mark find_program results as advanced
Avoid cluttering the gui with variables nearly nobody needs
to see.
2012-04-06 11:15:39 -04:00
David Cole d9edf46760 OS X: Use correct extra path when searching for applicaton bundles (#13066)
The parent commit added a search path relative to OSX_DEVELOPER_ROOT.
But with Xcode 4.3 the nested Applications folder is in a different
relative location compared to that root. This commit makes the intent
of the previous commit work with older and newer Xcode directory layouts.

Furthermore, it only adds paths that exist to the search path.
2012-04-06 11:14:37 -04:00
KWSys Robot 15f238fd6e KWSys Nightly Date Stamp 2012-04-06 00:05:06 -04:00
David Cole fcf265fe1a CPackNSIS: Rewrite variable documentation to make it more readable.
And avoid parsing problems at the first "."
2012-04-05 16:13:24 -04:00
David Cole d61d860dc3 CMake 2.8.8-rc2 2012-04-05 10:26:26 -04:00
David Cole 691df8dfd7 Merge branch 'release' 2012-04-05 10:23:51 -04:00
KWSys Robot 3f29f755c7 KWSys Nightly Date Stamp 2012-04-05 00:05:07 -04:00
KWSys Robot d19008cd54 KWSys Nightly Date Stamp 2012-04-04 00:05:06 -04:00
David Cole 5e9c7731e1 Merge topic 'fix-13082-use-config-0'
0579fa0 Xcode: Pay attention to custom configuration types (#13082)
2012-04-03 15:59:56 -04:00
David Cole 046f0f869e Merge topic 'ninja-generated-def'
3fd0dde Merge branch 'test-generated-def' into ninja-generated-def
d2c764a Ninja: Fix module .def file path conversion
2012-04-03 15:59:48 -04:00
David Cole c89264e275 Merge topic 'test-generated-def'
89987c2 Test generated module .def files
2012-04-03 15:59:37 -04:00
David Cole 3febff7958 Merge topic 'clarify-suffix-docs'
fa08375 CMake: Clarify SUFFIX target property documentation.
2012-04-03 15:59:28 -04:00
David Cole f1b48c14fb Merge topic 'OBJECTLibrariesInEclipse'
f93d03d fix #13054: support OBJECT libraries in Eclipse
2012-04-03 15:59:19 -04:00
David Cole 57e9f97b70 Merge topic 'doc-improvements'
32c3be6 FIND_LIBRARY: document FIND_LIBRARY_USE_LIB64_PATHS
edd8996 FILE: mention that TO_CMAKE_PATH also handles list delimiters
2012-04-03 15:59:10 -04:00
David Cole ff575b229d Merge topic 'dev/granular-test-targets-ninja'
d5318e0 Create granular targets for Ninja generators too
2012-04-03 15:59:02 -04:00
David Cole b450b6dcc7 Merge topic 'include-unistd-on-mac'
8a70495 automoc: include <unistd.h> on Apple to get pathconf
2012-04-03 15:58:53 -04:00
David Cole 7ecf76a19b Merge topic 'fix-source-classification'
01e979a VS: Add CMakeLists.txt re-run rules at start of generation
9a2c60e Classify known header file extensions as headers
1c48992 Always compile sources with known language
2012-04-03 15:58:42 -04:00
David Cole a6100082b9 Merge topic 'CPackPM-fixAmazonLinux'
3a0c60d Override topdir from rpm command line seems necessary on Amazon linux.
2012-04-03 15:58:33 -04:00
KWSys Robot 9ad3fa7e85 KWSys Nightly Date Stamp 2012-04-03 00:05:07 -04:00
David Cole 0579fa045c Xcode: Pay attention to custom configuration types (#13082)
Previously, we were setting the default configuration for a generated
Xcode project to the hard-coded string "Debug" even in cases where users
customized their configuration types such that the list did not contain
"Debug". Now, we use the first string listed in CMAKE_CONFIGURATION_TYPES
as the default config for generated Xcode projects.
2012-04-02 15:50:37 -04:00