Commit 2437e3dc authored by Mark Meredith's avatar Mark Meredith Committed by Deepak Rangarajan
Browse files

Call meson from conan instead of conan from meson

parent 8d9bb2d4
......@@ -8,9 +8,9 @@ variables:
test:meson:
script:
- python -m pip install meson ninja conan
- meson build
- meson test -C build --print-errorlogs
- python -m pip install conan
- conan create .
# - meson test -C build --print-errorlogs
tags:
- mfix-exa
......
......@@ -19,7 +19,7 @@ find_program(CONAN_FOUND conan)
if(CONAN_FOUND)
message(STATUS "Using conan found at: ${CONAN_FOUND}")
include(conan.cmake)
conan_cmake_run(CONANFILE conanfile.txt
conan_cmake_run(CONANFILE conanfile.py
BASIC_SETUP CMAKE_TARGETS)
else()
message(WARNING "Did not find conan in PATH. Will try download it with PMM <https://github.com/vector-of-bool/pmm>")
......
from conans import ConanFile, Meson, tools
class CsgEbConan(ConanFile):
name = "csg-eb"
version = "0.1"
license = "<Put the package license here>"
author = "Deepak Rangarajan <Deepak.Rangarajan@netl.doe.gov>"
url = "https://mfix.netl.doe.gov/gitlab/exa/csg-eb"
description = "Library for reading CSG geometry files"
topics = ("<Put some tag here>", "<here>", "<and here>")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
default_options = {"shared": False}
generators = "pkg_config"
requires = "catch2/2.12.2", "cgal/5.0.2", "taocpp-pegtl/2.8.3"
build_requires = "meson/0.54.2"
exports_sources = "meson.build", "include/*", "src/*"
def build(self):
meson = Meson(self)
meson.configure(build_folder="build")
meson.build()
def package(self):
self.copy("*.h", dst="include", src="csg-eb")
self.copy("*.a", dst="lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = ["csg-eb"]
[requires]
catch2/2.12.2
cgal/5.0.2
taocpp-pegtl/2.8.3
[generators]
pkg_config
project('csg-eb', 'cpp',
version : '0.1',
default_options : [
'warning_level=3',
'pkg_config_path=' + meson.build_root(),
'cpp_std=c++2a'])
run_command('conan', 'install', '--install-folder', meson.build_root(),
meson.current_source_dir(), check: true)
project(
'csg-eb', 'cpp',
version : '0.1',
default_options : [
'warning_level=3',
'cpp_std=c++17'
]
)
pegtl = dependency('taocpp-pegtl', method: 'pkg-config')
catch2 = dependency('catch2', method: 'pkg-config')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment