Skip to content

Commit bbf9c69

Browse files
committed
only add compile options if not msvc
1 parent 67b901f commit bbf9c69

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/espp.cmake

+5-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,11 @@ endfunction()
101101
function(espp_install_python_module FOLDER)
102102
pybind11_add_module(espp ${ESPP_PYTHON_SOURCES})
103103
target_compile_features(espp PRIVATE cxx_std_20)
104-
# disable certain compiler warnings for this module
105-
target_compile_options(espp PRIVATE -Wno-braced-scalar-init -Wno-unused-variable -Wno-unused-parameter)
104+
# disable certain compiler warnings for this module, but only if we're not on
105+
# Windows
106+
if(NOT MSVC)
107+
target_compile_options(espp PRIVATE -Wno-braced-scalar-init -Wno-unused-variable -Wno-unused-parameter)
108+
endif()
106109
target_link_libraries(espp PRIVATE ${ESPP_EXTERNAL_LIBS})
107110
install(TARGETS espp
108111
LIBRARY DESTINATION ${FOLDER}/)

0 commit comments

Comments
 (0)