mirror of
https://github.com/rmontanana/mdlp.git
synced 2025-08-15 23:45:57 +00:00
Add Makefile with build & test actions
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -33,6 +33,8 @@
|
||||
**/build
|
||||
build_Debug
|
||||
build_Release
|
||||
build_debug
|
||||
build_release
|
||||
**/lcoverage
|
||||
.idea
|
||||
cmake-*
|
||||
|
@@ -6,4 +6,6 @@ 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)
|
||||
if (ENABLE_TESTING)
|
||||
add_subdirectory(tests)
|
||||
endif(ENABLE_TESTING)
|
||||
|
13
Makefile
Normal file
13
Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
SHELL := /bin/bash
|
||||
.DEFAULT_GOAL := build
|
||||
.PHONY: build test
|
||||
|
||||
build:
|
||||
@if [ -d build_release ]; then rm -fr build_release; fi
|
||||
@mkdir build_release
|
||||
@cmake -B build_release -S . -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=OFF
|
||||
@cmake --build build_release
|
||||
|
||||
test:
|
||||
@echo "Testing..."
|
||||
@cd tests && ./test
|
Reference in New Issue
Block a user