From bccf6187bb8b4a297f4f4be795a77b1653634208 Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Tue, 18 Jun 2024 21:33:41 +0200 Subject: [PATCH] FIX: Adapt BUILD_ACM option for Conan 2.0 --- Makefile | 4 ++-- conanfile.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 991ee65..29f9bd7 100644 --- a/Makefile +++ b/Makefile @@ -68,11 +68,11 @@ conan-install-debug: .PHONY: conan-install-debug conan-create: - conan create -s $(CONAN_SETTINGS) -o caosdb:build_acm=True . + conan create -s $(CONAN_SETTINGS) -o caosdb/*:build_acm=True . .PHONY: conan-create conan-create-debug: - conan create -s $(CONAN_SETTINGS) -s build_type=Debug -o caosdb:build_acm=True . + conan create -s $(CONAN_SETTINGS) -s build_type=Debug -o caosdb/*:build_acm=True . .PHONY: conan-create-debug diff --git a/conanfile.py b/conanfile.py index fb6a3a6..6170fa5 100644 --- a/conanfile.py +++ b/conanfile.py @@ -49,7 +49,8 @@ class CaosdbConan(ConanFile): def generate(self): tc = CMakeToolchain(self) - # This writes the "conan_toolchain.cmake" + if self.options.build_acm: + tc.cache_variables["BUILD_ACM"] = "ON" tc.generate() cmake = CMakeDeps(self) @@ -66,10 +67,9 @@ class CaosdbConan(ConanFile): def build(self): cmake = CMake(self) - if self.options.build_acm: - cmake.definitions["BUILD_ACM"] = "On" + cmake.configure() - cmake.build(target=["all", "ccaosdbcli", "cxxcaosdbcli"]) + cmake.build(target=["all"]) # , "ccaosdbcli", "cxxcaosdbcli"]) def package(self): cmake = CMake(self) -- GitLab