First profiles
Signed-off-by: Ricardo Montañana Gómez <rmontanana@gmail.com>
This commit is contained in:
@@ -4,37 +4,38 @@ project(bayesnet_sample VERSION 0.1.0 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
|
||||
find_package(Torch CONFIG REQUIRED)
|
||||
find_package(fimdlp CONFIG REQUIRED)
|
||||
find_package(folding CONFIG REQUIRED)
|
||||
find_package(arff-files CONFIG REQUIRED)
|
||||
find_package(nlohmann_json CONFIG REQUIRED)
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
find_package(bayesnet CONFIG REQUIRED)
|
||||
|
||||
option(BAYESNET_VCPKG_CONFIG "Use vcpkg config for BayesNet" ON)
|
||||
# option(USING_VCPKG "Use vcpkg config for BayesNet" OFF)
|
||||
# option(USING_CONAN "Use Conan config for BayesNet" OFF)
|
||||
|
||||
if (BAYESNET_VCPKG_CONFIG)
|
||||
message(STATUS "Using BayesNet vcpkg config")
|
||||
find_package(bayesnet CONFIG REQUIRED)
|
||||
set(BayesNet_LIBRARIES bayesnet::bayesnet)
|
||||
else(BAYESNET_VCPKG_CONFIG)
|
||||
message(STATUS "Using BayesNet local library config")
|
||||
find_library(bayesnet NAMES libbayesnet bayesnet libbayesnet.a PATHS ${Platform_SOURCE_DIR}/../lib/lib REQUIRED)
|
||||
find_path(Bayesnet_INCLUDE_DIRS REQUIRED NAMES bayesnet PATHS ${Platform_SOURCE_DIR}/../lib/include)
|
||||
add_library(bayesnet::bayesnet UNKNOWN IMPORTED)
|
||||
set_target_properties(bayesnet::bayesnet PROPERTIES
|
||||
IMPORTED_LOCATION ${bayesnet}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Bayesnet_INCLUDE_DIRS}
|
||||
)
|
||||
endif(BAYESNET_VCPKG_CONFIG)
|
||||
message(STATUS "BayesNet: ${bayesnet}")
|
||||
# if (USING_VCPKG OR USING_CONAN)
|
||||
# message(STATUS "Using BayesNet vcpkg config")
|
||||
# find_package(bayesnet CONFIG REQUIRED)
|
||||
# set(BayesNet_LIBRARIES bayesnet::bayesnet)
|
||||
# else(USING_VCPKG)
|
||||
# message(STATUS "Using BayesNet local library config")
|
||||
# find_library(bayesnet NAMES libbayesnet bayesnet libbayesnet.a PATHS ${Platform_SOURCE_DIR}/../lib/lib REQUIRED)
|
||||
# find_path(Bayesnet_INCLUDE_DIRS REQUIRED NAMES bayesnet PATHS ${Platform_SOURCE_DIR}/../lib/include)
|
||||
# add_library(bayesnet::bayesnet UNKNOWN IMPORTED)
|
||||
# set_target_properties(bayesnet::bayesnet PROPERTIES
|
||||
# IMPORTED_LOCATION ${bayesnet}
|
||||
# INTERFACE_INCLUDE_DIRECTORIES ${Bayesnet_INCLUDE_DIRS}
|
||||
# )
|
||||
# endif(USING_VCPKG)
|
||||
# message(STATUS "BayesNet: ${bayesnet}")
|
||||
|
||||
add_executable(bayesnet_sample sample.cc)
|
||||
target_link_libraries(bayesnet_sample PRIVATE
|
||||
fimdlp::fimdlp
|
||||
arff-files::arff-files
|
||||
"${TORCH_LIBRARIES}"
|
||||
arff-files::arff-files
|
||||
torch::torch
|
||||
bayesnet::bayesnet
|
||||
folding::folding
|
||||
nlohmann_json::nlohmann_json
|
||||
)
|
||||
|
9
sample/CMakeUserPresets.json
Normal file
9
sample/CMakeUserPresets.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build/CMakePresets.json"
|
||||
]
|
||||
}
|
14
sample/conanfile.txt
Normal file
14
sample/conanfile.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
[requires]
|
||||
libtorch/2.7.0
|
||||
arff-files/1.2.0
|
||||
fimdlp/2.1.0
|
||||
folding/1.1.1
|
||||
bayesnet/1.2.0
|
||||
nlohmann_json/3.11.3
|
||||
|
||||
[generators]
|
||||
CMakeToolchain
|
||||
CMakeDeps
|
||||
|
||||
[options]
|
||||
libtorch/2.7.0:shared=True
|
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <ArffFiles/ArffFiles.hpp>
|
||||
#include <ArffFiles.hpp>
|
||||
#include <fimdlp/CPPFImdlp.h>
|
||||
#include <bayesnet/classifiers/TANLd.h>
|
||||
#include <bayesnet/classifiers/KDBLd.h>
|
||||
|
Reference in New Issue
Block a user