# Copyright (c) 2017 - 2020 Samsung Electronics Co., Ltd All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # @file CMakeLists.txt # @author Pawel Kowalski # @author Jaroslaw Pelczar # CMAKE_MINIMUM_REQUIRED(VERSION 3.0) INCLUDE(GNUInstallDirs) INCLUDE(CheckLibraryExists) IF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE "RELEASE") ENDIF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_C_FLAGS_DEBUG "-std=c11 -O0 -ggdb -Wp,-U_FORTIFY_SOURCE") SET(CMAKE_CXX_FLAGS_DEBUG "-std=c++17 -O0 -ggdb -Wp,-U_FORTIFY_SOURCE") SET(CMAKE_C_FLAGS_RELEASE "-std=c11 -O2 -DNDEBUG") SET(CMAKE_CXX_FLAGS_RELEASE "-std=c++17 -O2 -DNDEBUG") ADD_DEFINITIONS("-Werror") ADD_DEFINITIONS("-Wall") ADD_DEFINITIONS("-Wextra") SET(CMAKE_POSITION_INDEPENDENT_CODE "True") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") ADD_SUBDIRECTORY(src/dummy-backend)