fix cmake config
This commit is contained in:
+3
-2
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
cmake_minimum_required(VERSION 3.05)
|
||||
|
||||
project(CocoaTweet CXX C)
|
||||
|
||||
@@ -60,7 +60,8 @@ if(ENABLE_TEST)
|
||||
if(NOT (UNIX OR APPLE))
|
||||
message(FAITAL_ERROR "unit test is NOT supported on Windows")
|
||||
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_testing()
|
||||
add_subdirectory(test)
|
||||
|
||||
@@ -26,7 +26,7 @@ you can use these endpoint
|
||||
# Installation
|
||||
## 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
|
||||
$ cd CocoaTweet
|
||||
$ mkdir build
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
---
|
||||
@@ -0,0 +1,3 @@
|
||||
Start testing: Oct 07 22:14 JST
|
||||
----------------------------------------------------------
|
||||
End testing: Oct 07 22:14 JST
|
||||
@@ -10,8 +10,10 @@ Tweet Tweet::parse(const std::string& _json) {
|
||||
tweet.createdAt(j["created_at"]);
|
||||
tweet.text(j["text"]);
|
||||
tweet.source(j["source"]);
|
||||
|
||||
if(j.contains("user")){
|
||||
tweet.user(CocoaTweet::API::Model::User(j["user"].dump()));
|
||||
}
|
||||
|
||||
|
||||
return tweet;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user