Skip to content

Commit

Permalink
MinGW fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
bialger committed Aug 12, 2024
1 parent b67da02 commit 01ad5cd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:
shell: bash
run: |
if [ "${{ matrix.config.cxx }}" == "g++" ]; then
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles"
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles"
else
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug
fi
- name: Build main target
Expand All @@ -61,26 +61,32 @@ jobs:
working-directory: ./cmake-build-release
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
if [ "${{ matrix.config.cxx }}" == "g++" ]; then
cd bin
./cpp_tests.exe --help
else
./cpp_tests.exe --help
fi
else
cd bin
./cpp_tests --help
cd bin
./cpp_tests --help
fi
- name: Run tests
shell: bash
working-directory: ./cmake-build-debug
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
if [ "${{ matrix.config.cxx }}" == "g++" ]; then
echo "Currently unable to run tests on ${{ matrix.config.name }}. See https://gitmemories.com/cristianadam/HelloWorld/issues/12 and https://github.com/microsoft/vscode-cmake-tools/issues/2451"
# ./cpp_tests_tests.exe
else
./cpp_tests_tests.exe
fi
else
if [ "${{ matrix.config.cxx }}" == "g++" ]; then
# echo "Currently unable to run tests on ${{ matrix.config.name }}. See https://gitmemories.com/cristianadam/HelloWorld/issues/12 and https://github.com/microsoft/vscode-cmake-tools/issues/2451"
cd tests
./cpp_tests_tests
./cpp_tests_tests.exe
else
./cpp_tests_tests.exe
fi
else
cd tests
./cpp_tests_tests
fi
memory-leaks:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ project(

set(CMAKE_CXX_STANDARD 20)

if(WIN32) # Install dlls in the same directory as the executable on Windows
if(WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # Install dlls in the same directory as the executable on Windows MSVC
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
Expand Down

0 comments on commit 01ad5cd

Please sign in to comment.