Skip to content

Commit

Permalink
v0.1.2 patched
Browse files Browse the repository at this point in the history
  • Loading branch information
peekxc committed Jul 16, 2024
1 parent bc2f8dd commit 360347d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
33 changes: 31 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ project(
license: 'Apache-2.0',
meson_version: '>= 0.64.0',
default_options : [
'buildtype=debugoptimized',
'buildtype=release',
'b_ndebug=if-release',
'cpp_std=c++17',
'warning_level=2'
'warning_level=2',
'pkgconfig.relocatable=true'
]
)

Expand All @@ -26,6 +28,33 @@ inc_local = include_directories('include')
incdir_numpy = run_command(py, ['-c', 'import os; os.chdir(".."); import numpy; print(numpy.get_include())'], check : true).stdout().strip()
inc_np = include_directories(incdir_numpy)

## Begin compiler arguments
compiler = meson.get_compiler('cpp')
message('Compiler = '+compiler.get_id())
_cpp_args = []
if get_option('buildtype') == 'debugoptimized'
_cpp_args += compiler.get_supported_arguments(
'-O2',
# '-fsanitize=address',
# '-fno-omit-frame-pointer',
'-g',
'-Wall'
)
else
## Release
_cpp_args += compiler.get_supported_arguments(
'-flto=thin', # think LTO
# '-flto', # monolithic LTO
'-O3', # full optimizations
'-DNDEBUG', # remove assertions
'-Wl,-s', # strip symbols to reduce binary size
# '-march=native' # either this or lto seems to not work on multiple builds
)
endif




## Compile the package directory
subdir('simplextree')

Expand Down
6 changes: 1 addition & 5 deletions simplextree/meson.build
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
## Message the C++ compiler location for debugging
compiler = meson.get_compiler('cpp')
message('Compiler = '+compiler.get_id())

## Compiler flags
_cpp_args = compiler.get_supported_arguments(
_cpp_args += compiler.get_supported_arguments(
'-Wno-unused-parameter',
'-Wno-reserved-identifier',
'/Wc++11-extensions',
Expand Down

0 comments on commit 360347d

Please # to comment.