Skip to content

Commit d050d41

Browse files
Cmake run_test and debug fixes (NOAA-EMC#647)
> Update run_cmake test to exit if the test is completed before building > clear debug flags in cmake if built from a parent repo.
1 parent d1c10f3 commit d050d41

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ project(
1313

1414
get_directory_property(hasParent PARENT_DIRECTORY)
1515
if(hasParent)
16-
# Unset flags that come from UFS because they (-r8/-r4) conflict
17-
# with Ww3
16+
# Unset flags that come from Parent (ie UFS or other coupled build)
17+
# for potential (-r8/-r4) conflict
1818
set(CMAKE_Fortran_FLAGS "")
1919
set(CMAKE_C_FLAGS "")
20+
remove_definitions(-DDEBUG)
2021
endif()
2122

2223
set(MULTI_ESMF OFF CACHE BOOL "Build ww3_multi_esmf library")

regtests/bin/run_cmake_test

+9-7
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,15 @@ fi
367367

368368
mkdir -p $path_w
369369

370+
cd $path_w
371+
372+
if [ $stub ] && [ -f finished ]
373+
then
374+
echo " Test already finished, skipping ..."
375+
echo ' '
376+
exit 0
377+
fi
378+
370379
if [ $multi -eq 0 ] && [ $coupl = "OASIS" ]
371380
then
372381
ww3_dir=${path_s}/..
@@ -547,13 +556,6 @@ echo " Input directory: $path_i"
547556
echo " Switch file: $file_c"
548557
echo ' '
549558

550-
if [ $stub ] && [ -f finished ]
551-
then
552-
echo " Test already finished, skipping ..."
553-
echo ' '
554-
exit 0
555-
fi
556-
557559
# 3.b2 Preprocess cdl files into nc files ----------------------------------- #
558560

559561
for f in $(find $path_i/ -type f -name "*.cdl")

0 commit comments

Comments
 (0)