Skip to content

Commit

Permalink
Update build for unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Aug 19, 2024
1 parent baf6edd commit e23e79c
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion tests/chgres_cube/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ endforeach()

include (LibMPI)

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -assume byterecl")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -fdefault-real-8")
Expand Down
2 changes: 1 addition & 1 deletion tests/cpld_gridgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(GRID_FILE "ocean_hgrid.nc")

PULL_DATA(${CPLDGRIDGEN_URL} ${GRID_FILE})

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -assume byterecl")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -fdefault-real-8")
Expand Down
2 changes: 1 addition & 1 deletion tests/emcsfc_snow2mdl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# George Gayno

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -assume byterecl")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -fdefault-real-8")
Expand Down
4 changes: 2 additions & 2 deletions tests/filter_topo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#
# George Gayno, Ed Hartnett

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -assume byterecl")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -real-size 64 -assume byterecl")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -fdefault-real-8")
endif()
Expand Down
6 changes: 0 additions & 6 deletions tests/fre-nctools/shared_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,3 @@ include_directories(${CMAKE_SOURCE_DIR}/sorc/fre-nctools.fd/shared_lib)
add_executable(tst_create_xgrid tst_create_xgrid.c)
add_test(NAME fre-nctools-tst_create_xgrid COMMAND tst_create_xgrid)
target_link_libraries(tst_create_xgrid NetCDF::NetCDF_C shared_lib m)






5 changes: 4 additions & 1 deletion tests/fre-nctools/shared_lib/tst_create_xgrid.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#include <stdio.h>
#include <stdlib.h>

#include "mosaic_util.h"
#include "create_xgrid.h"

#define D2R (M_PI/180)
#define R2D (180/M_PI)
#define MAXPOINT 1000
Expand Down Expand Up @@ -495,7 +498,7 @@ int main(int argc, char* argv[])
}

area1 = (double *)malloc((nlon1)*(nlat1)*sizeof(double));
get_grid_great_circle_area_(&nlon1, &nlat1, lon1_in, lat1_in, area1);
get_grid_great_circle_area(&nlon1, &nlat1, lon1_in, lat1_in, area1);

printf("xgrid area sum is %g, grid 1 area is %g\n", area_sum, area1[0]);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/fvcom_tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ foreach(THE_FILE IN LISTS FVCOM_FILE SFCDATA_FILE)
PULL_DATA(${FVCOM_URL} ${THE_FILE})
endforeach()

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -assume byterecl")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -fdefault-real-8")
Expand Down
2 changes: 1 addition & 1 deletion tests/global_cycle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ endforeach()
# Include cmake to allow parallel I/O tests.
include (LibMPI)

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -assume byterecl")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -fdefault-real-8")
Expand Down
2 changes: 1 addition & 1 deletion tests/ocnice_prep/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# George Gayno, Ed Hartnett

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -assume byterecl")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -fdefault-real-8")
Expand Down
2 changes: 1 addition & 1 deletion tests/sfc_climo_gen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ PULL_DATA(${SFCGEN2_URL} ${VEG_FILE})
# Include cmake to allow parallel I/O tests.
include (LibMPI)

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -assume byterecl")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -fdefault-real-8")
Expand Down

0 comments on commit e23e79c

Please sign in to comment.