Skip to content

Commit

Permalink
fix bug in handling dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
asartori86 authored and jurajHasik committed Feb 25, 2019
1 parent 666554c commit 8f16abe
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 17 deletions.
7 changes: 3 additions & 4 deletions meson/config/p-ipeps/config.h.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#ifndef _peps_config_h_meson
#define _peps_config_h_meson

#mesondefine PEPS_WITH_RSVD

#mesondefine PEPS_WITH_MKL

#mesondefine PEPS_WITH_ARPACK
#mesondefine PEPS_WITH_LBFGS
#mesondefine PEPS_WITH_MKL
#mesondefine PEPS_WITH_RSVD

#mesondefine COMPILER_HAS_DIAGNOSTIC_PRAGMA

Expand Down
2 changes: 1 addition & 1 deletion meson/config/p-ipeps/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ _cdata = configuration_data()
# optional_deps is defined in meson.build in the dependencies folder
foreach _opt : optional_deps
_v = 'PEPS_WITH_'+ _opt.to_upper()
_cdata.set(_v, get_variable('with_'+_opt, false))
_cdata.set(_v, get_option(_opt))
endforeach


Expand Down
1 change: 0 additions & 1 deletion meson/dependencies/lbfgs/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
set_variable('with_lbfgs', true)

include_dirs += _lbfgs_include # defined in the meson.build in the bundled subdir
#source_files += _lbfgs_source_files # defined in the meson.build in the bundled subdir
5 changes: 0 additions & 5 deletions meson/dependencies/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ foreach _opt : optional_deps
# first, we source the subdir where we test we can
# compile and link and we update the list deps
subdir(_opt)
# everything went fine and we can define a variable
# that will be used in the generation of the
# config file where we log the features of
# our project
set_variable('with_'+_opt, true)
endif
endforeach

Expand Down
6 changes: 2 additions & 4 deletions meson/dependencies/rsvd/meson.build
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# rsvd requires mkl
if not get_variable('with_mkl')
error('RSVD requires MKL. Please reconfigure by either passing -Dmkl=true or -Dmkl-dir=/path/to/mkl.')
if not get_option('mkl')
error('RSVD requires MKL. Please reconfigure by passing -Dmkl=true and eventually -Dmkl-dir=/path/to/mkl.')
endif

set_variable('with_rsvd', true)

include_dirs += _rsvd_include # defined in the meson.build in the bundled subdir
source_files += _rsvd_source_files # defined in the meson.build in the bundled subdir
2 changes: 0 additions & 2 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
option('build-examples', type: 'boolean', value: true)

# TODO these should become type feature

########### external dependendencies:
# one option with `library_name`, type boolean
# one option with `library_name-dir`, type string
Expand Down

0 comments on commit 8f16abe

Please sign in to comment.