diff --git a/.gitignore b/.gitignore index abd817b..ee40879 100644 --- a/.gitignore +++ b/.gitignore @@ -37,5 +37,4 @@ build_*/** cmake-build*/** .idea puml/** -.vscode/settings.json -config_folding.h \ No newline at end of file +.vscode/settings.json \ No newline at end of file diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index 6ae6b8b..c6c4cde 100644 --- a/config/CMakeLists.txt +++ b/config/CMakeLists.txt @@ -1,4 +1,4 @@ configure_file( "config.h.in" - "${Folding_SOURCE_DIR}/config_folding.h" ESCAPE_QUOTES + "${CMAKE_BINARY_DIR}/configured_files/include/config.h" ESCAPE_QUOTES ) diff --git a/folding.hpp b/folding.hpp index 5da01f7..6253128 100644 --- a/folding.hpp +++ b/folding.hpp @@ -4,8 +4,8 @@ #include #include #include -#include "config_folding.h" namespace folding { + const std::string FOLDING_VERSION = "1.0.1"; class Fold { protected: int k; @@ -21,7 +21,7 @@ namespace folding { } virtual std::pair, std::vector> getFold(int nFold) = 0; virtual ~Fold() = default; - std::string version() { return { folding_project_version.begin(), folding_project_version.end() }; } + std::string version() { return FOLDING_VERSION; } int getNumberOfFolds() { return k; } }; class KFold : public Fold { diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 61a6c54..5a00026 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -3,6 +3,7 @@ if(ENABLE_TESTING) ${Folding_SOURCE_DIR} ${Folding_SOURCE_DIR}/lib/Files ${Folding_SOURCE_DIR}/lib/mdlp + ${CMAKE_BINARY_DIR}/configured_files/include ) set(TEST_FOLDING "unit_tests_folding") add_executable(${TEST_FOLDING} TestFolding.cc TestUtils.cc) diff --git a/tests/TestUtils.h b/tests/TestUtils.h index 0e45c6a..11467a4 100644 --- a/tests/TestUtils.h +++ b/tests/TestUtils.h @@ -8,7 +8,7 @@ #include #include "ArffFiles.h" #include "CPPFImdlp.h" -#include "config_folding.h" +#include "config.h" bool file_exists(const std::string& name); std::pair, map> discretize(std::vector& X, mdlp::labels_t& y, std::vector features);