Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
afd committed Oct 12, 2022
1 parent fdc9f4d commit 9e7bc92
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/c_apps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ esac

mkdir -p build
pushd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=${CONFIG} "${CMAKE_OPTIONS[@]}"
cmake --build . --config ${CONFIG}
cmake -DCMAKE_INSTALL_PREFIX=./install -DBUILD_TYPE=${CONFIG} -P cmake_install.cmake
cmake -G Ninja .. -DCMAKE_BUILD_TYPE="${CONFIG}" "${CMAKE_OPTIONS[@]}"
cmake --build . --config "${CONFIG}"
cmake -DCMAKE_INSTALL_PREFIX=./install -DBUILD_TYPE="${CONFIG}" -P cmake_install.cmake
popd

# Check that dredd works on some projects
Expand All @@ -107,7 +107,6 @@ cp "${DREDD_ROOT}/build/src/dredd/dredd" "${DREDD_EXECUTABLE}"

case "$(uname)" in
"Linux"|"MINGW"*|"MSYS_NT"*)
;;
echo "Curl"
date

Expand All @@ -129,7 +128,8 @@ case "$(uname)" in
ninja
# TODO: run some tests
popd
popd
popd
;;

*)
;;
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/cxx_apps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ esac

mkdir -p build
pushd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=${CONFIG} "${CMAKE_OPTIONS[@]}"
cmake --build . --config ${CONFIG}
cmake -DCMAKE_INSTALL_PREFIX=./install -DBUILD_TYPE=${CONFIG} -P cmake_install.cmake
cmake -G Ninja .. -DCMAKE_BUILD_TYPE="${CONFIG}" "${CMAKE_OPTIONS[@]}"
cmake --build . --config "${CONFIG}"
cmake -DCMAKE_INSTALL_PREFIX=./install -DBUILD_TYPE="${CONFIG}" -P cmake_install.cmake
popd

# Check that dredd works on some projects
Expand All @@ -112,6 +112,24 @@ ${DREDD_EXECUTABLE} --mutation-info-file temp.json examples/simple/pi.cc
clang++ examples/simple/pi.cc -o examples/simple/pi
diff --strip-trailing-cr <(./examples/simple/pi) <(echo "3.14159")

case "$(uname)" in
"MINGW"*|"MSYS_NT"*)
# Dredd can lead to object files with many sections, which can be too much for MSVC's default settings.
# This switch enables a larger number of sections.
CXXFLAGS="/bigobj"
export CXXFLAGS
;;

"Darwin")
# The Apple compiler does not use C++11 by default; Dredd requires at least this language version.
CXXFLAGS="-std=c++11"
export CXXFLAGS
;;

*)
;;
esac

echo "examples/math: check that the tests pass after mutating the library"
date

Expand Down

0 comments on commit 9e7bc92

Please sign in to comment.