Modernised all CMakeLists.txt files, and made it easier to use Simple-Web-Server as a sub-project
This commit is contained in:
parent
6e0a1ec9e8
commit
0d8caeca15
3 changed files with 63 additions and 47 deletions
|
|
@ -1,26 +1,19 @@
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-access-control")
|
||||
add_compile_options(-fno-access-control)
|
||||
|
||||
add_executable(io_test io_test.cpp)
|
||||
target_link_libraries(io_test ${Boost_LIBRARIES})
|
||||
target_link_libraries(io_test ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries(io_test simple-web-server)
|
||||
add_test(io_test io_test)
|
||||
|
||||
add_executable(parse_test parse_test.cpp)
|
||||
target_link_libraries(parse_test ${Boost_LIBRARIES})
|
||||
target_link_libraries(parse_test ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
if(MSYS) #TODO: Is MSYS true when MSVC is true?
|
||||
target_link_libraries(io_test ws2_32 wsock32)
|
||||
target_link_libraries(parse_test ws2_32 wsock32)
|
||||
endif()
|
||||
|
||||
add_test(io_test io_test)
|
||||
target_link_libraries(parse_test simple-web-server)
|
||||
add_test(parse_test parse_test)
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
add_executable(crypto_test crypto_test.cpp)
|
||||
target_link_libraries(crypto_test ${OPENSSL_CRYPTO_LIBRARY})
|
||||
target_link_libraries(crypto_test simple-web-server)
|
||||
add_test(crypto_test crypto_test)
|
||||
endif()
|
||||
|
||||
add_executable(status_code_test status_code_test.cpp)
|
||||
target_link_libraries(status_code_test simple-web-server)
|
||||
add_test(status_code_test status_code_test)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue