Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arff deserialiser #4627

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions cmake/external/date.cmake
@@ -0,0 +1,16 @@
include(ExternalProject)
set(DATE_PREFIX ${CMAKE_BINARY_DIR}/date)
set(DATE_SOURCE_DIR "${THIRD_PARTY_DIR}/date")
set(DATE_INCLUDE_DIR "${DATE_SOURCE_DIR}/include")
ExternalProject_Add(
date
PREFIX ${DATE_PREFIX}
SOURCE_DIR ${DATE_SOURCE_DIR}
GIT_REPOSITORY https://github.com/HowardHinnant/date.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems ok to me to have this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, this will be part of the stl in C++20, so might as well start using it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hahahaha
Ah man, finally in c++20, c++ will have nice date parsing... things are changing fast these days ;)

GIT_TAG e7e1482087f58913b80a20b04d5c58d9d6d90155
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${DATE_INCLUDE_DIR}/ ${THIRD_PARTY_INCLUDE_DIR}/
)

add_dependencies(libshogun date)
1 change: 1 addition & 0 deletions src/interfaces/swig/IO.i
Expand Up @@ -79,6 +79,7 @@
%shared_ptr(shogun::StreamingFileFromDenseFeatures<floatmax_t>)
#endif

%include <shogun/io/ARFFFile.h>
%include <shogun/io/File.h>
%include <shogun/io/streaming/StreamingFile.h>
%include <shogun/io/streaming/StreamingFileFromFeatures.h>
Expand Down
1 change: 1 addition & 0 deletions src/interfaces/swig/IO_includes.i
@@ -1,4 +1,5 @@
%{
#include <shogun/io/ARFFFile.h>
#include <shogun/io/IOBuffer.h>
#include <shogun/io/streaming/ParseBuffer.h>
#include <shogun/io/streaming/InputParser.h>
Expand Down
6 changes: 6 additions & 0 deletions src/shogun/CMakeLists.txt
Expand Up @@ -522,6 +522,12 @@ SHOGUN_DEPENDENCIES(
SCOPE PRIVATE
CONFIG_FLAG HAVE_ARPREC)

# Date external lib
include(external/date)
SHOGUN_INCLUDE_DIRS(SCOPE PUBLIC
$<BUILD_INTERFACE:${DATE_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include/shogun/third_party/date>)

############################ HMM
OPTION(USE_HMMDEBUG "HMM debug mode" OFF)
OPTION(USE_HMMCACHE "HMM cache" ON)
Expand Down