Skip to content

Commit 08cb7dd

Browse files
committed
Removed MinGW test run, properly formatted CMake files
1 parent 01ad5cd commit 08cb7dd

File tree

5 files changed

+12
-18
lines changed

5 files changed

+12
-18
lines changed

.github/workflows/ci_tests.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,7 @@ 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
68-
./cpp_tests.exe --help
69-
fi
64+
./cpp_tests.exe --help
7065
else
7166
cd bin
7267
./cpp_tests --help
@@ -78,9 +73,8 @@ jobs:
7873
run: |
7974
if [ "$RUNNER_OS" == "Windows" ]; then
8075
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"
82-
cd tests
83-
./cpp_tests_tests.exe
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
8478
else
8579
./cpp_tests_tests.exe
8680
fi

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ project(
99

1010
set(CMAKE_CXX_STANDARD 20)
1111

12-
if(WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # Install dlls in the same directory as the executable on Windows MSVC
12+
if (WIN32) # Install dlls in the same directory as the executable on Windows
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})
1616
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
1717
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
1818
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
19-
endif()
19+
endif ()
2020

2121
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
2222
set(CMAKE_CXX_FLAGS_DEBUG "/MDd")
2323
set(CMAKE_CXX_FLAGS_RELEASE "/O2")
2424
else ()
2525
set(CMAKE_CXX_FLAGS_DEBUG "-g")
2626
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
27-
endif()
27+
endif ()
2828

2929
add_subdirectory(lib)
3030
add_subdirectory(bin)

bin/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
add_executable(${PROJECT_NAME} main.cpp)
22

3-
if(NOT CMAKE_BUILD_TYPE)
3+
if (NOT CMAKE_BUILD_TYPE)
44
set(CMAKE_BUILD_TYPE Release) # Main executable should be built with Release
5-
endif()
5+
endif ()
66

77
message(STATUS "Main executable build type: ${CMAKE_BUILD_TYPE}")
88

lib/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
cmake_minimum_required(VERSION 3.12)
22

3-
if(NOT CMAKE_BUILD_TYPE)
3+
if (NOT CMAKE_BUILD_TYPE)
44
set(CMAKE_BUILD_TYPE Debug) # Change this to Release when you're ready to release
5-
endif()
5+
endif ()
66

77
message(STATUS "Libraries build type: ${CMAKE_BUILD_TYPE}")
88

tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ target_link_libraries(
2929
GTest::gtest_main
3030
)
3131

32-
if(NOT CMAKE_BUILD_TYPE)
32+
if (NOT CMAKE_BUILD_TYPE)
3333
set(CMAKE_BUILD_TYPE Debug) # Tests should be built with Debug
34-
endif()
34+
endif ()
3535

3636
message(STATUS "Tests build type: ${CMAKE_BUILD_TYPE}")
3737

0 commit comments

Comments
 (0)