9db3116226
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
15 lines
447 B
CMake
15 lines
447 B
CMake
set(SUBDIR_DEFINED 1 PARENT_SCOPE)
|
|
set(SUBDIR_UNDEFINED PARENT_SCOPE)
|
|
|
|
# The above sets should not affect the current scope.
|
|
if(DEFINED SUBDIR_UNDEFINED)
|
|
PASS("SubdirScope Undefine Test" "(${SUBDIR_UNDEFINED})")
|
|
else()
|
|
FAILED("SubdirScope Undefine Test" "(${SUBDIR_UNDEFINED})")
|
|
endif()
|
|
if(DEFINED SUBDIR_DEFINED)
|
|
FAILED("SubdirScope Define Test" "(${SUBDIR_DEFINED})")
|
|
else()
|
|
PASS("SubdirScope Define Test" "(${SUBDIR_DEFINED})")
|
|
endif()
|