From: Andres Noetzli Date: Mon, 9 Aug 2021 15:13:39 +0000 (-0700) Subject: Support older CMake versions (#7003) X-Git-Tag: cvc5-1.0.0~1392 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4e61cff7eb7fa26323f36e2784b252a869c210d9;p=cvc5.git Support older CMake versions (#7003) Fixes #7001. Commit c8bc488 introduced the use of list(PREPEND ...) which was only introduced in version 3.15. We require CMake 3.9 or later and this commit makes our build system compatible with older CMake versions again. It also changes our CI to have two builds with Ubuntu 18.04 and two builds with Ubuntu 20.04 to better cover different versions of build tools (including CMake 3.10). --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a41efb59..166003d69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: run_regression_args: --no-check-unsat-cores --no-check-proofs - name: ubuntu:production-clang - os: ubuntu-latest + os: ubuntu-18.04 env: CC=clang CXX=clang++ config: production --auto-download cache-key: productionclang @@ -35,7 +35,7 @@ jobs: run_regression_args: --no-check-unsat-cores --no-check-proofs - name: ubuntu:production-dbg - os: ubuntu-latest + os: ubuntu-18.04 config: production --auto-download --assertions --tracing --unit-testing --editline cache-key: dbg exclude_regress: 3-4 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d3f4a0e6a..698c38cae 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1190,8 +1190,8 @@ set(options_toml_files ) string(REPLACE "toml" "cpp;" options_gen_cpp_files ${options_toml_files}) string(REPLACE "toml" "h;" options_gen_h_files ${options_toml_files}) -list(PREPEND options_gen_cpp_files "options/options.cpp" "options/options_public.cpp") -list(PREPEND options_gen_h_files "options/options.h") +list(APPEND options_gen_cpp_files "options/options.cpp" "options/options_public.cpp") +list(APPEND options_gen_h_files "options/options.h") libcvc5_add_sources(GENERATED ${options_gen_cpp_files} ${options_gen_h_files})