Skip to content

Commit b7ca819

Browse files
authored
update the logging submodule to remove warnings (kevinkreiser#131)
* update loading submodule * version number update * i hate mac * i still hate mac * mac is trash * wasting more time on apple garbage * allow controlling WALL and WERROR * no WERROR for mac
1 parent b8470e6 commit b7ca819

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

.github/workflows/macos.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [pull_request]
44
jobs:
55
build:
66
name: build and test
7-
runs-on: macos-11
7+
runs-on: macos-latest
88
steps:
99
- uses: actions/checkout@v2
1010
with:
@@ -18,9 +18,9 @@ jobs:
1818
shell: bash
1919
run: |
2020
xcrun --show-sdk-path
21-
SDK_PATH=$(find /Library/Developer/CommandLineTools/SDKs/MacOSX*.sdk -type d -maxdepth 0)
21+
SDK_PATH=$(find /Library/Developer/CommandLineTools/SDKs/MacOSX*.sdk -type d -maxdepth 0 | tail -n 1)
2222
echo ${SDK_PATH}
23-
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_SANITIZERS=On -DCMAKE_OSX_SYSROOT=${SDK_PATH} && make all -j$(sysctl -n hw.ncpu)
23+
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_SANITIZERS=On -DCMAKE_OSX_SYSROOT=${SDK_PATH} -DENABLE_WERROR=Off && make all -j$(sysctl -n hw.ncpu)
2424
- name: test
2525
shell: bash
2626
run: |

CMakeLists.txt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ INCLUDE(GNUInstallDirs)
88
# Use a C++17 enabled compiler
99
set(CMAKE_CXX_STANDARD 17)
1010

11+
option(ENABLE_WALL "Convert compiler warnings to errors" ON)
12+
option(ENABLE_WERROR "Convert compiler warnings to errors. Requires ENABLE_WALL" ON)
13+
1114
# What type of build
1215
if(NOT MSVC_IDE) # TODO: May need to be extended for Xcode, CLion, etc.
1316
if(NOT CMAKE_BUILD_TYPE)
@@ -29,10 +32,16 @@ else()
2932
endif()
3033

3134
# Show all warnings and treat as errors
32-
if(MSVC)
33-
add_compile_options(/W4 /WX)
34-
else()
35-
add_compile_options(-Wall -Wextra -pedantic -Werror)
35+
if(MSVC AND ENABLE_WALL)
36+
add_compile_options(/W4)
37+
if(ENABLE_WERROR)
38+
add_compile_options(/WX)
39+
endif()
40+
elseif(ENABLE_WALL)
41+
add_compile_options(-Wall -Wextra -pedantic)
42+
if(ENABLE_WERROR)
43+
add_compile_options(-Werror)
44+
endif()
3645
endif()
3746

3847
option(ENABLE_SANITIZERS "Use all the integrated sanitizers for Debug build" OFF)

prime_server/prime_server.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// some version info
44
#define PRIME_SERVER_VERSION_MAJOR 0
55
#define PRIME_SERVER_VERSION_MINOR 7
6-
#define PRIME_SERVER_VERSION_PATCH 0
6+
#define PRIME_SERVER_VERSION_PATCH 1
77

88
#include <cstdint>
99
#include <functional>

src/logging

Submodule logging updated from 10ba199 to 839e1f2

0 commit comments

Comments
 (0)