Commit 38f916dd authored by Martin Pokorny's avatar Martin Pokorny
Browse files

Add options for building documentation and tests

parent b85de6d6
......@@ -59,6 +59,9 @@ endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
option(Hpg_BUILD_DOCS "Build Doxygen documentation" ON)
option(Hpg_BUILD_TESTS "Build unit tests" ON)
add_subdirectory(cmake)
add_subdirectory(dependencies)
......@@ -66,6 +69,10 @@ add_subdirectory(dependencies)
add_subdirectory(src)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
add_subdirectory(doc)
add_subdirectory(tests)
if(${Hpg_BUILD_DOCS})
add_subdirectory(doc)
endif()
if(${Hpg_BUILD_TESTS})
add_subdirectory(tests)
endif()
endif()
......@@ -40,6 +40,8 @@ class Hpg(CMakePackage):
args = [
self.define('INSTALL_GTEST', False),
self.define('BUILD_GMOCK', False),
self.define('Hpg_BUILD_DOCS', False),
self.define('Hpg_BUILD_TESTS', self.run_tests),
self.define_from_variant('BUILD_SHARED_LIBS', 'shared'),
self.define_from_variant('Hpg_ENABLE_SERIAL', 'serial'),
self.define_from_variant('Hpg_ENABLE_OPENMP', 'openmp'),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment