mirror of
https://github.com/rmontanana/mdlp.git
synced 2025-08-21 02:15:57 +00:00
Compare commits
3 Commits
c4e6c041fe
...
b3fc598c29
Author | SHA1 | Date | |
---|---|---|---|
b3fc598c29
|
|||
cc1efa0b4e
|
|||
90965877eb
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
|||||||
unzip libtorch-cxx11-abi-shared-with-deps-2.3.1+cpu.zip
|
unzip libtorch-cxx11-abi-shared-with-deps-2.3.1+cpu.zip
|
||||||
- name: Tests & build-wrapper
|
- name: Tests & build-wrapper
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -Wno-dev -DCMAKE_PREFIX_PATH=$(pwd)/libtorch
|
cmake -S . -B build -Wno-dev -DCMAKE_PREFIX_PATH=$(pwd)/libtorch -DENABLE_TESTING=ON
|
||||||
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/ --config Release
|
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/ --config Release
|
||||||
cd build
|
cd build
|
||||||
make
|
make
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -33,6 +33,8 @@
|
|||||||
**/build
|
**/build
|
||||||
build_Debug
|
build_Debug
|
||||||
build_Release
|
build_Release
|
||||||
|
build_debug
|
||||||
|
build_release
|
||||||
**/lcoverage
|
**/lcoverage
|
||||||
.idea
|
.idea
|
||||||
cmake-*
|
cmake-*
|
||||||
|
@@ -6,4 +6,6 @@ include_directories(${TORCH_INCLUDE_DIRS})
|
|||||||
add_library(mdlp CPPFImdlp.cpp Metrics.cpp BinDisc.cpp Discretizer.cpp)
|
add_library(mdlp CPPFImdlp.cpp Metrics.cpp BinDisc.cpp Discretizer.cpp)
|
||||||
target_link_libraries(mdlp "${TORCH_LIBRARIES}")
|
target_link_libraries(mdlp "${TORCH_LIBRARIES}")
|
||||||
add_subdirectory(sample)
|
add_subdirectory(sample)
|
||||||
|
if (ENABLE_TESTING)
|
||||||
add_subdirectory(tests)
|
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
|
@@ -34,6 +34,5 @@ build/sample/sample -h
|
|||||||
To run the tests and see coverage (llvm & gcovr have to be installed), execute the following commands:
|
To run the tests and see coverage (llvm & gcovr have to be installed), execute the following commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd tests
|
make test
|
||||||
./test
|
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user