This converts the KWSys 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 KWSys copyright to
cover the full development time range.
This commit adds KWSys configuration option KWSYS_INSTALL_DOC_DIR to
specify the directory for installation of documentation. We use it to
put the KWSys Copyright.txt file at the location
${KWSYS_INSTALL_DOC_DIR}/${KWSYS_NAMESPACE}/Copyright.txt
in the project installation tree. This helps containing projects meet
the license requirement to distribute the copyright and license with
binary forms.
The commit "Fix KWSys SystemTools build on cygwin with -mwin32" tried to
restore the state of the _WIN32 definition that was broken by the commit
"Optimize KWSys SystemTools::FileExists on Windows". It did so for the
case of building with -mwin32 on cygwin, but since including <windows.h>
defines _WIN32, it failed for the case of not using -mwin32.
This commit restores the state of _WIN32 in all cases by undefining it
after including <windows.h> if it was not defined beforehand.
Commit "Optimize KWSys SystemTools::FileExists on Windows" accidentally
added "#undef _WIN32" when including <windows.h> on cygwin, which breaks
builds using the -mwin32 flag. This commit removes that line and fixes
the real error it was intended to avoid.
We optimize this method by using the GetFileAttributesExA native Windows
API to check for file existence when possible. For real Windows builds
we always use it. For Cygwin we use cygwin_conv_to_win32_path to get a
native Windows path if possible and otherwise fall back to 'access'.
Cygwin-to-Windows path conversion and cache by Wojciech Migda.
See issue #8826.
KWSys tries not to force anything on source files that include its
headers, but Borland warning 8027 leaves us no choice when we want to
have inline function definitions. This commit disables the warning for
the RegularExpression header and any file that includes it.