mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Automate with:
find Tests -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
66 lines
1.4 KiB
CMake
66 lines
1.4 KiB
CMake
set(FOO BAR)
|
|
|
|
set(LOOP_VAR "")
|
|
|
|
cmake_policy(SET CMP0054 NEW)
|
|
|
|
while(NOT LOOP_VAR STREQUAL "xx")
|
|
if(NOT FOO STREQUAL BAR)
|
|
message(FATAL_ERROR "The variable should match the string")
|
|
endif()
|
|
|
|
if("FOO" STREQUAL BAR)
|
|
message(FATAL_ERROR "The strings should not match")
|
|
endif()
|
|
|
|
cmake_policy(SET CMP0054 OLD)
|
|
|
|
if(NOT FOO STREQUAL BAR)
|
|
message(FATAL_ERROR "The variable should match the string")
|
|
endif()
|
|
|
|
if(NOT "FOO" STREQUAL BAR)
|
|
message(FATAL_ERROR "The quoted variable should match the string")
|
|
endif()
|
|
|
|
cmake_policy(SET CMP0054 NEW)
|
|
|
|
string(APPEND LOOP_VAR "x")
|
|
endwhile()
|
|
|
|
while("FOO" STREQUAL BAR)
|
|
message(FATAL_ERROR "The strings should not match")
|
|
endwhile()
|
|
|
|
set(LOOP_VAR "")
|
|
|
|
cmake_policy(SET CMP0054 OLD)
|
|
|
|
while(NOT LOOP_VAR STREQUAL "xx")
|
|
if(NOT FOO STREQUAL BAR)
|
|
message(FATAL_ERROR "The variable should match the string")
|
|
endif()
|
|
|
|
if(NOT "FOO" STREQUAL BAR)
|
|
message(FATAL_ERROR "The quoted variable should match the string")
|
|
endif()
|
|
|
|
cmake_policy(SET CMP0054 NEW)
|
|
|
|
if(NOT FOO STREQUAL BAR)
|
|
message(FATAL_ERROR "The variable should match the string")
|
|
endif()
|
|
|
|
if("FOO" STREQUAL BAR)
|
|
message(FATAL_ERROR "The strings should not match")
|
|
endif()
|
|
|
|
cmake_policy(SET CMP0054 OLD)
|
|
|
|
string(APPEND LOOP_VAR "x")
|
|
endwhile()
|
|
|
|
if(NOT "FOO" STREQUAL BAR)
|
|
message(FATAL_ERROR "The quoted variable should match the string")
|
|
endif()
|