From 2ef016304ea70f8562dfc01126a452c41fbe2bc6 Mon Sep 17 00:00:00 2001 From: Jonathan Simms Date: Mon, 19 Nov 2018 19:40:26 -0500 Subject: [PATCH] Reorder dependency includes in cmake, don't parallel build (#182) Fix the build by including dependencies in the top-level CMakeLists.txt in the correct order --- CMakeLists.txt | 21 +++++++++++++-------- ci/local-run.sh | 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66fee5b29..5490f42db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 2.6) project(ccommon C) +# Uncomment the following to output dependency graph debugging messages +# set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_DEBUG_MODE 1) + enable_testing() ################### @@ -157,24 +160,26 @@ include_directories( "${PROJECT_BINARY_DIR}" "include") -if(HAVE_RUST) - enable_language(Rust) - include(CMakeCargo) - add_subdirectory(rust) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_RUST=1") -endif() - - ################### # things to build # ################### add_subdirectory(src) + if(CHECK_WORKING) include_directories(${include_directories} "${CHECK_INCLUDES}") add_subdirectory(test) endif(CHECK_WORKING) + +if(HAVE_RUST) + enable_language(Rust) + include(CMakeCargo) + add_subdirectory(rust) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_RUST=1") +endif() + + ################### # print a summary # ################### diff --git a/ci/local-run.sh b/ci/local-run.sh index 36b7146d9..ecc90c3ec 100755 --- a/ci/local-run.sh +++ b/ci/local-run.sh @@ -48,7 +48,7 @@ BUILD_DIR="${BUILD_DIR:-$TEMP}" mkdir -p "$BUILD_DIR" && ( cd "$BUILD_DIR" && cmake "${CMAKEFLAGS[@]}" "$TOPLEVEL" && - make -j all && + make all && make check && cd rust && cargo test