diff options
author | Brad King <brad.king@kitware.com> | 2022-11-02 19:34:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-11-02 19:47:25 (GMT) |
commit | 88b14c5cf4e88bddef11ed035d6d53ae1435d990 (patch) | |
tree | e217d49084190452d921306d4408248ec835f6cf /Tests/GeneratorExpression/check-part4.cmake | |
parent | 82c990e9be75496e3d27203d4d092f971bf96179 (diff) | |
download | CMake-88b14c5cf4e88bddef11ed035d6d53ae1435d990.zip CMake-88b14c5cf4e88bddef11ed035d6d53ae1435d990.tar.gz CMake-88b14c5cf4e88bddef11ed035d6d53ae1435d990.tar.bz2 |
Tests: Improve GeneratorExpression SHELL_PATH case robustness on MSYS 1.0
Since commit ca6ba3fee5 (Genex: Add a SHELL_PATH expression, 2015-09-24,
v3.4.0-rc1~37^2) and commit 21da25d2a8 (Tests: Generalize
GeneratorExpression MSYS path conversion workaround, 2019-03-11,
v3.15.0-rc1~407^2~1) we use a prefix string to prevent the MSYS 1.0
shell from converting absolute paths of the form `/c/...` to
windows-style paths. In the newer `mingw.osdn.io` distribution of MSYS
1.0, the `bash` shell now also converts paths that appear after `:`.
We have no way to add a prefix string in that context, so perform the
test's check of the `SHELL_PATH` genex value at generate time instead.
Diffstat (limited to 'Tests/GeneratorExpression/check-part4.cmake')
-rw-r--r-- | Tests/GeneratorExpression/check-part4.cmake | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Tests/GeneratorExpression/check-part4.cmake b/Tests/GeneratorExpression/check-part4.cmake index a7e0944..28f3699 100644 --- a/Tests/GeneratorExpression/check-part4.cmake +++ b/Tests/GeneratorExpression/check-part4.cmake @@ -16,8 +16,13 @@ else() check(test_shell_path [[/shell/path]]) endif() if(WIN32) - if(CMAKE_GENERATOR STREQUAL "MSYS Makefiles" AND NOT msys1_prefix) - check(test_shell_path2 [[/c/shell/path:/d/another/path]]) + if(CMAKE_GENERATOR STREQUAL "MSYS Makefiles") + if(msys1_prefix) + # The comparison was done at generate time with the STREQUAL genex. + check(test_shell_path2 [[1]]) + else() + check(test_shell_path2 [[/c/shell/path:/d/another/path]]) + endif() elseif(CMAKE_GENERATOR STREQUAL "Unix Makefiles") check(test_shell_path2 [[c:/shell/path;d:/another/path]]) else() |