Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit b06d7b0

Browse files
authored
Set tests to off if project is used as submodule (#218)
1 parent 4115d40 commit b06d7b0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ set(LIKWID_DIR "" CACHE PATH "Path to likwid performance analysis suite")
7070
set(CORENRN_FRONTEND_C_COMPILER gcc CACHE FILEPATH "C compiler for building mod2c [frontend]")
7171
set(CORENRN_FRONTEND_CXX_COMPILER g++ CACHE FILEPATH "C++ compiler for building mod2c [frontend]")
7272

73+
if (CORENEURON_AS_SUBPROJECT)
74+
set(CORENRN_ENABLE_UNIT_TESTS OFF)
75+
endif()
76+
7377
# =============================================================================
7478
# Include cmake modules after cmake options
7579
# =============================================================================
@@ -209,9 +213,12 @@ endif()
209213
# =============================================================================
210214
add_subdirectory(coreneuron)
211215
add_subdirectory(apps)
212-
add_subdirectory(tests)
213216
add_subdirectory(extra)
214217

218+
if(CORENRN_ENABLE_UNIT_TESTS)
219+
add_subdirectory(tests)
220+
endif()
221+
215222
# =============================================================================
216223
# Install cmake modules
217224
# =============================================================================

0 commit comments

Comments
 (0)