Skip to content

Commit 6241cbd

Browse files
committed
Updated CMake scripts to silence the horrendous warnings on Windows.
1 parent f9ab8b3 commit 6241cbd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

libs/network/test/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ if (Boost_FOUND)
1616
utils_thread_pool
1717
)
1818
foreach (test ${TESTS})
19-
set_source_files_properties(${test}.cpp
19+
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
20+
set_source_files_properties(${test}.cpp
2021
PROPERTIES COMPILE_FLAGS "-Wall")
22+
endif()
2123
add_executable(cpp-netlib-${test} ${test}.cpp)
2224
add_dependencies(cpp-netlib-${test} cppnetlib-uri)
2325
target_link_libraries(cpp-netlib-${test} ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri)

libs/network/test/uri/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ if (Boost_FOUND)
1313
url_encoding_test
1414
)
1515
foreach (test ${TESTS})
16-
set_source_files_properties(${test}.cpp
16+
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
17+
set_source_files_properties(${test}.cpp
1718
PROPERTIES COMPILE_FLAGS "-Wall")
19+
endif()
1820
add_executable(cpp-netlib-${test} ${test}.cpp)
1921
add_dependencies(cpp-netlib-${test} cppnetlib-uri)
2022
target_link_libraries(cpp-netlib-${test}

0 commit comments

Comments
 (0)