#!/bin/bash
set -eux

cd git/re2

case "${KOKORO_JOB_NAME}" in
  */windows-*)
    CMAKE_G_A_FLAGS=('-G' 'Visual Studio 14 2015' '-A' 'x64')
    ;;
  *)
    # Work around a bug in older versions of bash. :/
    set +u
    CMAKE_G_A_FLAGS=()
    ;;
esac

cmake -D CMAKE_BUILD_TYPE=Debug "${CMAKE_G_A_FLAGS[@]}" .
cmake --build . --config Debug --clean-first
ctest -C Debug --output-on-failure -E 'dfa|exhaustive|random'

cmake -D CMAKE_BUILD_TYPE=Release "${CMAKE_G_A_FLAGS[@]}" .
cmake --build . --config Release --clean-first
ctest -C Release --output-on-failure -E 'dfa|exhaustive|random'

exit 0

#!/bin/bash
set -eux

cd git/re2

case "${KOKORO_JOB_NAME}" in
  */windows-*)
    CMAKE_G_A_FLAGS=('-G' 'Visual Studio 14 2015' '-A' 'x64')
    ;;
  *)
    CMAKE_G_A_FLAGS=()
    # Work around a bug in older versions of bash. :/
    set +u
    ;;
esac

cmake -D CMAKE_BUILD_TYPE=Debug "${CMAKE_G_A_FLAGS[@]}" .
cmake --build . --config Debug --clean-first
ctest -C Debug --output-on-failure -E 'dfa|exhaustive|random'

cmake -D CMAKE_BUILD_TYPE=Release "${CMAKE_G_A_FLAGS[@]}" .
cmake --build . --config Release --clean-first
ctest -C Release --output-on-failure -E 'dfa|exhaustive|random'

exit 0

Clarify the scope of a comment.
Clarify the scope of a comment.

Change-Id: Ie9836267ac2bca4b4f5509f0f2def288e7b8c9ab
Reviewed-on: https://code-review.googlesource.com/c/37955
Reviewed-by: Paul Wankadia <62d4e38bb1380f055ec4b899baa75e52af09c5f7@google.com>
