2019-11-21 16:52:31 +00:00
|
|
|
cmake_minimum_required(VERSION 3.1.0)
|
|
|
|
project("cpp-peglib")
|
|
|
|
|
2020-10-02 01:26:04 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
2019-11-21 16:52:31 +00:00
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
2016-06-01 10:30:26 +00:00
|
|
|
|
2020-10-02 01:26:04 +00:00
|
|
|
if(MSVC)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus /utf-8")
|
2016-06-01 10:30:26 +00:00
|
|
|
endif()
|
|
|
|
|
2020-06-20 12:43:15 +00:00
|
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
|
|
find_package(Threads)
|
|
|
|
|
2016-06-07 08:29:45 +00:00
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
2020-05-17 14:55:56 +00:00
|
|
|
set(add_link_deps Threads::Threads)
|
2016-06-07 08:29:45 +00:00
|
|
|
endif()
|
|
|
|
|
2015-11-30 22:26:06 +00:00
|
|
|
add_subdirectory(example)
|
2020-01-23 23:29:13 +00:00
|
|
|
add_subdirectory(lint)
|
2020-03-15 18:37:42 +00:00
|
|
|
|
2020-10-02 01:26:04 +00:00
|
|
|
add_subdirectory(test)
|
|
|
|
enable_testing()
|
|
|
|
|
2020-03-15 18:37:42 +00:00
|
|
|
install(FILES peglib.h DESTINATION include)
|