Skip to content

Commit

Permalink
Merge pull request #44 from RuhiRG/fixLuaCpp14
Browse files Browse the repository at this point in the history
BLD,MAINT: Fix C++14 builds
  • Loading branch information
HaoZeke committed Aug 23, 2023
2 parents 559311d + df1cfc0 commit e42be0a
Show file tree
Hide file tree
Showing 11 changed files with 12,479 additions and 20,229 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/build_lib.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/build_meson.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "[meson] test yodaLib, yodaStruct"
on: [push, pull_request]
jobs:
build_lib:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: mamba-org/setup-micromamba@v1
with:
generate-run-shell: true
environment-file: environment.yml
cache-environment: true
cache-downloads: false

- name: Build library with meson
shell: micromamba-shell {0}
run: |
mkdir bbdir
meson setup bbdir
meson compile -C bbdir
build_pkg:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: mamba-org/setup-micromamba@v1
with:
generate-run-shell: true
environment-file: environment.yml
cache-environment: true
cache-downloads: false

- name: Test application with meson
shell: micromamba-shell {0}
run: |
mkdir bbdir
meson setup bbdir -Dwith_lua=True \
-Dwith_tests=True --prefix $CONDA_PREFIX
meson install -C bbdir
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
$CONDA_PREFIX/bin/yodaStruct -c lua_inputs/config.yml
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ shellBuild/
doxyYoda
doxyYoda_*
run*
bbdir/
# Manual updates ONLY
spack.yml
/.spack-env/
Expand Down Expand Up @@ -336,4 +337,4 @@ TSWLatexianTemp*
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
5 changes: 3 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ dependencies:
- cmake
- meson
- cmake
- pkgconfig
# - lua-luafilesystem
- luarocks
# Pinned
- fmt==9.0.0
- fmt==9.1.0
- eigen==3.4.0
- lua==5.4.4
- lua==5.3.*
31 changes: 7 additions & 24 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ _deps += m_dep
_deps += [declare_dependency(link_args: '-lstdc++')]

# All of which can be installed with meson wrap install <blah> originally
subproject('eigen')
eigen_dep = dependency('eigen3',
version: '3.4.0',
required: true)
Expand Down Expand Up @@ -95,6 +94,7 @@ ydsl_sources = [
'src/ring.cpp',
'src/seams_input.cpp',
'src/seams_output.cpp',
'src/selection.cpp',
'src/shapeMatch.cpp',
'src/topo_bulk.cpp',
'src/topo_one_dim.cpp',
Expand All @@ -108,6 +108,7 @@ ydslib = library('yodaLib',
include_directories : _incdirs,
install: true
)

yds_dep = declare_dependency(
link_with: [ydslib, _linkto],
include_directories: _incdirs,
Expand All @@ -122,33 +123,15 @@ if (not meson.is_subproject())
# Lua is only used in the executable
if get_option('with_lua')
lua_dep = dependency('lua',
version : '5.4.6',
required : false)
if lua_dep.found()
version : '<5.4',
required : true)
_deps += [ lua_dep ]
endif
if (not lua_dep.found())
message('Trying with subproject lua, but luafilesystem might be problematic')
subproject('lua')
lua_dep = dependency('lua',
version : '5.4.4',
required : false)
if lua_dep.found()
_deps += [ lua_dep ]
endif
else
message('Lua not found, will assume spack is present')
# Assume spack
lua_spack_dep = cppc.find_library('lua', dirs:
meson.source_root()+'/../.spack-env/view/lib',
required: true)
_deps += [ lua_spack_dep ]
endif
# Build the executable
yds = executable('yodaStruct',
['src/main.cpp'],
['src/main.cpp',
'src/opt_parser.cpp'],
link_with : _linkto,
dependencies: _deps,
dependencies: [_deps, yds_dep],
cpp_args : _args,
include_directories : _incdirs,
install : true)
Expand Down
53 changes: 0 additions & 53 deletions src/include/external/sol/config.hpp

This file was deleted.

0 comments on commit e42be0a

Please sign in to comment.