Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Change to CMake configuration to build library + examples + tests wit…
…h MSVC2015. Some tests do not pass, though.
  • Loading branch information
enricodetoma committed Oct 17, 2016
commit 062fa39531ff95cec98e055a9b2388f716b49962
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
endif()


if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
set(gtest_force_shared_crt true)
endif()

if (Boost_FOUND)
if (MSVC)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
Expand All @@ -108,6 +113,7 @@ if (Boost_FOUND)
add_definitions(-D_WIN32_WINNT=0x0501)
endif(WIN32)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})

enable_testing()
add_subdirectory(libs/network/src)
Expand All @@ -120,10 +126,6 @@ if (Boost_FOUND)
endif (CPP-NETLIB_BUILD_EXAMPLES)
endif(Boost_FOUND)

if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
endif()

enable_testing()

set(CPP-NETLIB_LIBRARIES ${Boost_LIBRARIES} CACHE INTERNAL "Dependent libraries for header-only use")
Expand Down