diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a2a6eb..a4a6118 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/README.md b/README.md index 7106e74..41f443d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/Testing/Temporary/CTestCostData.txt b/Testing/Temporary/CTestCostData.txt new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/Testing/Temporary/CTestCostData.txt @@ -0,0 +1 @@ +--- diff --git a/Testing/Temporary/LastTest.log b/Testing/Temporary/LastTest.log new file mode 100644 index 0000000..873b00a --- /dev/null +++ b/Testing/Temporary/LastTest.log @@ -0,0 +1,3 @@ +Start testing: Oct 07 22:14 JST +---------------------------------------------------------- +End testing: Oct 07 22:14 JST diff --git a/src/cocoatweet/api/model/tweet.cc b/src/cocoatweet/api/model/tweet.cc index 26988ac..22f971e 100644 --- a/src/cocoatweet/api/model/tweet.cc +++ b/src/cocoatweet/api/model/tweet.cc @@ -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())); + } - tweet.user(CocoaTweet::API::Model::User(j["user"].dump())); return tweet; }