Skip to content

Commit

Permalink
Fix #111
Browse files Browse the repository at this point in the history
  • Loading branch information
yhirose committed Jun 20, 2020
1 parent aefeb3a commit 14305f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.1.0)
project("cpp-peglib")

find_package(Threads)
# Check if a supported compiler is used to setup the C++ standard to use:
get_property(known_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
list(FIND known_features "cxx_std_17" found)
Expand Down Expand Up @@ -31,6 +30,9 @@ elseif(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /wd4503 /wd4512 /utf-8")
endif()

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(add_link_deps Threads::Threads)
endif()
Expand Down

0 comments on commit 14305f9

Please sign in to comment.