77543bde41
Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
11 lines
341 B
CMake
11 lines
341 B
CMake
GET_CURRENT_FILE(current_file)
|
|
if(NOT "${current_file}" STREQUAL "${CMAKE_CURRENT_LIST_FILE}")
|
|
message(FATAL_ERROR
|
|
"Macro file context is broken. Expected:\n"
|
|
" ${CMAKE_CURRENT_LIST_FILE}\n"
|
|
"but got:\n"
|
|
" ${current_file}\n"
|
|
"from the macro."
|
|
)
|
|
endif(NOT "${current_file}" STREQUAL "${CMAKE_CURRENT_LIST_FILE}")
|