date.h as git submodule.

This commit is contained in:
Per Malmberg 2018-03-11 20:24:55 +01:00
parent 74e1ad4d60
commit 582d0c4369
9 changed files with 14 additions and 8058 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "libcron/externals/date"]
path = libcron/externals/date
url = https://github.com/HowardHinnant/date.git

View File

@ -4,7 +4,7 @@ project(libcron)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
include_directories(externals/date) include_directories(${CMAKE_CURRENT_LIST_DIR}/externals/date/include)
add_library(${PROJECT_NAME} add_library(${PROJECT_NAME}
Cron.h Cron.h
@ -15,6 +15,6 @@ add_library(${PROJECT_NAME}
CronData.cpp CronData.cpp
CronSchedule.cpp CronSchedule.cpp
CronSchedule.h CronSchedule.h
externals/date/date.h
DateTime.h DateTime.h
Task.cpp CronClock.h) Task.cpp
CronClock.h)

View File

@ -1,4 +1,4 @@
#include <date.h> #include <date/date.h>
#include "CronData.h" #include "CronData.h"
using namespace date; using namespace date;

View File

@ -2,7 +2,7 @@
#include "CronData.h" #include "CronData.h"
#include <chrono> #include <chrono>
#include "externals/date/date.h" #include <date/date.h>
#include "DateTime.h" #include "DateTime.h"
namespace libcron namespace libcron

1
libcron/externals/date vendored Submodule

@ -0,0 +1 @@
Subproject commit 38c5ca38bb73b292b72e088c31595add564d31f6

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,9 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wpedantic -Wextra") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wpedantic -Wextra")
include_directories( include_directories(
externals/Catch2/single_include/ ${CMAKE_CURRENT_LIST_DIR}/externals/Catch2/single_include/
.. ${CMAKE_CURRENT_LIST_DIR}/../libcron/externals/date/include
../libcron/externals/date ${CMAKE_CURRENT_LIST_DIR}/..
) )
add_executable( add_executable(

View File

@ -1,7 +1,7 @@
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <catch.hpp> #include <catch.hpp>
#include <date.h> #include <date/date.h>
#include <libcron/Cron.h> #include <libcron/Cron.h>
#include <libcron/CronData.h> #include <libcron/CronData.h>
@ -21,8 +21,6 @@ bool has_value_range(const std::set<T>& set, uint8_t low, uint8_t high)
return found; return found;
} }
SCENARIO("Numerical inputs") SCENARIO("Numerical inputs")
{ {
GIVEN("Valid numerical inputs") GIVEN("Valid numerical inputs")

View File

@ -1,6 +1,6 @@
#include <catch.hpp> #include <catch.hpp>
#include <chrono> #include <chrono>
#include <date.h> #include <date/date.h>
#include <libcron/Cron.h> #include <libcron/Cron.h>
#include <iostream> #include <iostream>