Skip to content

Commit 8dc2107

Browse files
committed
Remove msvc compiler flags
1 parent 3840deb commit 8dc2107

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
run: ctest --output-on-failure --test-dir ./build/tests
4545
linux:
4646
name: linux
47-
runs-on: ubuntu-22.04
47+
runs-on: ubuntu-20.04
4848
timeout-minutes: 60
4949
steps:
5050
- uses: actions/checkout@v3

ProjectFolder/src/CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,20 @@ target_compile_features(
3737
)
3838

3939
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
40+
set(CUSTOM_COMPILE_OPTIONS
41+
-Wall
42+
)
43+
if (UNIX)
44+
list(APPEND CUSTOM_COMPILE_OPTIONS
45+
-Werror
46+
-Wpedantic
47+
-Wextra
48+
)
49+
endif()
4050
target_compile_options(
4151
${PROJECT_NAME}_LIB
4252
PRIVATE
43-
-Wall
44-
-Wextra
45-
-Wpedantic
46-
-Werror
53+
${CUSTOM_COMPILE_OPTIONS}
4754
)
4855
endif()
4956

0 commit comments

Comments
 (0)