Skip to content

Commit 777c4cb

Browse files
committed
Fix cmake logic for enabling ctest support
1 parent 07cf608 commit 777c4cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ project(Flibcpp VERSION 0.2.1 LANGUAGES CXX Fortran)
1212
# OPTIONS
1313
#---------------------------------------------------------------------------#
1414

15+
if (FLIBCPP_DEV OR FLIBCPP_BUILD_EXAMPLES OR FLIBCPP_BUILD_TESTS)
16+
set(_DEFAULT_BUILD_TESTING ON)
17+
endif()
18+
1519
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
16-
option(BUILD_TESTING "Enable CTest" ${FLIBCPP_DEV})
20+
option(BUILD_TESTING "Enable CTest" ${_DEFAULT_BUILD_TESTING})
1721
option(FLIBCPP_DEV "Default to using development-centered options" OFF)
1822
option(FLIBCPP_BUILD_DOCS "Build documentation with Sphinx" ${FLIBCPP_DEV})
1923
option(FLIBCPP_BUILD_EXAMPLES "Build examples" ON)

0 commit comments

Comments
 (0)