Skip to content

Commit

Permalink
Allow building docs even when a submodule
Browse files Browse the repository at this point in the history
This makes the doc building option work exactly the same way as the test
building option (defaulting off), rather than forcing docs off when a
submodule.
  • Loading branch information
jagerman committed Feb 17, 2022
1 parent a0912ab commit 077cbff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

option(WITH_DOCS "build documentation" ON)

include(GNUInstallDirs)

message(STATUS "oxenc v${PROJECT_VERSION}")
Expand All @@ -38,6 +36,7 @@ else()
endif()

option(OXENC_BUILD_TESTS "Building and perform oxenc tests" ${oxenc_IS_TOPLEVEL_PROJECT})
option(OXENC_BUILD_DOCS "Build oxenc documentation" ${oxenc_IS_TOPLEVEL_PROJECT})
option(OXENC_INSTALL "Add oxenc headers to install target" ${oxenc_IS_TOPLEVEL_PROJECT})


Expand Down Expand Up @@ -89,7 +88,7 @@ if(OXENC_INSTALL)
endif()


if(WITH_DOCS AND ${oxenc_IS_TOPLEVEL_PROJECT})
if(OXENC_BUILD_DOCS)
add_subdirectory(docs)
endif()

Expand Down

0 comments on commit 077cbff

Please sign in to comment.