Skip to content

Commit

Permalink
cmake: fix warning options for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
willeccles committed May 10, 2024
1 parent 02f2533 commit 4610482
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 @@ -42,7 +42,11 @@ add_library(bciabs_scpi src/ScpiDriver.cpp)

target_compile_features(bciabs_scpi PUBLIC cxx_std_20)

target_compile_options(bciabs_scpi PRIVATE -Wall -Wextra)
if(MSVC)
target_compile_options(bciabs_scpi PRIVATE /W3)
else()
target_compile_options(bciabs_scpi PRIVATE -Wall -Wextra)
endif()

target_include_directories(bciabs_scpi PUBLIC ${PROJECT_SOURCE_DIR}/include)

Expand Down

0 comments on commit 4610482

Please sign in to comment.