Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion v5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ set(SOURCES_LIST
# src/inverter.cpp
)

if(NOT ${CMAKE_CROSSCOMPILING})
if(NOT CMAKE_CROSSCOMPILING)
libhal_unit_test(
SOURCES
${SOURCES_LIST}
Expand Down
15 changes: 9 additions & 6 deletions v5/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.

from conan import ConanFile
from conan.tools.cmake import CMake, cmake_layout
from conan.tools.cmake import CMake, cmake_layout, CMakeToolchain, CMakeDeps
from conan.tools.files import copy
from conan.tools.build import check_min_cppstd
import os
Expand All @@ -34,7 +34,6 @@ class libhal_util_conan(ConanFile):
settings = "compiler", "build_type", "os", "arch"
exports_sources = ("include/*", "tests/*", "LICENSE",
"CMakeLists.txt", "src/*")
generators = "CMakeToolchain", "CMakeDeps"

@property
def _min_cppstd(self):
Expand All @@ -57,7 +56,8 @@ def validate(self):
check_min_cppstd(self, self._min_cppstd)

def build_requirements(self):
self.tool_requires("cmake/3.27.1")
self.tool_requires("cmake/[^4.0.0]")
self.tool_requires("ninja/[^1.3.0]")
self.tool_requires("libhal-cmake-util/[^4.1.0]")
self.test_requires("boost-ext-ut/2.1.0")

Expand All @@ -68,9 +68,12 @@ def layout(self):
cmake_layout(self)

def generate(self):
cmake = CMake(self)
cmake.configure()
cmake.build(target="copy_compile_commands")
tc = CMakeToolchain(self)
tc.generator = "Ninja"
tc.generate()

deps = CMakeDeps(self)
deps.generate()

def build(self):
cmake = CMake(self)
Expand Down