mirror of
https://github.com/reactos/CMake.git
synced 2024-12-11 05:14:00 +00:00
25b6e7b710
Users or scripts commonly remove or replace `CMakeCache.txt` without also removing `CMakeFiles/`. In this case the information saved in the cache from platform information initialization is missing, so we need to re-initialize it. In such a case, remove the platform information directory so that re-initialization will occur and restore needed information to the cache. Closes: #14820
18 lines
255 B
CMake
18 lines
255 B
CMake
enable_language(C)
|
|
|
|
set(vars
|
|
CMAKE_EXECUTABLE_FORMAT
|
|
)
|
|
|
|
if(CMAKE_HOST_UNIX)
|
|
list(APPEND vars
|
|
CMAKE_UNAME
|
|
)
|
|
endif()
|
|
|
|
foreach(v IN LISTS vars)
|
|
if(NOT DEFINED ${v})
|
|
message(SEND_ERROR "Variable '${v}' is not set!")
|
|
endif()
|
|
endforeach()
|