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