From a2a77b2195c57862f5d7a633d2313564f1578c78 Mon Sep 17 00:00:00 2001 From: Youngjae Shin Date: Mon, 19 Feb 2024 18:36:09 +0900 Subject: apply cxx standard 14 (#232) --- CMakeLists.txt | 71 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f6113aa..41a9e5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,35 +1,36 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.16) -PROJECT(modes VERSION ${PKG_VER}) - -INCLUDE(FindPkgConfig) -INCLUDE(Definitions.cmake) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) - -SET(EXTRA_FLAGS "-Wall -Werror -fvisibility=hidden -fdiagnostics-color") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_FLAGS}") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS} -std=c++11") -SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") - -SET(CLIENT ${PROJECT_NAME}) -SET(DAEMON "mode-supervisor") -SET(MODULE "${PROJECT_NAME}-module") - -FILE(GLOB HEADERS include/*.h) -INSTALL(FILES ${HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME}) - -INSTALL(DIRECTORY schema DESTINATION ${MODES_DEFAULT_RO_DIR}) - -IF(STDOUT_LOG) - ADD_DEFINITIONS("-DMDS_STDOUT") -ENDIF(STDOUT_LOG) - -IF(BUILD_GCOV) - ADD_DEFINITIONS("-DTIZEN_TEST_GCOV") -ENDIF(BUILD_GCOV) - -ADD_SUBDIRECTORY(common) -ADD_SUBDIRECTORY(client) -ADD_SUBDIRECTORY(supervisor) -ADD_SUBDIRECTORY(plugin) -ADD_SUBDIRECTORY(tests) +cmake_minimum_required(VERSION 3.16) +project(modes VERSION ${PKG_VER}) + +include(FindPkgConfig) +include(Definitions.cmake) +include_directories(${CMAKE_SOURCE_DIR}) +include_directories(${CMAKE_SOURCE_DIR}/include) + +set(EXTRA_FLAGS "-Wall -Werror -fvisibility=hidden -fdiagnostics-color") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_FLAGS}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}") +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") + +set(CLIENT ${PROJECT_NAME}) +set(DAEMON "mode-supervisor") +set(MODULE "${PROJECT_NAME}-module") + +file(GLOB HEADERS include/*.h) +install(FILES ${HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME}) + +install(DIRECTORY schema DESTINATION ${MODES_DEFAULT_RO_DIR}) + +if(STDOUT_LOG) + add_definitions("-DMDS_STDOUT") +endif(STDOUT_LOG) + +if(BUILD_GCOV) + add_definitions("-DTIZEN_TEST_GCOV") +endif(BUILD_GCOV) + +add_subdirectory(common) +add_subdirectory(client) +add_subdirectory(supervisor) +add_subdirectory(plugin) +add_subdirectory(tests) -- cgit v1.2.3