From 590bab8f1aeb7838238ec76fa709f9fde74a926c Mon Sep 17 00:00:00 2001 From: John Zimmermann Date: Fri, 5 Jun 2020 21:54:06 -0700 Subject: [PATCH] cmake: fix build if workdir is outside of CMAKE_BINARY_DIR (#1284) this e.g. happens if you would try to compile this like this: cmake -B build cmake --build build --config Release --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1cb27ab..59a1e695 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -186,6 +186,7 @@ else() execute_process(COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/qemu/configure ${EXTRA_CFLAGS} ${TARGET_LIST} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) execute_process(COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/qemu/scripts/create_config INPUT_FILE ${CMAKE_BINARY_DIR}/config-host.mak