cpp.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/bash
  2. # SwiftProtobuf/Performance/runners/cpp.sh - C++ test harness runner
  3. #
  4. # This source file is part of the Swift.org open source project
  5. #
  6. # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
  7. # Licensed under Apache License v2.0 with Runtime Library Exception
  8. #
  9. # See http://swift.org/LICENSE.txt for license information
  10. # See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
  11. #
  12. # -----------------------------------------------------------------------------
  13. #
  14. # Functions for running the C++ harness.
  15. #
  16. # -----------------------------------------------------------------------------
  17. function run_cpp_harness() {
  18. (
  19. harness="$1"
  20. source "$script_dir/generators/cpp.sh"
  21. echo "Generating C++ harness source..."
  22. gen_harness_path="$script_dir/_generated/Harness+Generated.cc"
  23. generate_cpp_harness
  24. echo
  25. echo "Building C++ libprotobuf and performance test harness..."
  26. echo
  27. pushd $script_dir/runners
  28. cmake -B ../_generated -S .
  29. cmake --build ../_generated
  30. popd
  31. run_harness_and_concatenate_results "C++" "$harness" "$partial_results"
  32. echo
  33. )
  34. }