fix cmake config

This commit is contained in:
keita
2021-10-07 23:37:31 +09:00
parent 5aed635d54
commit 9551f7280b
5 changed files with 11 additions and 4 deletions
+3 -2
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.05)
project(CocoaTweet CXX C) project(CocoaTweet CXX C)
@@ -60,7 +60,8 @@ if(ENABLE_TEST)
if(NOT (UNIX OR APPLE)) if(NOT (UNIX OR APPLE))
message(FAITAL_ERROR "unit test is NOT supported on Windows") message(FAITAL_ERROR "unit test is NOT supported on Windows")
endif() endif()
find_package(Boost 1.71.0 COMPONENTS unit_test_framework REQUIRED) set(Boost_NO_BOOST_CMAKE TRUE)
find_package(Boost 1.67 COMPONENTS unit_test_framework REQUIRED)
# Enable CTest # Enable CTest
enable_testing() enable_testing()
add_subdirectory(test) add_subdirectory(test)
+1 -1
View File
@@ -26,7 +26,7 @@ you can use these endpoint
# Installation # Installation
## Ubuntu ## Ubuntu
``` ```
# apt install clang cmake git libboost-dev libboost-test-dev libcurl4-openssl-dev libssl-dev nunja-build # apt install clang cmake git libboost-dev libboost-test-dev libcurl4-openssl-dev libssl-dev ninja-build
$ git clone https://github.com/koron0902/CocoaTweet $ git clone https://github.com/koron0902/CocoaTweet
$ cd CocoaTweet $ cd CocoaTweet
$ mkdir build $ mkdir build
+1
View File
@@ -0,0 +1 @@
---
+3
View File
@@ -0,0 +1,3 @@
Start testing: Oct 07 22:14 JST
----------------------------------------------------------
End testing: Oct 07 22:14 JST
+3 -1
View File
@@ -10,8 +10,10 @@ Tweet Tweet::parse(const std::string& _json) {
tweet.createdAt(j["created_at"]); tweet.createdAt(j["created_at"]);
tweet.text(j["text"]); tweet.text(j["text"]);
tweet.source(j["source"]); tweet.source(j["source"]);
if(j.contains("user")){
tweet.user(CocoaTweet::API::Model::User(j["user"].dump())); tweet.user(CocoaTweet::API::Model::User(j["user"].dump()));
}
return tweet; return tweet;
} }