1 # Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License
15 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
18 INCLUDE(GNUInstallDirs)
20 IF(NOT CMAKE_BUILD_TYPE)
21 SET(CMAKE_BUILD_TYPE "RELEASE")
22 ENDIF(NOT CMAKE_BUILD_TYPE)
24 SET(CMAKE_CXX_FLAGS_DEBUG "-g -std=c++11 -O0 -ggdb -Wp,-U_FORTIFY_SOURCE")
25 SET(CMAKE_CXX_FLAGS_RELEASE "-g -std=c++11 -O2 -DNDEBUG")
27 SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
28 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
30 ADD_DEFINITIONS("-fPIC")
31 #ADD_DEFINITIONS("-Werror")
32 #ADD_DEFINITIONS("-Wall")
33 #ADD_DEFINITIONS("-Wextra")
34 ADD_DEFINITIONS("-pedantic")
35 ADD_DEFINITIONS("-pedantic-errors")
37 INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}")
38 INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include")
39 INCLUDE_DIRECTORIES("/usr/local/include")
43 ADD_SUBDIRECTORY(osquery)