Restored unit tests
This commit is contained in:
+2
-1
@@ -8,8 +8,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(IMAGEMAGICKXX REQUIRED ImageMagick++)
|
||||
|
||||
enable_testing()
|
||||
|
||||
SUBDIRS(src)
|
||||
add_subdirectory(src)
|
||||
|
||||
install(DIRECTORY approot DESTINATION share/lms)
|
||||
install(DIRECTORY docroot DESTINATION share/lms)
|
||||
|
||||
@@ -5,6 +5,7 @@ add_subdirectory(cover)
|
||||
add_subdirectory(database)
|
||||
add_subdirectory(recommendation)
|
||||
add_subdirectory(scanner)
|
||||
add_subdirectory(som)
|
||||
add_subdirectory(subsonic)
|
||||
add_subdirectory(utils)
|
||||
|
||||
|
||||
@@ -35,3 +35,4 @@ target_link_libraries(lmsdatabase PUBLIC
|
||||
|
||||
install(TARGETS lmsdatabase DESTINATION lib)
|
||||
|
||||
add_subdirectory(test)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
add_executable(test-database
|
||||
DatabaseTest.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(test-database PRIVATE
|
||||
lmsdatabase
|
||||
)
|
||||
|
||||
add_test(NAME database COMMAND test-database)
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
add_library(lmsrecommendation SHARED
|
||||
impl/Engine.cpp
|
||||
impl/ProviderCreator.cpp
|
||||
impl/features/som/DataNormalizer.cpp
|
||||
impl/features/som/Network.cpp
|
||||
)
|
||||
|
||||
target_include_directories(lmsrecommendation INTERFACE
|
||||
@@ -16,9 +14,7 @@ target_include_directories(lmsrecommendation PRIVATE
|
||||
|
||||
target_link_libraries(lmsrecommendation PRIVATE
|
||||
lmsdatabase
|
||||
)
|
||||
|
||||
target_link_libraries(lmsrecommendation PUBLIC
|
||||
lmssom
|
||||
)
|
||||
|
||||
install(TARGETS lmsrecommendation DESTINATION lib)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
add_library(lmssom STATIC
|
||||
impl/DataNormalizer.cpp
|
||||
impl/Network.cpp
|
||||
)
|
||||
|
||||
target_include_directories(lmssom INTERFACE
|
||||
include
|
||||
)
|
||||
|
||||
target_include_directories(lmssom PRIVATE
|
||||
include
|
||||
)
|
||||
|
||||
target_link_libraries(lmssom PUBLIC
|
||||
lmsutils
|
||||
)
|
||||
|
||||
add_subdirectory(test)
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "DataNormalizer.hpp"
|
||||
#include "som/DataNormalizer.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Network.hpp"
|
||||
#include "som/Network.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
+2
@@ -23,6 +23,8 @@
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
#include "utils/Exception.hpp"
|
||||
|
||||
namespace SOM
|
||||
{
|
||||
|
||||
-1
@@ -25,7 +25,6 @@
|
||||
#include <ostream>
|
||||
#include <functional>
|
||||
|
||||
#include "utils/Exception.hpp"
|
||||
#include "InputVector.hpp"
|
||||
#include "Matrix.hpp"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
add_executable(test-som
|
||||
SomTest.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(test-som PRIVATE
|
||||
lmssom
|
||||
)
|
||||
|
||||
add_test(NAME som COMMAND test-som)
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
#include "DataNormalizer.hpp"
|
||||
#include "Network.hpp"
|
||||
#include "som/DataNormalizer.hpp"
|
||||
#include "som/Network.hpp"
|
||||
|
||||
using namespace SOM;
|
||||
|
||||
@@ -24,7 +24,9 @@ target_link_libraries(lmsutils PRIVATE
|
||||
)
|
||||
|
||||
target_link_libraries(lmsutils PUBLIC
|
||||
boost_system
|
||||
stdc++fs
|
||||
wt
|
||||
)
|
||||
|
||||
install(TARGETS lmsutils DESTINATION lib)
|
||||
|
||||
Reference in New Issue
Block a user