Skip to content

Commit 97bfc7a

Browse files
committed
Implement CMake changes requested during code review.
1 parent ce4d622 commit 97bfc7a

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/physics/utils/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
set(IO_READER_SOURCE pio_reader.F90 pio_reader_sub.F90 ${CMAKE_CURRENT_SOURCE_DIR}/../ncar_ccpp/phys_utils/ccpp_io_reader.F90 ${CMAKE_CURRENT_SOURCE_DIR}/../../../share/src/shr_kind_mod.F90)
1+
set(IO_READER_SOURCE pio_reader.F90
2+
pio_reader_sub.F90
3+
${CMAKE_CURRENT_SOURCE_DIR}/../ncar_ccpp/phys_utils/ccpp_io_reader.F90
4+
${CMAKE_CURRENT_SOURCE_DIR}/../../../share/src/shr_kind_mod.F90)
25

36
# io_reader is not integrated into the CMake build of any top level
47
# project yet and this CMake is for testing purposes only.

test/unit/fortran/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ endif()
1515

1616
# Overwrite the init flags chosen by CMake
1717
if(${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
18-
add_compile_options(-ffree-line-length-none -std=f2018)
18+
add_compile_options(-ffree-line-length-none)
1919
endif()
2020

2121
if(CAM_SIMA_ENABLE_CODE_COVERAGE)
@@ -34,15 +34,17 @@ if(CAM_SIMA_ENABLE_TESTS OR CAM_SIMA_ENABLE_CODE_COVERAGE OR CAM_SIMA_ENABLE_IO_
3434
add_subdirectory(src/core_utils)
3535
endif()
3636
if(CAM_SIMA_ENABLE_IO_TESTS)
37-
find_package(MPI REQUIRED COMPONENTS Fortran C)
3837
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
38+
39+
find_package(MPI REQUIRED COMPONENTS Fortran C)
3940
find_package(NetCDF REQUIRED COMPONENTS Fortran C)
4041
find_package(PIO REQUIRED COMPONENTS Fortran C)
4142

4243
add_subdirectory(ccpp_framework_stub)
4344
add_subdirectory(mock_routines)
4445

45-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../../src/physics/utils ${CMAKE_CURRENT_BINARY_DIR}/src/physics/utils)
46+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../../src/physics/utils
47+
${CMAKE_CURRENT_BINARY_DIR}/src/physics/utils)
4648

4749
add_subdirectory(src/pio_reader)
4850
endif()
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
add_library(ccpp_framework ccpp_kinds.F90)
1+
add_library(ccpp_framework ccpp_kinds.F90)
2+

0 commit comments

Comments
 (0)