diff options
Diffstat (limited to 'Tests/GeneratorExpression/CMakeLists.txt')
-rw-r--r-- | Tests/GeneratorExpression/CMakeLists.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt index ebbe288..6187966 100644 --- a/Tests/GeneratorExpression/CMakeLists.txt +++ b/Tests/GeneratorExpression/CMakeLists.txt @@ -261,13 +261,24 @@ else() set(test_shell_path2 /shell/path /another/path) endif() +set(test_shell_path_genex "$<SHELL_PATH:${test_shell_path}>") +set(test_shell_path2_genex "$<SHELL_PATH:${test_shell_path2}>") +if(msys1_prefix) + # Add a prefix to the value produced by the genex so that the path does + # not look absolute, thus suppressing conversion by MSYS 1.0 bash. + set(test_shell_path_genex "${msys1_prefix}${test_shell_path_genex}") + # There is no way to suppress conversion of the second path in + # MSYS 1.0 bash, so do the comparison at generate time instead. + set(test_shell_path2_genex "$<STREQUAL:${test_shell_path2_genex},/c/shell/path:/d/another/path>") +endif() + add_custom_target(check-part4 ALL COMMAND ${msys2_no_conv} ${CMAKE_COMMAND} # Prefix path to bypass its further conversion when being processed by # CMake as command-line argument -Dmsys1_prefix=${msys1_prefix} - -Dtest_shell_path=${msys1_prefix}$<SHELL_PATH:${test_shell_path}> - "-Dtest_shell_path2=$<SHELL_PATH:${test_shell_path2}>" + "-Dtest_shell_path=${test_shell_path_genex}" + "-Dtest_shell_path2=${test_shell_path2_genex}" -Dif_1=$<IF:1,a,b> -Dif_2=$<IF:0,a,b> -Dif_3=$<IF:$<EQUAL:10,30>,a,b> |