From 9d43140d61d93a6b96844c19b760b64ba49d451f Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sun, 11 Oct 2020 12:58:17 +0200 Subject: [PATCH] Improve check for conflicting config_kernel.h --- cmake/arch.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/arch.cmake b/cmake/arch.cmake index c048f13d1..99e685d04 100644 --- a/cmake/arch.cmake +++ b/cmake/arch.cmake @@ -83,8 +83,7 @@ if (DYNAMIC_ARCH) endif () endif () - CHECK_INCLUDE_FILE ("${PROJECT_SOURCE_DIR}/config_kernel.h" TRAP) - if (TRAP) + if (EXISTS ${PROJECT_SOURCE_DIR}/config_kernel.h) 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 ()