-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
33 lines (27 loc) · 942 Bytes
/
CMakeLists.txt
File metadata and controls
33 lines (27 loc) · 942 Bytes
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
30
31
32
# -*- shell-script -*- make up a mode for emacs
# To use cmake:
#
# cmake .
# make
cmake_minimum_required(VERSION 3.25)
project (
libais
DESCRIPTION "A library for parsing Automatic Identification System messages."
LANGUAGES CXX
VERSION 0.17
)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX17)
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX20)
if(COMPILER_SUPPORTS_CXX20)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
elseif(COMPILER_SUPPORTS_CXX17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
elseif(COMPILER_SUPPORTS_CXX14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} is too old. Please use a different C++ compiler.")
endif()
# include_directories("${PROJECT_BINARY_DIR}/src/libais")
add_subdirectory(src)