fix(cpp_args): properly propegate args
previously Cpp args were set with add_project_argument, which does not work from subprojects. Changed this so args can be set from calling projects
This commit is contained in:
@@ -33,7 +33,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('openmp_support')
|
if get_option('openmp_support')
|
||||||
add_project_arguments('-DGF_USE_OPENMP', language: 'cpp')
|
gridfire_args += ['-DGF_USE_OPENMP']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('asan') and get_option('buildtype') != 'debug' and get_option('buildtype') != 'debugoptimized'
|
if get_option('asan') and get_option('buildtype') != 'debug' and get_option('buildtype') != 'debugoptimized'
|
||||||
|
|||||||
@@ -34,3 +34,10 @@ cppad_dep = declare_dependency(
|
|||||||
link_with: libcppad_static,
|
link_with: libcppad_static,
|
||||||
include_directories: cppad_incs
|
include_directories: cppad_incs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
message('Installing CppAD headers to ' + get_option('includedir'))
|
||||||
|
install_subdir(
|
||||||
|
'subprojects/CppAD-20250000.2/include',
|
||||||
|
install_dir: get_option('includedir'),
|
||||||
|
strip_directory: true
|
||||||
|
)
|
||||||
|
|||||||
@@ -29,4 +29,4 @@ elif (llevel == 'critical')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
log_argument = '-DQUILL_COMPILE_ACTIVE_LOG_LEVEL=' + log_argument
|
log_argument = '-DQUILL_COMPILE_ACTIVE_LOG_LEVEL=' + log_argument
|
||||||
add_project_arguments(log_argument, language: 'cpp')
|
gridfire_args += [log_argument]
|
||||||
|
|||||||
@@ -9,7 +9,11 @@ if get_option('pkg_config')
|
|||||||
libgridfire,
|
libgridfire,
|
||||||
libcomposition,
|
libcomposition,
|
||||||
libconst,
|
libconst,
|
||||||
liblogging
|
liblogging,
|
||||||
|
libcppad_static,
|
||||||
|
libcvode_static,
|
||||||
|
libkinsol_static
|
||||||
|
|
||||||
],
|
],
|
||||||
subdirs: ['gridfire'],
|
subdirs: ['gridfire'],
|
||||||
filebase: 'gridfire',
|
filebase: 'gridfire',
|
||||||
|
|||||||
@@ -18,7 +18,9 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
# *********************************************************************** #
|
# *********************************************************************** #
|
||||||
project('GridFire', ['c', 'cpp'], version: 'v0.7.6rc3.3', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
|
project('GridFire', ['c', 'cpp'], version: 'v0.7.6rc3.4', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
|
||||||
|
|
||||||
|
gridfire_args = []
|
||||||
|
|
||||||
# Start by running the code which validates the build environment
|
# Start by running the code which validates the build environment
|
||||||
subdir('build-check')
|
subdir('build-check')
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
# Define the library
|
# Define the library
|
||||||
|
subdir('include/gridfire/utils') # Generate the version header file first
|
||||||
|
|
||||||
gridfire_sources = files(
|
gridfire_sources = files(
|
||||||
'lib/engine/engine_graph.cpp',
|
'lib/engine/engine_graph.cpp',
|
||||||
'lib/engine/views/engine_adaptive.cpp',
|
'lib/engine/views/engine_adaptive.cpp',
|
||||||
@@ -63,6 +65,7 @@ if get_option('build_python')
|
|||||||
gridfire_sources,
|
gridfire_sources,
|
||||||
include_directories: include_directories('include'),
|
include_directories: include_directories('include'),
|
||||||
dependencies: gridfire_build_dependencies,
|
dependencies: gridfire_build_dependencies,
|
||||||
|
cpp_args: gridfire_args,
|
||||||
objects: [cvode_objs, kinsol_objs],
|
objects: [cvode_objs, kinsol_objs],
|
||||||
install : false)
|
install : false)
|
||||||
else
|
else
|
||||||
@@ -71,6 +74,7 @@ else
|
|||||||
include_directories: include_directories('include'),
|
include_directories: include_directories('include'),
|
||||||
dependencies: gridfire_build_dependencies,
|
dependencies: gridfire_build_dependencies,
|
||||||
objects: [cvode_objs, kinsol_objs],
|
objects: [cvode_objs, kinsol_objs],
|
||||||
|
cpp_args: gridfire_args,
|
||||||
install : true)
|
install : true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -79,6 +83,7 @@ gridfire_dep = declare_dependency(
|
|||||||
link_with: libgridfire,
|
link_with: libgridfire,
|
||||||
sources: gridfire_sources,
|
sources: gridfire_sources,
|
||||||
dependencies: gridfire_build_dependencies,
|
dependencies: gridfire_build_dependencies,
|
||||||
|
compile_args: gridfire_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
install_subdir('include/gridfire', install_dir: get_option('includedir'))
|
install_subdir('include/gridfire', install_dir: get_option('includedir'))
|
||||||
|
|||||||
Reference in New Issue
Block a user