You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- cmake_minimum_required(VERSION 3.2)
-
- project(ScopeGuard VERSION 0.0.1)
- message(STATUS "~~~ ${PROJECT_NAME} v${PROJECT_VERSION} ~~~")
-
- set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
- option(UNITTEST "Build Unit Tests" ON)
-
-
- if( CMAKE_BUILD_TYPE )
- message(STATUS "Build Type : ${CMAKE_BUILD_TYPE}")
- else()
- message(STATUS "Build Type : None")
- endif()
-
-
- add_compile_options(-Wall
- -Wextra
- -pedantic
- -Werror
- -Wshadow
- -Wold-style-cast
- )
-
-
- set(CMAKE_CXX_STANDARD 14)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
- set(CMAKE_CXX_EXTENSIONS OFF)
-
-
- add_library(ScopeGuard INTERFACE)
- target_include_directories(ScopeGuard INTERFACE
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
- $<INSTALL_INTERFACE:include>)
-
-
- if( UNITTEST )
- enable_testing()
- add_subdirectory("test")
- endif()
-
-
- include(Install)
-
|