Skip to content

Commit e3eaa53

Browse files
authored
Merge pull request #11 from ESMCI/jgfouca/disable_ctest
cprnc should not be injecting its ctests into host projects
2 parents 845bb11 + bbbc037 commit e3eaa53

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

CMakeLists.txt

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
cmake_minimum_required (VERSION 3.14)
2+
3+
if (NOT DEFINED PROJECT_NAME)
4+
set(CPRNC_STANDALONE TRUE)
5+
endif()
6+
27
project (cprnc Fortran C)
38
include (CheckFunctionExists)
49
include (ExternalProject)
@@ -95,9 +100,11 @@ set_property(TARGET cprnc PROPERTY POSITION_INDEPENDENT_CODE ON)
95100
target_link_libraries (cprnc
96101
PUBLIC ${NetCDF_Fortran_LIBRARIES} ${NetCDF_C_LIBRARIES} ${NetCDF_LIBRARIES})
97102

98-
99-
enable_testing()
100-
add_test(NAME run_tests COMMAND run_tests -outdir tmp)
103+
# We do not want cprnc injecting ctests into parent projects
104+
if (CPRNC_STANDALONE)
105+
enable_testing()
106+
add_test(NAME run_tests COMMAND run_tests -outdir tmp)
107+
endif()
101108

102109
#==============================================================================
103110
# DEFINE THE INSTALL

version.inc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
character(len=*), parameter :: version="v1.0.4"
1+
character(len=*), parameter :: version="v1.0.5"
2+

0 commit comments

Comments
 (0)