mirror of
https://github.com/rmontanana/mdlp.git
synced 2025-08-15 15:35:55 +00:00
Fix BinDisc quantile mistakes (#9)
* Fix BinDisc quantile mistakes * Fix FImdlp tests * Fix tests, samples and remove uneeded support files * Add coypright header to sources Fix coverage report Add coverage badge to README * Update sonar github action * Move sources to a folder and change ArffFiles files to library * Add recursive submodules to github action
This commit is contained in:
committed by
GitHub
parent
7b0673fd4b
commit
e36d9af8f9
@@ -1,11 +1,34 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
project(mdlp)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
cmake_policy(SET CMP0135 NEW)
|
||||
|
||||
find_package(Torch REQUIRED)
|
||||
include_directories(${TORCH_INCLUDE_DIRS})
|
||||
add_library(mdlp CPPFImdlp.cpp Metrics.cpp BinDisc.cpp Discretizer.cpp)
|
||||
target_link_libraries(mdlp "${TORCH_LIBRARIES}")
|
||||
add_subdirectory(sample)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-elide-constructors")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
|
||||
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-default-inline")
|
||||
endif()
|
||||
|
||||
if (ENABLE_TESTING)
|
||||
MESSAGE("Debug mode")
|
||||
enable_testing()
|
||||
set(CODE_COVERAGE ON)
|
||||
SET(GCC_COVERAGE_LINK_FLAGS " ${GCC_COVERAGE_LINK_FLAGS} -lgcov --coverage")
|
||||
add_subdirectory(tests)
|
||||
else(ENABLE_TESTING)
|
||||
MESSAGE("Release mode")
|
||||
endif(ENABLE_TESTING)
|
||||
|
||||
|
||||
add_subdirectory(sample)
|
||||
|
||||
include_directories(
|
||||
${TORCH_INCLUDE_DIRS}
|
||||
${mdlp_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
add_library(mdlp src/CPPFImdlp.cpp src/Metrics.cpp src/BinDisc.cpp src/Discretizer.cpp)
|
||||
target_link_libraries(mdlp "${TORCH_LIBRARIES}")
|
Reference in New Issue
Block a user