diff options
Diffstat (limited to 'third_party/abseil_cpp/CMake/install_test_project')
-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 |