Continue conan integration
This commit is contained in:
@@ -7,6 +7,7 @@ project(Folding
|
|||||||
)
|
)
|
||||||
|
|
||||||
find_package(Torch REQUIRED)
|
find_package(Torch REQUIRED)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
|
||||||
|
|
||||||
if (POLICY CMP0135)
|
if (POLICY CMP0135)
|
||||||
cmake_policy(SET CMP0135 NEW)
|
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...";
|
@echo ">>> Building Debug Folding...";
|
||||||
@if [ -d ./$(f_debug) ]; then rm -rf ./$(f_debug); fi
|
@if [ -d ./$(f_debug) ]; then rm -rf ./$(f_debug); fi
|
||||||
@mkdir $(f_debug);
|
@mkdir $(f_debug);
|
||||||
@conan install . --output-folder=$(f_debug) --build=missing
|
@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
|
@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";
|
@echo ">>> Done";
|
||||||
|
|
||||||
opt = ""
|
opt = ""
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
import re
|
import re
|
||||||
from conan import ConanFile
|
from conan import ConanFile
|
||||||
from conan.tools.files import copy
|
from conan.tools.files import copy
|
||||||
|
from conan.tools.cmake import CMakeToolchain
|
||||||
|
|
||||||
|
|
||||||
class FoldingConan(ConanFile):
|
class FoldingConan(ConanFile):
|
||||||
@@ -26,6 +27,10 @@ class FoldingConan(ConanFile):
|
|||||||
self.test_requires("arff-files/1.2.0")
|
self.test_requires("arff-files/1.2.0")
|
||||||
self.test_requires("fimdlp/2.0.1")
|
self.test_requires("fimdlp/2.0.1")
|
||||||
|
|
||||||
|
def generate(self):
|
||||||
|
tc = CMakeToolchain(self)
|
||||||
|
tc.generate()
|
||||||
|
|
||||||
def init(self):
|
def init(self):
|
||||||
# Read the CMakeLists.txt file to get the version
|
# Read the CMakeLists.txt file to get the version
|
||||||
with open("folding.hpp", "r") as f:
|
with open("folding.hpp", "r") as f:
|
||||||
|
Reference in New Issue
Block a user