Skip to content

Commit

Permalink
Cmake improvements for compilation
Browse files Browse the repository at this point in the history
Signed-off-by: Mateusz Mazur <mateusz.mazur@e.email>
  • Loading branch information
Mazurel committed Oct 20, 2024
1 parent e901281 commit 0f4e61a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ project(protocolConverter)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -pedantic -Werror=unused-result")
if (MSVC)
add_compile_options(/W4)
else()
add_compile_options(-Wall -Wextra -Werror -pedantic)
endif()

option(MODBUS_EXAMPLE "Build example program" OFF)
option(MODBUS_TESTS "Build tests" OFF)
Expand Down

0 comments on commit 0f4e61a

Please sign in to comment.