diff options
author | Vincent Ambo <mail@tazj.in> | 2020-11-21T13·43+0100 |
---|---|---|
committer | Vincent Ambo <mail@tazj.in> | 2020-11-21T14·48+0100 |
commit | 082c006c04343a78d87b6c6ab3608c25d6213c3f (patch) | |
tree | 16e6f04f8d1d1d2d67e8e917d5e7bb48c1b60375 /third_party/abseil_cpp/CMake/install_test_project/test.sh | |
parent | cc27324d0226953943f408ce3c69ad7d648e005e (diff) |
merge(3p/absl): subtree merge of Abseil up to e19260f r/1889
... notably, this includes Abseil's own StatusOr type, which conflicted with our implementation (that was taken from TensorFlow). Change-Id: Ie7d6764b64055caaeb8dc7b6b9d066291e6b538f
Diffstat (limited to 'third_party/abseil_cpp/CMake/install_test_project/test.sh')
-rwxr-xr-x | third_party/abseil_cpp/CMake/install_test_project/test.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/third_party/abseil_cpp/CMake/install_test_project/test.sh b/third_party/abseil_cpp/CMake/install_test_project/test.sh index 99989b031d36..ddc7726b6c2d 100755 --- a/third_party/abseil_cpp/CMake/install_test_project/test.sh +++ b/third_party/abseil_cpp/CMake/install_test_project/test.sh @@ -118,6 +118,24 @@ if ! grep absl::strings "${libdir}/cmake/${absl_subdir}/abslTargets.cmake"; then exit 1 fi +pushd "${HOME}" +cat > hello-abseil.cc << EOF +#include <cstdlib> + +#include "absl/strings/str_format.h" + +int main(int argc, char **argv) { + absl::PrintF("Hello Abseil!\n"); + return EXIT_SUCCESS; +} +EOF +export PKG_CONFIG_PATH="${install_dir}/${libdir}/pkgconfig" +pc_args=($(pkg-config --cflags --libs --static absl_str_format)) +g++ -static -o hello-abseil hello-abseil.cc "${pc_args[@]}" +hello="$(./hello-abseil)" +[[ "${hello}" == "Hello Abseil!" ]] +popd + uninstall_absl popd |