Skip to content

Commit

Permalink
Only enable all warnings for CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
achim-k committed Jul 31, 2024
1 parent 194cec9 commit e2ca7ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions cpp/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ WORKDIR /src
FROM base AS build
RUN pip --no-cache-dir install conan
RUN conan profile detect --force
COPY ./foxglove-websocket /src/foxglove-websocket/
COPY ./foxglove-websocket/conanfile.py /src/foxglove-websocket/conanfile.py
ARG CPPSTD=17
ARG ASIO=standalone
RUN conan create foxglove-websocket -s compiler.cppstd=$CPPSTD --build=missing -o foxglove-websocket*:asio=$ASIO
RUN conan install foxglove-websocket -s compiler.cppstd=$CPPSTD --build=missing
COPY ./foxglove-websocket /src/foxglove-websocket/
RUN conan create foxglove-websocket -s compiler.cppstd=$CPPSTD -o foxglove-websocket*:asio=$ASIO -c tools.build:cxxflags="['-Wall']"

FROM build AS build_examples
COPY --from=build /root/.conan2 /root/.conan2
Expand Down
4 changes: 2 additions & 2 deletions cpp/foxglove-websocket/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ target_link_libraries(foxglove_websocket nlohmann_json::nlohmann_json websocketp
set_target_properties(foxglove_websocket PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON)

if (MSVC)
target_compile_options(foxglove_websocket PRIVATE /WX /W4)
target_compile_options(foxglove_websocket PRIVATE /W4)
else()
target_compile_options(foxglove_websocket PRIVATE -Wall -Wextra -Wpedantic -Werror -Wold-style-cast -Wfloat-equal)
target_compile_options(foxglove_websocket PRIVATE -Wextra -Wpedantic -Werror -Wold-style-cast -Wfloat-equal)
endif()

install(TARGETS foxglove_websocket)
Expand Down

0 comments on commit e2ca7ff

Please sign in to comment.