From 3e0c627cd8e047cfe054af1d4c25baaf1d63f9a6 Mon Sep 17 00:00:00 2001 From: baronml Date: Wed, 7 Aug 2024 17:15:25 +0200 Subject: [PATCH] Split CMakeLists for libjapi compiling and test-framework with each differnt cmake version number --- CMakeLists.txt | 5 +++-- README.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec7b010..f5822f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.14) +cmake_minimum_required(VERSION 3.6) project(libjapi VERSION 0.4) set(SOVERSION 1) @@ -67,6 +67,7 @@ endif(DOXYGEN_FOUND) # Create unit test excecutable # option(LIBJAPI_ENABLE_TESTING "Enable testing with googletest" ON) if(LIBJAPI_ENABLE_TESTING) + cmake_minimum_required(VERSION 3.14) enable_testing() # Include GoogleTest in the project @@ -105,4 +106,4 @@ if(LIBJAPI_ENABLE_TESTING) append_coverage_compiler_flags() setup_target_for_coverage_lcov(NAME coverage EXECUTABLE testsuite) endif() -endif(LIBJAPI_ENABLE_TESTING) +endif(LIBJAPI_ENABLE_TESTING) \ No newline at end of file diff --git a/README.md b/README.md index 34a5c4c..5b6fffe 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ Prebuild packages for CentOS 7 can be downloaded from the [latest package Action ### Prerequisites * [json-c](https://github.com/json-c/json-c) -* [cmake version 3.6](https://cmake.org/) +* [cmake version 3.6](https://cmake.org/) for libjapi build +* [cmake version 3.14](https://cmake.org/) for libjapi test-framework build ### Installation Clone the git repository and it's submodules: @@ -38,7 +39,7 @@ A Makefile is generated. Run 'make' to build the libjapi libraries. $ make -A shared and a static library is built. Tests are built by default. They can be disabled using the command `cmake -DLIBJAPI_ENABLE_TESTING=FALSE ../` variable. +A shared and a static library is built. Tests are built by default. They can be disabled using the command `cmake -DLIBJAPI_ENABLE_TESTING=OFF ../` variable. To run the internal tests run