2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-02-14 00:42:53 +00:00
Files
nowide/cmake/BoostAddOptions.cmake
2020-03-29 21:26:47 +02:00

15 lines
451 B
CMake

# Add common options for the current library project
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR BOOST_SUPERPROJECT_SOURCE_DIR)
set(def_INSTALL ON)
set(def_WERROR ON)
else()
set(def_INSTALL OFF)
set(def_WERROR OFF)
endif()
string(TOUPPER ${PROJECT_NAME} name)
string(REPLACE BOOST_ Boost_ name ${name})
option(${name}_INSTALL "Install library" "${def_INSTALL}")
option(${name}_WERROR "Treat warnings as errors" "${def_WERROR}")