Skip to content

Commit

Permalink
add several warning flags
Browse files Browse the repository at this point in the history
  • Loading branch information
arashbm committed Feb 17, 2024
1 parent bbec2cf commit 74581d4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,16 @@ nanobind_add_module(
)
target_link_libraries(bliss_bind_ext PRIVATE bliss_static)

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(bliss_bind_ext PRIVATE
/W4 /permissive- /w14242 /w14254 /w14263 /w14265 /w14287 /we4289 /w14296
/w14311 /w14545 /w14546 /w14547 /w14549 /w14555 /w14619 /w14640 /w14826
/w14905 /w14906 /w14928)
else()
target_compile_options(bliss_bind_ext PRIVATE
-Werror -Wall -Wextra -Wconversion -Wsign-conversion -Wnull-dereference
-Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused
-Woverloaded-virtual -Wpedantic -Wimplicit-fallthrough)
endif()

install(TARGETS bliss_bind_ext LIBRARY DESTINATION bliss_bind)

0 comments on commit 74581d4

Please sign in to comment.