CMake netCDF Compatibility with WPS (#2121)
[WRF.git] / cmake / template / WRFConfig.cmake.in
blob7bd1e402237960b518c0e863fb30a28a221131a1
1 # WRF CMake Package
3 @PACKAGE_INIT@
5 set( WRF_VERSION @PROJECT_VERSION@ )
7 # Options WRF was built with
8 set( WRF_CORE      @WRF_CORE@    )
9 set( WRF_NESTING   @WRF_NESTING@ )
10 set( WRF_CASE      @WRF_CASE@    )
12 set( WRF_USE_DOUBLE                       @USE_DOUBLE@                         )
13 set( WRF_USE_MPI                          @USE_MPI@                            )
14 set( WRF_USE_OPENMP                       @USE_OPENMP@                         )
15 set( WRF_ENABLE_CHEM                      @ENABLE_CHEM@                        )
16 set( WRF_ENABLE_CMAQ                      @ENABLE_CMAQ@                        )
17 set( WRF_ENABLE_KPP                       @ENABLE_KPP@                         )
18 set( WRF_ENABLE_DFI_RADAR                 @ENABLE_DFI_RADAR@                   )
19 set( WRF_ENABLE_TITAN                     @ENABLE_TITAN@                       )
20 set( WRF_ENABLE_MARS                      @ENABLE_MARS@                        )
21 set( WRF_ENABLE_VENUS                     @ENABLE_VENUS@                       )
22 set( WRF_ENABLE_VENUS                     @ENABLE_VENUS@                       )
23 set( WRF_ENABLE_TERRAIN                   @ENABLE_TERRAIN@                     )
24 set( WRF_ENABLE_CLM                       @ENABLE_CLM@                         )
25 set( WRF_USE_ALLOCATABLES                 @USE_ALLOCATABLES@                   )
26 set( WRF_wrfmodel                         @wrfmodel@                           )
27 set( WRF_GRIB1                            @GRIB1@                              )
28 set( WRF_INTIO                            @INTIO@                              )
29 set( WRF_KEEP_INT_AROUND                  @KEEP_INT_AROUND@                    )
30 set( WRF_LIMIT_ARGS                       @LIMIT_ARGS@                         )
31 set( WRF_FORCE_NETCDF_CLASSIC             @FORCE_NETCDF_CLASSIC@               )
32 set( WRF_BUILD_RRTMG_FAST                 @BUILD_RRTMG_FAST@                   )
33 set( WRF_BUILD_RRTMK                      @BUILD_RRTMK@                        )
34 set( WRF_BUILD_SBM_FAST                   @BUILD_SBM_FAST@                     )
35 set( WRF_SHOW_ALL_VARS_USED               @SHOW_ALL_VARS_USED@                 )
36 set( WRF_WRFIO_NCD_NO_LARGE_FILE_SUPPORT  @WRFIO_NCD_NO_LARGE_FILE_SUPPORT@    )
38 list( PREPEND CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/share/ )
40 if ( ${WRF_USE_MPI} )
41   find_package( MPI REQUIRED COMPONENTS Fortran C )
42 endif()
44 if ( ${WRF_USE_OPENMP} )
45   find_package( OpenMP REQUIRED COMPONENTS Fortran C )
46 endif()
48 find_package( netCDF         REQUIRED )
49 find_package( netCDF-Fortran REQUIRED )
50 # Attempt to find zlib packaged with netcdf first
51 set( ZLIB_ROOT ${netCDF_PREFIX} )
52 find_package( ZLIB   REQUIRED )
54 list( POP_FRONT CMAKE_MODULE_PATH )
56 include( "${CMAKE_CURRENT_LIST_DIR}/@EXPORT_NAME@Targets.cmake" )
58 check_required_components( "@EXPORT_NAME@_Core" )