forked from boostorg/beast
Update CMakeLists for non-Windows platforms
This commit is contained in:
@@ -12,7 +12,7 @@ if (WIN32)
|
|||||||
else()
|
else()
|
||||||
set(Boost_USE_STATIC_LIBS ON)
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
set(Boost_USE_MULTITHREADED ON)
|
set(Boost_USE_MULTITHREADED ON)
|
||||||
find_package(Boost REQUIRED COMPONENTS filesystem program_options system)
|
find_package(Boost REQUIRED COMPONENTS coroutine context thread filesystem program_options system)
|
||||||
include_directories(${Boost_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
link_directories(${Boost_LIBRARY_DIR})
|
link_directories(${Boost_LIBRARY_DIR})
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ else()
|
|||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS
|
set(CMAKE_CXX_FLAGS
|
||||||
"${CMAKE_CXX_FLAGS} -g -std=c++11 -Wall /Wextra /Wpedantic /Wconversion -Wno-unused-variable")
|
"${CMAKE_CXX_FLAGS} -g -std=c++11 -Wall -Wextra -Wpedantic -Wconversion -Wno-unused-variable")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message ("cxx Flags: " ${CMAKE_CXX_FLAGS})
|
message ("cxx Flags: " ${CMAKE_CXX_FLAGS})
|
||||||
|
@@ -14,5 +14,5 @@ add_executable (lib-tests
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
target_link_libraries(core-tests ${Boost_LIBRARIES})
|
target_link_libraries(lib-tests ${Boost_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
@@ -30,7 +30,7 @@ add_executable (http-tests
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
target_link_libraries(http-tests ${Boost_LIBRARIES})
|
target_link_libraries(http-tests ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable (bench-tests
|
add_executable (bench-tests
|
||||||
@@ -39,3 +39,7 @@ add_executable (bench-tests
|
|||||||
nodejs_parser.cpp
|
nodejs_parser.cpp
|
||||||
parser_bench.cpp
|
parser_bench.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (NOT WIN32)
|
||||||
|
target_link_libraries(bench-tests ${Boost_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
Reference in New Issue
Block a user