Upstream release 3.7.1
Alastair McKinstry
1 year, 3 months ago
56 | 56 |
|
57 | 57 |
## Library names for each component
|
58 | 58 |
set( NetCDF_C_LIBRARY_NAME netcdf )
|
59 | |
set( NetCDF_CXX_LIBRARY_NAME netcdf_c++4 )
|
|
59 |
set( NetCDF_CXX_LIBRARY_NAME netcdf_c++4 netcdf-cxx4 )
|
60 | 60 |
set( NetCDF_CXX_LEGACY_LIBRARY_NAME netcdf_c++ )
|
61 | 61 |
set( NetCDF_Fortran_LIBRARY_NAME netcdff )
|
62 | 62 |
|
|
119 | 119 |
find_library(NetCDF_${_comp}_LIBRARY
|
120 | 120 |
NAMES ${NetCDF_${_comp}_LIBRARY_NAME}
|
121 | 121 |
DOC "netcdf ${_comp} library"
|
122 | |
HINTS ${_search_hints}
|
|
122 |
HINTS ${_search_hints_${_comp}} ${_search_hints}
|
123 | 123 |
PATH_SUFFIXES lib ../../lib
|
124 | 124 |
)
|
125 | 125 |
mark_as_advanced(NetCDF_${_comp}_LIBRARY)
|
6 | 6 |
# nor does it submit to any jurisdiction.
|
7 | 7 |
|
8 | 8 |
set( CMAKE_Fortran_FLAGS_RELEASE "-O3 -DNDEBUG -funroll-all-loops -finline-functions" CACHE STRING "Fortran compiler flags for Release builds" FORCE )
|
9 | |
set( CMAKE_Fortran_FLAGS_BIT "-O2 -DNDEBUG -fno-range-check -fconvert=big-endian" CACHE STRING "Fortran compiler flags for Bit-reproducible builds" FORCE )
|
|
9 |
set( CMAKE_Fortran_FLAGS_BIT "-O2 -DNDEBUG -fno-range-check" CACHE STRING "Fortran compiler flags for Bit-reproducible builds" FORCE )
|
10 | 10 |
set( CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -fcheck=bounds -fbacktrace -finit-real=snan" CACHE STRING "Fortran compiler flags for Debug builds" FORCE )
|
11 | 11 |
set( CMAKE_Fortran_FLAGS_PRODUCTION "-O2 -g" CACHE STRING "Fortran compiler flags for Production builds." FORCE )
|
12 | 12 |
set( CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG" CACHE STRING "Fortran compiler flags for RelWithDebInfo builds." FORCE )
|
45 | 45 |
if( CMAKE_C_FLAGS MATCHES "-fooxxx" )
|
46 | 46 |
message(FATAL_ERROR "Flag -fooxxx wrongly added" )
|
47 | 47 |
else()
|
48 | |
message("Successfully skiped addition of fake C flag -fooxxx")
|
|
48 |
message("Successfully skipped addition of fake C flag -fooxxx")
|
49 | 49 |
endif()
|
50 | 50 |
|
51 | 51 |
if( CMAKE_CXX_FLAGS MATCHES "-O1" )
|
|
54 | 54 |
message(FATAL_ERROR "Failed to add CXX flag -O1" )
|
55 | 55 |
endif()
|
56 | 56 |
|
57 | |
if( CMAKE_CXX_FLAGS MATCHES "-barxxx" )
|
58 | |
message(FATAL_ERROR "Flag -barxxx wrongly added" )
|
|
57 |
if( CMAKE_CXX_FLAGS MATCHES "-fantasyflag" )
|
|
58 |
message(FATAL_ERROR "Flag -fantasyflag wrongly added" )
|
59 | 59 |
else()
|
60 | |
message("Successfully skiped addition of fake CXX flag -barxxx")
|
|
60 |
message("Successfully skipped addition of fake CXX flag -fantasyflag")
|
61 | 61 |
endif()
|