Commit 67b91123 authored by Mark Meredith's avatar Mark Meredith Committed by Deepak Rangarajan
Browse files

Run tests from Meson

parent e1e081be
Loading
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -6,14 +6,24 @@ variables:

###### Test jobs #####

test:meson:
.test:meson: &conan_def
  script:
    - python -m pip install conan
    - conan create .
    # - meson test -C build --print-errorlogs
    - conan create . -s build_type=$BUILD_TYPE
  tags:
    - mfix-exa

test:meson:debug:
  variables:
    BUILD_TYPE: "Debug"
  <<: *conan_def

test:meson:release:
  variables:
    BUILD_TYPE: "Release"
  allow_failure: true
  <<: *conan_def

.test:cmake: &cmake_def
  script:
    - python -m pip install cmake ninja conan
+11 −25
Original line number Diff line number Diff line
# csg-eb

Library for parsing [Constructive Solid Geometry (CSG) files](https://github.com/openscad/openscad/wiki/CSG-File-Format) into an implicit function that can be used to define [Embedded Boundaries (EB)](https://amrex-codes.github.io/amrex/docs_html/EB.html). 
Library for parsing [Constructive Solid Geometry (CSG)
files](https://github.com/openscad/openscad/wiki/CSG-File-Format) into an
implicit function that can be used to define [Embedded Boundaries
(EB)](https://amrex-codes.github.io/amrex/docs_html/EB.html).

Uses PEGTL for parsing and Catch2 for tests.

@@ -27,23 +30,6 @@ Uses PEGTL for parsing and Catch2 for tests.
    ctest


### Meson

#### Installing meson and ninja the first time

    python3 -m pip install meson ninja

#### Building using meson

    meson build
    ninja -C build


#### Running unit tests

    meson test -C build
    

## Using the library in other projects

### Include in the code
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ class CsgEbConan(ConanFile):
        meson = Meson(self)
        meson.configure(build_folder="build")
        meson.build()
        meson.meson_test(args=['--verbose', '--print-errorlog'])

    def package(self):
        self.copy("*.h", dst="include", src="csg-eb")
+2 −2
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@ project(
  'csg-eb', 'cpp',
  version : '0.1',
  default_options : [
    'warning_level=3',
    'cpp_std=c++17'
    'warning_level=1',
    'cpp_std=c++2a'
  ]
)

+2 −2
Original line number Diff line number Diff line
@@ -2,13 +2,13 @@
# CSG Parser
################################################################################
add_library(csg
  cgal_helper_polygon.cpp
  cgal_helper_polyhedron.cpp
  csg.cpp
  levelset_2d.cpp
  levelset_3d.cpp
  matrix_functions.cpp
  parser.cpp
  cgal_helper_polyhedron.cpp
  cgal_helper_polygon.cpp
  )

target_link_libraries(csg PRIVATE
Loading