Continue conan integration
This commit is contained in:
@@ -7,6 +7,7 @@ project(Folding
|
||||
)
|
||||
|
||||
find_package(Torch REQUIRED)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
|
||||
|
||||
if (POLICY CMP0135)
|
||||
cmake_policy(SET CMP0135 NEW)
|
||||
|
9
CMakeUserPresets.json
Normal file
9
CMakeUserPresets.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build_Debug/CMakePresets.json"
|
||||
]
|
||||
}
|
4
Makefile
4
Makefile
@@ -28,8 +28,8 @@ build: ## Build a debug version of the project
|
||||
@echo ">>> Building Debug Folding...";
|
||||
@if [ -d ./$(f_debug) ]; then rm -rf ./$(f_debug); fi
|
||||
@mkdir $(f_debug);
|
||||
@conan install . --output-folder=$(f_debug) --build=missing
|
||||
@cmake -S . -B $(f_debug) -D CMAKE_BUILD_TYPE=Debug -D ENABLE_TESTING=ON
|
||||
@conan install . --output-folder=$(f_debug) --build=missing --profile:build=default --profile:host=default
|
||||
@cmake -S . -B $(f_debug) -D CMAKE_BUILD_TYPE=Debug -D ENABLE_TESTING=ON -D CMAKE_TOOLCHAIN_FILE=$(f_debug)/conan_toolchain.cmake
|
||||
@echo ">>> Done";
|
||||
|
||||
opt = ""
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import re
|
||||
from conan import ConanFile
|
||||
from conan.tools.files import copy
|
||||
from conan.tools.cmake import CMakeToolchain
|
||||
|
||||
|
||||
class FoldingConan(ConanFile):
|
||||
@@ -26,6 +27,10 @@ class FoldingConan(ConanFile):
|
||||
self.test_requires("arff-files/1.2.0")
|
||||
self.test_requires("fimdlp/2.0.1")
|
||||
|
||||
def generate(self):
|
||||
tc = CMakeToolchain(self)
|
||||
tc.generate()
|
||||
|
||||
def init(self):
|
||||
# Read the CMakeLists.txt file to get the version
|
||||
with open("folding.hpp", "r") as f:
|
||||
|
Reference in New Issue
Block a user