diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8bc7786c1..9deb14fcb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -74,6 +74,10 @@ option(ENABLE_FORTRAN "Build Fortran support" OFF) option(ENABLE_MPI "Build MPI Support" OFF) +# Add another option that provides extra +# control over conduit tests for cases where +# conduit is brought in as a submodule +option(CONDUIT_ENABLE_TESTS "Build conduit tests" ON) ################################ # Invoke CMake Fortran setup @@ -146,7 +150,11 @@ endif() # Add our tests ################################ if(ENABLE_TESTS) - add_subdirectory(tests) + if(CONDUIT_ENABLE_TESTS) + add_subdirectory(tests) + else() + message(STATUS "Skipping test targets (CONDUIT_ENABLE_TESTS = OFF)") + endif() else() message(STATUS "Skipping test targets (ENABLE_TESTS = OFF)") endif() diff --git a/src/docs/sphinx/building.rst b/src/docs/sphinx/building.rst index 3a1f34151..377943a60 100644 --- a/src/docs/sphinx/building.rst +++ b/src/docs/sphinx/building.rst @@ -121,6 +121,7 @@ Conduit's build system supports the following CMake options: * **ENABLE_DOCS** - Controls if the Conduit documentation is built (when sphinx and doxygen are found ). *(default = ON)* * **ENABLE_COVERAGE** - Controls if code coverage compiler flags are used to build Conduit. *(default = OFF)* * **ENABLE_PYTHON** - Controls if the Conduit Python module is built. *(default = OFF)* +* **CONDUIT_ENABLE_TESTS** - Extra control for if Conduit unit tests are built. Useful for in cases where Conduit is pulled into a larger CMake project *(default = ON)* The Conduit Python module can be built for Python 2 or Python 3. To select a specific Python, set the CMake variable **PYTHON_EXECUTABLE** to path of the desired python binary. The Conduit Python module requires Numpy. The selected Python instance must provide Numpy, or PYTHONPATH must be set to include a Numpy install compatible with the selected Python install.