forked from cpp-netlib/cpp-netlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
29 lines (26 loc) · 1.07 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Copyright (c) Glyn Matthews 2012.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
include_directories(${CPP-NETLIB_SOURCE_DIR}/concurrency/src)
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
set(CPP-NETLIB_CXXFLAGS "-Wall -std=c++11")
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_STD11)
if (CPP-NETLIB_DISABLE_LIBCXX)
set(CPP-NETLIB_CXXFLAGS "-Wall -std=c++11")
else()
set(CPP-NETLIB_CXXFLAGS "-Wall -std=c++11 -stdlib=libc++")
endif()
endif()
set(CPP-NETLIB_CONCURRENCY_SRCS thread_pool.cpp)
add_library(cppnetlib-concurrency ${CPP-NETLIB_CONCURRENCY_SRCS})
foreach (src_file ${CPP-NETLIB_CONCURRENCY_SRCS})
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
set_source_files_properties(${src_file}
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
set_source_files_properties(${src_file}
PROPERTIES COMPILE_FLAGS ${CPP-NETLIB_CXXFLAGS})
endif()
endforeach(src_file)