From 49a6d77b7eb6c754a559cec34b3b78364b989b04 Mon Sep 17 00:00:00 2001 From: Kishore Nallan Date: Fri, 31 Mar 2017 18:05:52 +0530 Subject: [PATCH] Test for build result for libfor and rocksdb builds. --- cmake/For.cmake | 6 +++++- cmake/RocksDB.cmake | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cmake/For.cmake b/cmake/For.cmake index 6fcb215e..2be285cc 100644 --- a/cmake/For.cmake +++ b/cmake/For.cmake @@ -16,5 +16,9 @@ endif() if(NOT EXISTS ${DEP_ROOT_DIR}/${FOR_NAME}/libfor.a) message("Building libfor locally...") - execute_process(COMMAND make WORKING_DIRECTORY ${DEP_ROOT_DIR}/${FOR_NAME}/) + execute_process(COMMAND make WORKING_DIRECTORY ${DEP_ROOT_DIR}/${FOR_NAME}/ + RESULT_VARIABLE FOR_BUILD) + if(NOT FOR_BUILD EQUAL 0) + message(FATAL_ERROR "${FOR_NAME} build failed!") + endif() endif() diff --git a/cmake/RocksDB.cmake b/cmake/RocksDB.cmake index d4e6d5ed..53e31f1f 100644 --- a/cmake/RocksDB.cmake +++ b/cmake/RocksDB.cmake @@ -16,5 +16,9 @@ endif() if(NOT EXISTS ${DEP_ROOT_DIR}/${ROCKSDB_NAME}/librocksdb.so) message("Building ${ROCKSDB_NAME} locally...") - execute_process(COMMAND make "shared_lib" WORKING_DIRECTORY ${DEP_ROOT_DIR}/${ROCKSDB_NAME}/) + execute_process(COMMAND make "shared_lib" WORKING_DIRECTORY ${DEP_ROOT_DIR}/${ROCKSDB_NAME}/ + RESULT_VARIABLE ROCKSDB_BUILD) + if(NOT ROCKSDB_BUILD EQUAL 0) + message(FATAL_ERROR "${ROCKSDB_NAME} build failed!") + endif() endif() \ No newline at end of file