From bd69420e397940b7380f0cfb4096402e2e0d61e0 Mon Sep 17 00:00:00 2001 From: Yee <2520865+yixinglu@users.noreply.github.com> Date: Wed, 13 Sep 2023 18:20:57 +0800 Subject: [PATCH] Fix cmake configuration (#2022) * Fix cmake configuration * Delete the CMAKE_EXPORT_COMPILE_COMMANDS option --- .gitignore | 3 +++ CMakeLists.txt | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 667bd232f3..1519565c40 100644 --- a/.gitignore +++ b/.gitignore @@ -4,12 +4,15 @@ bazel-* .clwb .cache +.ccls-cache .bazelrc test/test_files/test_list test_temp/ build/ +compile_commands.json + ### Python # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/CMakeLists.txt b/CMakeLists.txt index b2cd3c6219..8c088af287 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,9 +172,15 @@ else() -DENABLE_UBSAN=${ENABLE_UBSAN} -DFORCE_COLORED_OUTPUT=${FORCE_COLORED_OUTPUT} WORKING_DIRECTORY ${ARROW_BUILD_DIR} - COMMAND_ERROR_IS_FATAL ANY) + RESULT_VARIABLE ARROW_CONFIGURE_RESULT) + if (ARROW_CONFIGURE_RESULT) + message(FATAL_ERROR "Failed to configure arrow") + endif() execute_process(COMMAND ${CMAKE_COMMAND} --build ${ARROW_BUILD_DIR} --config ${CMAKE_BUILD_TYPE} - COMMAND_ERROR_IS_FATAL ANY) + RESULT_VARIABLE ARROW_BUILD_RESULT) + if (ARROW_BUILD_RESULT) + message(FATAL_ERROR "Failed to build arrow") + endif() else() message(STATUS "Using arrow at path ${ARROW_INSTALL}") endif()