diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-11-21 16:57:18 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-11-21 16:57:18 +0900 |
commit | 4dfe393027cfcfe844a8c8b97209a714904308c4 (patch) | |
tree | d94a05252de9becb345ed10d7c3cfed598005923 /CMakeLists.txt | |
parent | 485249b5a02cf59571cde61f83d10a6a9ec36b3d (diff) | |
download | re2-4dfe393027cfcfe844a8c8b97209a714904308c4.tar.gz re2-4dfe393027cfcfe844a8c8b97209a714904308c4.tar.bz2 re2-4dfe393027cfcfe844a8c8b97209a714904308c4.zip |
Imported Upstream version 20160301upstream/20160301
Change-Id: I33831129b7d3a860e34c551b415ede10da350c73
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c980df..3ed718f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,11 +11,19 @@ option(USEPCRE "use PCRE in tests and benchmarks" OFF) set(EXTRA_TARGET_LINK_LIBRARIES) +if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + if(MSVC_VERSION LESS 1800) + message(FATAL_ERROR "you need Visual Studio 2013 or later") + endif() +elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + add_compile_options(-std=c++11) +endif() + if(WIN32) add_definitions(-DUNICODE -D_UNICODE -DSTRICT -DNOMINMAX) set(THREADING threadwin) -else() - add_definitions(-pthread) +elseif(UNIX) + add_compile_options(-pthread) set(THREADING thread) list(APPEND EXTRA_TARGET_LINK_LIBRARIES -pthread) endif() |