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.

39 lines
765B

  1. cmake_minimum_required(VERSION 3.2)
  2. project(ScopeGuard VERSION 0.0.1)
  3. message(STATUS "~~~ ${PROJECT_NAME} v${PROJECT_VERSION} ~~~")
  4. set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
  5. option(UNITTEST "Build Unit Tests" ON)
  6. if( CMAKE_BUILD_TYPE )
  7. message(STATUS "Build Type : ${CMAKE_BUILD_TYPE}")
  8. else()
  9. message(STATUS "Build Type : None")
  10. endif()
  11. add_compile_options(-Wall
  12. -Wextra
  13. -pedantic
  14. -Werror
  15. -Wshadow
  16. -Wold-style-cast
  17. )
  18. set(CMAKE_CXX_STANDARD 14)
  19. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  20. set(CMAKE_CXX_EXTENSIONS OFF)
  21. include_directories("include")
  22. if( UNITTEST )
  23. enable_testing()
  24. add_subdirectory("test")
  25. endif()