Skip to content

Commit 01ad5cd

Browse files
committed
MinGW fix attempt
1 parent b67da02 commit 01ad5cd

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

.github/workflows/ci_tests.yml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ jobs:
3939
shell: bash
4040
run: |
4141
if [ "${{ matrix.config.cxx }}" == "g++" ]; then
42-
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
43-
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles"
42+
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
43+
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles"
4444
else
45-
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
46-
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug
45+
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
46+
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug
4747
fi
4848
4949
- name: Build main target
@@ -61,26 +61,32 @@ jobs:
6161
working-directory: ./cmake-build-release
6262
run: |
6363
if [ "$RUNNER_OS" == "Windows" ]; then
64+
if [ "${{ matrix.config.cxx }}" == "g++" ]; then
65+
cd bin
66+
./cpp_tests.exe --help
67+
else
6468
./cpp_tests.exe --help
69+
fi
6570
else
66-
cd bin
67-
./cpp_tests --help
71+
cd bin
72+
./cpp_tests --help
6873
fi
6974
7075
- name: Run tests
7176
shell: bash
7277
working-directory: ./cmake-build-debug
7378
run: |
7479
if [ "$RUNNER_OS" == "Windows" ]; then
75-
if [ "${{ matrix.config.cxx }}" == "g++" ]; then
76-
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"
77-
# ./cpp_tests_tests.exe
78-
else
79-
./cpp_tests_tests.exe
80-
fi
81-
else
80+
if [ "${{ matrix.config.cxx }}" == "g++" ]; then
81+
# 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"
8282
cd tests
83-
./cpp_tests_tests
83+
./cpp_tests_tests.exe
84+
else
85+
./cpp_tests_tests.exe
86+
fi
87+
else
88+
cd tests
89+
./cpp_tests_tests
8490
fi
8591
8692
memory-leaks:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ project(
99

1010
set(CMAKE_CXX_STANDARD 20)
1111

12-
if(WIN32) # Install dlls in the same directory as the executable on Windows
12+
if(WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # Install dlls in the same directory as the executable on Windows MSVC
1313
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
1414
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
1515
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})

0 commit comments

Comments
 (0)