Skip to content
Merged
Show file tree
Hide file tree
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
Boost_FOUND is always TRUE
No need to test Boost_FOUND variable because `find_package(Boost ...)`
has REQUIRED suboption
  • Loading branch information
ruslo committed Jan 19, 2014
commit c6fc7adf8e9e3f89808810700f9cb44c5de9f910
17 changes: 8 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,14 @@ endif()

message(STATUS "C++ Compiler ID: ${CMAKE_CXX_COMPILER_ID}")
message(STATUS "C++ Flags: ${CMAKE_CXX_FLAGS} link flags: ${CMAKE_CXX_LINK_FLAGS}")
if (Boost_FOUND)
if (MSVC)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
endif(MSVC)
if (WIN32)
add_definitions(-D_WIN32_WINNT=0x0501)
endif(WIN32)
include_directories(${Boost_INCLUDE_DIRS})
endif(Boost_FOUND)

if (MSVC)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
endif(MSVC)
if (WIN32)
add_definitions(-D_WIN32_WINNT=0x0501)
endif(WIN32)
include_directories(${Boost_INCLUDE_DIRS})

message(STATUS "CPP-NETLIB options selected:")
message(STATUS " CPP-NETLIB_BUILD_SHARED_LIBS: ${CPP-NETLIB_BUILD_SHARED_LIBS}\t(Build cpp-netlib as shared libraries: OFF, ON)")
Expand Down
9 changes: 3 additions & 6 deletions mime/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ endif()

include_directories(${CPP-NETLIB_SOURCE_DIR}/mime/src)

if ( Boost_FOUND )
add_executable ( mime-roundtrip mime-roundtrip.cpp )
target_link_libraries ( mime-roundtrip )
add_test ( mime-roundtrip mime-roundtrip )
endif ()

add_executable ( mime-roundtrip mime-roundtrip.cpp )
target_link_libraries ( mime-roundtrip )
add_test ( mime-roundtrip mime-roundtrip )