made replaced -pthread flag with more civilized CMake options
This commit is contained in:
parent
612e650efc
commit
55df60d51f
@ -2,7 +2,10 @@ cmake_minimum_required(VERSION 3.6)
|
|||||||
project(cpp11NHF2_chat)
|
project(cpp11NHF2_chat)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -pthread -Wno-switch")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wno-switch")
|
||||||
|
|
||||||
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
find_package(Boost COMPONENTS system REQUIRED)
|
find_package(Boost COMPONENTS system REQUIRED)
|
||||||
include_directories(${Boost_INCLUDE_DIR})
|
include_directories(${Boost_INCLUDE_DIR})
|
||||||
@ -12,4 +15,4 @@ set(CMAKE_AUTOMOC ON)
|
|||||||
|
|
||||||
set(SOURCE_FILES gui_chat.cpp chat_window.hpp chat_messages.hpp chat_networking.hpp check_policy.hpp)
|
set(SOURCE_FILES gui_chat.cpp chat_window.hpp chat_messages.hpp chat_networking.hpp check_policy.hpp)
|
||||||
add_executable(cpp11NHF2_chat ${SOURCE_FILES})
|
add_executable(cpp11NHF2_chat ${SOURCE_FILES})
|
||||||
target_link_libraries(cpp11NHF2_chat ${Boost_LIBRARIES} Qt5::Widgets)
|
target_link_libraries(cpp11NHF2_chat Threads::Threads ${Boost_LIBRARIES} Qt5::Widgets)
|
Loading…
Reference in New Issue
Block a user