diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c3642b..be7e1e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,9 @@ cmake_minimum_required (VERSION 3.14) + +if (NOT DEFINED PROJECT_NAME) + set(CPRNC_STANDALONE TRUE) +endif() + project (cprnc Fortran C) include (CheckFunctionExists) include (ExternalProject) @@ -95,9 +100,11 @@ set_property(TARGET cprnc PROPERTY POSITION_INDEPENDENT_CODE ON) target_link_libraries (cprnc PUBLIC ${NetCDF_Fortran_LIBRARIES} ${NetCDF_C_LIBRARIES} ${NetCDF_LIBRARIES}) - -enable_testing() -add_test(NAME run_tests COMMAND run_tests -outdir tmp) +# We do not want cprnc injecting ctests into parent projects +if (CPRNC_STANDALONE) + enable_testing() + add_test(NAME run_tests COMMAND run_tests -outdir tmp) +endif() #============================================================================== # DEFINE THE INSTALL diff --git a/version.inc b/version.inc index 9770fad..6be1a2c 100644 --- a/version.inc +++ b/version.inc @@ -1 +1,2 @@ -character(len=*), parameter :: version="v1.0.4" +character(len=*), parameter :: version="v1.0.5" + \ No newline at end of file