• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Add common options for the current library project
2if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR BOOST_SUPERPROJECT_SOURCE_DIR)
3  set(def_INSTALL ON)
4  set(def_WERROR ON)
5else()
6  set(def_INSTALL OFF)
7  set(def_WERROR OFF)
8endif()
9
10string(TOUPPER ${PROJECT_NAME} name)
11string(REPLACE BOOST_ Boost_ name ${name})
12
13option(${name}_INSTALL "Install library" "${def_INSTALL}")
14option(${name}_WERROR "Treat warnings as errors" "${def_WERROR}")
15