2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-02-14 00:42:53 +00:00
Files
nowide/cmake/BoostAddOptions.cmake
Alexander Grund de93336895 Simplify CMake
Remove LAYOUT and SYSTEM_INCLUDE parameters (handled by superproject if wanted).
Remove BoostAddLibrary and add the options in the "classic" way.
Refactor BoostInstall into a generic InstallTargets function that wraps
all boilerplate code required for almost all libraries.
2020-01-21 17:33:49 +01:00

14 lines
408 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)
option(${NAME}_INSTALL "Install library" "${def_INSTALL}")
option(${NAME}_WERROR "Treat warnings as errors" "${def_WERROR}")