In the get_filename_component command, add a new BASE_DIR parameter to
use with the ABSOLUTE and REALPATH options. This will be used when
finding an absolute path from a relative path.
If PROGRAM_ARGS is provided to get_filename_component, fix bug where the
command failed to honor the CACHE argument.
Added test cases to RunCMake.get_filename_component that fail when the
bug is not fixed to prevent regressions.
Signed-off-by: James Johnston <johnstonj.public@codenest.com>
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.
The commit "Fix get_filename_component ABSOLUTE mode" broke REALPATH
treatment of relative paths because it stopped storing the absolute path
in local variable 'filename'. This commit fixes the call to GetRealPath
to use the proper local variable and adds a test.
Some find-modules use get_filename_component() to expand registry
values. We need to look in both the 32-bit and 64-bit registry views
when expanding values. We prefer the one that the target application
would see. See issue #8792.
This converts the CMake 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 CMake copyright to
cover the full development time range.
This teaches the command to recognize full windows paths when built on
UNIX. CollapseFullPath knows when the input path is relative better
than FileIsFullPath because the latter is only meant for paths from the
host platform.
This patch from Philip Lowman creates a REALPATH mode in the
get_filename_component command. It is like ABSOLUTE, but will also
resolve symlinks (which ABSOLUTE once did but was broken long ago).
See issue #8423.
The patch used to fix this bug used SystemTools::GetRealPath which works
only for existing files. It broke the case of using the command
get_filename_component for a non-existing file. Also, it changed
long-standing behavior in a possibly incompatible way even for existing
files. This reverts the original fix and instead updates the
documentation to be consistent with the behavior.
- Fixed CollapseFullPath to work on relative paths with base paths
not in the current working directory.
- INCLUDE command now supports relative paths (using above fix).
- Added ABSOLUTE option to GET_FILENAME_COMPONENT command to
unwind symlinks and relative paths.
- Fixed libName_EXPORTS macro definition to be valid C identifier.
- Added DEFINE_SYMBOL target propterty for customizing the export symbol.
- Implemented LINK_FLAGS target propterty for libraries in VC6 and VC7.
Several of these fixes were contributed by Gareth Jones.