Skip to content

Commit

Permalink
Merge pull request #21 from stv0g/disable-doc
Browse files Browse the repository at this point in the history
cmake: add option to exclude doc target
  • Loading branch information
dinkelbachjan authored Jan 22, 2023
2 parents 76c8091 + 5404510 commit ad5532a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,21 @@ else()
message(FATAL_ERROR "${USE_CIM_VERSION} is an invalid value for USE_CIM_VERSION")
endif()


add_subdirectory(doc)
add_subdirectory(thirdparty)

set(libcimpp_MAJOR_VERSION 2)
set(libcimpp_MINOR_VERSION 1)
set(libcimpp_PATCH_VERSION 0)
set(libcimpp_VERSION ${libcimpp_MAJOR_VERSION}.${libcimpp_MINOR_VERSION}.${libcimpp_PATCH_VERSION})

# Options
option(BUILD_SHARED_LIBS "Build shared library" OFF)
option (BUILD_EXAMPLES "Build examples" OFF)
option(CIMPP_BUILD_EXAMPLES "Build examples" OFF)
option(CIMPP_BUILD_DOC "Build documentation" ON)

if(CIMPP_BUILD_DOC)
add_subdirectory(doc)
endif()

add_subdirectory(thirdparty)

if(NOT USE_CIM_VERSION)
set(USE_CIM_VERSION "CGMES_2.4.15_27JAN2020" CACHE STRING "Define CIM Version")
Expand Down Expand Up @@ -87,7 +90,7 @@ install(DIRECTORY ${USE_CIM_VERSION}
# Settings for packaging
include(CIMppPackaging)

if(BUILD_EXAMPLES)
if(CIMPP_BUILD_EXAMPLES)
add_executable(example examples/src/main.cpp)
target_link_libraries(example libcimpp)
target_compile_features(example PUBLIC cxx_range_for)
Expand Down

0 comments on commit ad5532a

Please sign in to comment.