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.
CMake is aware of the policy's NEW behavior and the AppleClang compiler
id. Set the policy to NEW explicitly to avoid the warning and get the
NEW behavior.
Also teach the RunCMake test infrastructure to build tests with
-DCMAKE_POLICY_DEFAULT_CMP0025=NEW to avoid the policy warning
in test output that must match specific regular expressions.
CMake's test suite includes a dashboard build of KWSys directly out of
the CMake source tree. Upstream KWSys switched to a dedicated dashboard
but CMake's test should still submit to the PublicDashboard project.
Building CMake with g++ 2.9-aix51-020209 on an AIX 5.3 system gives:
cmsys/hashtable.hxx: In function `const long unsigned int *cmsys::get_stl_prime_list ()':
cmsys/hashtable.hxx:399: warning: sorry: semantics of inline function static data
`const long unsigned int _stl_prime_list[31]' are wrong (you'll wind up with multiple copies)
cmsys/hashtable.hxx:399: warning: you can work around this by removing the initializer
Give get_stl_prime_list internal linkage.
Commit "KWSys: Fix SystemTools environment memory handling" (2012-04-26)
added a _WIN32 case inside !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H to dllimport
the "environ" global. Howver, KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H is true
on every Windows toolchain we support so the case is never reached.
Furthermore, even if it were reached the use of dllimport is incorrect
because the toolchain might not be compiling with a dynamic runtime
library. Remove the unused incorrect line and supporting conditionals.