Skip to content

Commit eac4242

Browse files
author
me
committed
only add -Wall if you're not on windows
1 parent cb33ade commit eac4242

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ if(POLICY CMP0135)
99
cmake_policy(SET CMP0135 OLD)
1010
endif()
1111

12+
# Generator expressions
13+
set(IS_WIN32 "$<BOOL:${WIN32}>")
14+
set(IS_NOT_WIN32 "$<NOT:${IS_WIN32}>")
15+
1216
# Deps
1317
include(FetchContent)
1418
include(CMakeDependentOption)
@@ -33,7 +37,7 @@ target_include_directories(http PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../src)
3337
target_link_libraries(http PUBLIC OpenSSL::SSL OpenSSL::Crypto Boost::asio)
3438
target_compile_options(http
3539
PRIVATE $<$<BOOL:${HTTP_BUILD_FUZZERS}>:-fprofile-instr-generate -fcoverage-mapping>
36-
PUBLIC -Wall)
40+
PUBLIC $<${IS_NOT_WIN32}:-Wall>)
3741

3842
# Examples
3943
function(add_example target_name)

0 commit comments

Comments
 (0)