Support older CMake versions (#7003)
authorAndres Noetzli <andres.noetzli@gmail.com>
Mon, 9 Aug 2021 15:13:39 +0000 (08:13 -0700)
committerGitHub <noreply@github.com>
Mon, 9 Aug 2021 15:13:39 +0000 (08:13 -0700)
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).

.github/workflows/ci.yml
src/CMakeLists.txt

index 2a41efb59afba13ec86b4bf2e3cd8bc80742b7e3..166003d690334bda61742de20efa1af2d647cf48 100644 (file)
@@ -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
index d3f4a0e6acf1bb8362582653a585f8ccb353c416..698c38cae66efbb448508c2b61c081b230c465bc 100644 (file)
@@ -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})