Skip to content

Commit 2e2b8bb

Browse files
committed
Fixing CMakeLists for windows and parse tracing
1 parent 05bc96c commit 2e2b8bb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.1)
22

33
project(ipv6)
44

5-
SET(PARSE_TRACE "" CACHE STRING "Enable tracing of address parsing")
5+
SET(PARSE_TRACE 0 CACHE BOOL "Enable tracing of address parsing")
66

77
# Check the for the windows secure CRT version of snprintf
88
if (MSVC)
@@ -62,6 +62,7 @@ if (NOT IPV6_PARSE_LIBRARY_ONLY)
6262
CHECK_INCLUDE_FILES(sys/socket.h HAVE_SYS_SOCKET_H)
6363
CHECK_INCLUDE_FILES(netinet/in.h HAVE_NETINET_IN_H)
6464
CHECK_INCLUDE_FILES(arpa/inet.h HAVE_ARPA_INET_H)
65+
CHECK_INCLUDE_FILES(ws2tcpip.h HAVE_WS_2_TCPIP_H)
6566

6667
configure_file(ipv6_test_config.h.in ipv6_test_config.h)
6768
set(IPV6_TEST_CONFIG_HEADER_PATH ${CMAKE_CURRENT_BINARY_DIR})
@@ -86,6 +87,7 @@ target_include_directories(ipv6-parse PUBLIC ${IPV6_CONFIG_HEADER_PATH})
8687
set_target_properties(ipv6-parse PROPERTIES COMPILE_FLAGS ${ipv6_target_compile_flags})
8788

8889
if (PARSE_TRACE)
90+
message("Parse tracing enabled")
8991
set_target_properties(ipv6-test PROPERTIES COMPILE_FLAGS "-DPARSE_TRACE=1")
9092
set_target_properties(ipv6-cmd PROPERTIES COMPILE_FLAGS "-DPARSE_TRACE=1")
9193
set_target_properties(ipv6-parse PROPERTIES COMPILE_FLAGS "-DPARSE_TRACE=1")

0 commit comments

Comments
 (0)