diff --git a/.gitignore b/.gitignore index 41ce7a4..90155ef 100644 --- a/.gitignore +++ b/.gitignore @@ -62,9 +62,10 @@ subprojects/mfem/ subprojects/tetgen/ subprojects/yaml-cpp/ subprojects/quill/ +subprojects/googletest-1.15.2/ .vscode/ *.log -output/ \ No newline at end of file +output/ diff --git a/subprojects/gtest.wrap b/subprojects/gtest.wrap new file mode 100644 index 0000000..7b1e69e --- /dev/null +++ b/subprojects/gtest.wrap @@ -0,0 +1,16 @@ +[wrap-file] +directory = googletest-1.15.2 +source_url = https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz +source_filename = gtest-1.15.2.tar.gz +source_hash = 7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926 +patch_filename = gtest_1.15.2-2_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/gtest_1.15.2-2/get_patch +patch_hash = 641a16b33c96cd32a593537bc30eb7d853c5cc361fa1ee96884f0e2fca21e2d3 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/gtest_1.15.2-2/gtest-1.15.2.tar.gz +wrapdb_version = 1.15.2-2 + +[provide] +gtest = gtest_dep +gtest_main = gtest_main_dep +gmock = gmock_dep +gmock_main = gmock_main_dep diff --git a/subprojects/packagecache/gtest-1.15.2.tar.gz b/subprojects/packagecache/gtest-1.15.2.tar.gz new file mode 100644 index 0000000..fd66554 Binary files /dev/null and b/subprojects/packagecache/gtest-1.15.2.tar.gz differ diff --git a/subprojects/packagecache/gtest_1.15.2-2_patch.zip b/subprojects/packagecache/gtest_1.15.2-2_patch.zip new file mode 100644 index 0000000..68295f3 Binary files /dev/null and b/subprojects/packagecache/gtest_1.15.2-2_patch.zip differ diff --git a/tests/config/meson.build b/tests/config/meson.build index 7ae9ae9..1aaffb1 100644 --- a/tests/config/meson.build +++ b/tests/config/meson.build @@ -11,7 +11,7 @@ foreach test_file : test_sources test_exe = executable( exe_name, test_file, - dependencies: [gtest_dep, config_dep], + dependencies: [gtest_dep, config_dep, gtest_main], include_directories: include_directories('../../src/config/public'), link_with: libconst, # Link the dobj library install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly diff --git a/tests/const/meson.build b/tests/const/meson.build index ad88bfe..0651305 100644 --- a/tests/const/meson.build +++ b/tests/const/meson.build @@ -11,7 +11,7 @@ foreach test_file : test_sources test_exe = executable( exe_name, test_file, - dependencies: [gtest_dep, const_dep], + dependencies: [gtest_dep, const_dep, gtest_main], include_directories: include_directories('../../src/const/public'), link_with: libconst, # Link the dobj library install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly diff --git a/tests/dobj/meson.build b/tests/dobj/meson.build index 7e2f19e..fd2aae6 100644 --- a/tests/dobj/meson.build +++ b/tests/dobj/meson.build @@ -13,7 +13,7 @@ foreach test_file : test_sources test_exe = executable( exe_name, test_file, - dependencies: gtest_dep, + dependencies: [gtest_dep, gtest_main], include_directories: include_directories('../../src/dobj/public'), link_with: libdobj, # Link the dobj library install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly diff --git a/tests/eos/meson.build b/tests/eos/meson.build index 0b93a9a..05d2f83 100644 --- a/tests/eos/meson.build +++ b/tests/eos/meson.build @@ -11,7 +11,7 @@ foreach test_file : test_sources test_exe = executable( exe_name, test_file, - dependencies: [gtest_dep, eos_dep], + dependencies: [gtest_dep, eos_dep, gtest_main], install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly ) diff --git a/tests/meshIO/meson.build b/tests/meshIO/meson.build index 6db5297..645a1ef 100644 --- a/tests/meshIO/meson.build +++ b/tests/meshIO/meson.build @@ -11,7 +11,7 @@ foreach test_file : test_sources test_exe = executable( exe_name, test_file, - dependencies: [gtest_dep, mfem_dep], + dependencies: [gtest_dep, mfem_dep, gtest_main], include_directories: include_directories('../../src/meshIO/public'), link_with: libmeshIO, # Link the dobj library install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly diff --git a/tests/meson.build b/tests/meson.build index f5ed2c9..e744e20 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,5 +1,6 @@ # Google Test dependency gtest_dep = dependency('gtest', main: true, required : true) +gtest_main = dependency('gtest_main', required: true) gtest_nomain_dep = dependency('gtest', main: false, required : true) # Subdirectories for unit and integration tests diff --git a/tests/opatIO/meson.build b/tests/opatIO/meson.build index bf7f1c3..9d09b39 100644 --- a/tests/opatIO/meson.build +++ b/tests/opatIO/meson.build @@ -13,7 +13,7 @@ foreach test_file : test_sources test_exe = executable( exe_name, test_file, - dependencies: [gtest_dep, picosha2_dep], + dependencies: [gtest_dep, picosha2_dep, gtest_main], include_directories: include_directories('../../src/opatIO/public'), link_with: libopatIO, # Link the dobj library install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly diff --git a/tests/probe/meson.build b/tests/probe/meson.build index 159b206..882369f 100644 --- a/tests/probe/meson.build +++ b/tests/probe/meson.build @@ -11,7 +11,7 @@ foreach test_file : test_sources test_exe = executable( exe_name, test_file, - dependencies: [gtest_dep, probe_dep, mfem_dep, quill_dep], + dependencies: [gtest_dep, probe_dep, mfem_dep, quill_dep, gtest_main], install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly )