Improve check for conflicting config_kernel.h

This commit is contained in:
Martin Kroeker 2020-10-11 12:58:17 +02:00 committed by GitHub
parent 8ef600f1a3
commit 9d43140d61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -83,8 +83,7 @@ if (DYNAMIC_ARCH)
endif () endif ()
endif () endif ()
CHECK_INCLUDE_FILE ("${PROJECT_SOURCE_DIR}/config_kernel.h" TRAP) if (EXISTS ${PROJECT_SOURCE_DIR}/config_kernel.h)
if (TRAP)
message (FATAL_ERROR "Your build directory contains a file config_kernel.h, probably from a previous compilation with make. This will conflict with the cmake compilation and cause strange compiler errors - please remove the file before trying again") message (FATAL_ERROR "Your build directory contains a file config_kernel.h, probably from a previous compilation with make. This will conflict with the cmake compilation and cause strange compiler errors - please remove the file before trying again")
endif () endif ()