NetCDF  4.6.3
 All Data Structures Files Functions Variables Typedefs Macros Modules Pages
install.md
1 Getting and Building netCDF {#getting_and_building_netcdf}
2 =============================
3 
4 [TOC]
5 
6 This document is for getting and building the netCDF C library and utilities for the most recent released version. Other libraries that depend on the netCDF C library, such as the Fortran, Python, Java, and C++ libraries, are available as separate distributions that can be optionally built and installed after the C library is successfully installed. The netCDF-Java library is independent of the netCDF C library unless writing netCDF-4 files from Java is required.
7 
8 Getting netCDF-C {#getting}
9 =========================
10 
11 * For information regarding the netCDF-Fortran libraries, see \subpage building_netcdf_fortran.
12 * Functionality to make it easier to build netcdf-fortran as part of the netcdf-c build for *non-MSVC* builds may be enabled at configure time by using the following **Highly Experimental** options:
13 
14  * Autotools: `--enable-remote-fortran-bootstrap`
15  * CMake: `-DENABLE_REMOTE_FORTRAN_BOOTSTRAP=ON`
16 
17 For more details, see the <a href="https://github.com/Unidata/netcdf-c/blob/master/RELEASE_NOTES.md">draft instructions</a> in the Release Notes under the `4.3.3-rc3` section.
18 
19 Getting pre-built netCDF-C libraries. {#sec_get_pre_built}
20 -------------------------------------
21 
22 The easiest way to get netCDF is through a package management program,
23 such as rpm, yum, homebrew, macports, adept, and others. NetCDF is
24 available from many different repositories, including the default Red
25 Hat and Ubuntu repositories.
26 
27 When getting netCDF from a software repository, you should get a
28 development version that includes the netcdf.h header file. A
29 development version will typically have a name such as "netcdf-devel"
30 or "libnetcdf-dev".
31 
32 Instructions for installing and using pre-built libraries for Windows may be found here: \ref winbin.
33 
34 Getting the latest netCDF-C Source Code {#sec_get_source}
35 ----------------------------------------
36 
37 The netCDF-C source code is hosted from the <a href="http://github.com/Unidata/netcdf-c" >Unidata GitHub repository</a>.
38 
39 
40 Two options are available for building from source:
41 
42 * The latest release.
43 * The developer snapshot.
44 
45 ### The latest release {#sec_latest_release}
46 
47 The latest full release may be <a href="http://github.com/Unidata/netcdf-c/releases" >downloaded from GitHub</a>.
48 
49 Source files are available in `.tar.gz` and `.zip` formats.
50 
51 ### The developer snapshot {#sec_dev_snapshot}
52 
53 The developer snapshot may be cloned from GitHub directly by using the `git` command.
54 
55 > $ git clone http://github.com/Unidata/netcdf-c netcdf-c
56 
57 **Note:**
58 
59 *The developer snapshot release contains bug-fixes and new features added since the last full release, but may also contain new bugs, as it is not tested as extensively as the full release.*
60 
61 Building netCDF-C {#building}
62 ===========================
63 
64 The netCDF-C library and utilities require third-party libraries for
65 full functionality. (See \ref architecture).
66 * \ref build_default
67 * \ref build_classic
68 * \ref build_hdf4
69 * \ref build_parallel
70 * \ref building_netcdf_fortran
71 * \ref configure_options
72 
73 Requirements {#netcdf_requirements}
74 ----------------------------------
75 
76 * For netCDF-4 support
77  * HDF5 1.8.9 or later.
78  * HDF5 1.10.1 or later.
79 * zlib 1.2.5 or later (for netCDF-4 compression)
80 * curl 7.18.0 or later (for DAP remote access client support)
81 * For parallel I/O support on classic netCDF files
82  * PnetCDF 1.6.0 or later
83 
84 > **Important Note**: When building netCDF-C library versions older than 4.4.1, use only HDF5 1.8.x versions. Combining older netCDF-C versions with newer HDF5 1.10 versions will create superblock 3 files that are not readable by lots of older software. See <a href="http://www.unidata.ucar.edu/blogs/news/entry/netcdf-4-4-1">this announcement</a> for more details.
85 
86 
87 CMake and Windows support {#sub}
88 --------------------------------
89 
90 * \ref netCDF-CMake
91 * \subpage winbin
92 
93 Building with netCDF-4 and the Remote Data Client {#build_default}
94 --------------------------------
95 
96 The usual way of building netCDF requires the HDF5, zlib, and curl libraries. Versions required are at least HDF5 1.8.9, zlib 1.2.5, and curl 7.18.0 or later.
97 
98 HDF5 and zlib packages are available from the <a href="http://www.hdfgroup.org/downloads/">HDF5 downloads site</a> and the <a href="http://www.zlib.net/">zlib home site</a>. If you wish to use the remote data client code, then you will also need libcurl, which can be obtained from the <a href="http://curl.haxx.se/download.html">curl website</a>.
99 
100 > Note that for building netCDF, it is not necessary to build the HDF5 Fortran, C++, or Java API's. Only the HDF5 C library is used, even for netCDF Fortran or C++ libraries.
101 
102 ### Optional: szip support {#op_szip_support}
103 
104 *Optionally*, you can also build netCDF-4 with the szip library (a.k.a. szlib). If building with szlib, get szip 2.0 or later. Technically, we mean that
105 the HDF5 library is built with szip support. The netcdf build will then
106 inherit szip support from the HDF5 library.
107 If you intend to write files with szip compression, then we suggest that you
108 use [libaec](https://gitlab.dkrz.de/k202009/libaec.git)
109 to avoid patent problems. That library can be used as a
110 drop-in replacement for the standard szip library.
111 If you plan to use the standard szip library,
112 then determine whether license restrictions on the use of szip apply to your situation. See the <a href="http://www.hdfgroup.org/doc_resource/SZIP/">web page on szip compression in HDF products</a>.
113 
114 If `make check` fails for either `zlib` or `HDF5`, the problem must be resolved before the netCDF-4 installation can continue. For HDF5 problems, see the <a href="http://www.hdfgroup.org/services/support.html">HDF5 help services</a>.
115 
116 ### Building zlib from source {#build_zlib_from_source}
117 
118 To build zlib from source, specify where you want to install zlib in a shell variable you will also use later (ZDIR, for example), and build it like this from the top-level zlib source directory
119 
120 ~~~~{.py}
121  $ # Build and install zlib
122  $ ZDIR=/usr/local
123  $ ./configure --prefix=${ZDIR}
124  $ make check
125  $ make install # or sudo make install, if root permissions required
126 ~~~~
127 
128 ### Building hdf5 from source {#build_hdf5_from_source}
129 
130 Next, specify where you want to install HDF5 in another shell variable, for example H5DIR, and build it from the HDF5 top-level source directory:
131 
132 ~~~~{.py}
133  $ # Build and install HDF5
134  $ H5DIR=/usr/local
135  $ ./configure --with-zlib=${ZDIR} --prefix=${H5DIR} --eanble-hl
136  $ make check
137  $ make install # or sudo make install, if root permissions required
138 ~~~~
139 
140 If you are building HDF5 with the optional szip library, include the `--with-szlib=` option to specify where it was installed.
141 
142 In all cases, the installation location specified with the `--prefix` option *must be different* from the source directory where the software is being built.
143 
144 ### Building netCDF-4 and the Remote Data Client from source {#build_nc4_dap_from_source}
145 
146 Before building netCDF, you may need to add `${H5DIR}/lib` to the LD_LIBRARY_PATH environment variable if that lib directory is not searched by default. See the <a href="http://www.unidata.ucar.edu/netcdf/docs/faq.html#Shared%20Libraries">netCDF FAQ</a> for more details on using shared libraries.
147 
148 Indicate where you want to install netCDF in another shell variable, for example NCDIR. Then run the netCDF configure script, specifying where HDF5 was installed using the CPPFLAGS and LDFLAGS environment variables. For example, from the top-level netCDF source directory:
149 
150 ~~~~{.py}
151  $ # Build and install netCDF-4
152  $ NCDIR=/usr/local
153  $ CPPFLAGS='-I${H5DIR}/include -I${ZDIR}/include' LDFLAGS='-L${H5DIR}/lib -L${ZDIR}/lib' ./configure --prefix=${NCDIR}
154  $ make check
155  $ make install # or sudo make install
156 ~~~~
157 
158 If you don't provide a `--prefix` option, installation will be in `/usr/local/`, in subdirectories lib/, include/, and bin/. The installation location specified with the `--prefix` option must be different from the source directory where the software is being built.
159 
160 > WARNING: you should be able to use parallel 'make all'. But 'make check' will probably fail if you use parallel make. This is because historically, there are inter-dependencies between test programs. It is unlikely that this will be fixed any time soon, if ever.
161 
162 Building netCDF with Classic Library Only {#build_classic}
163 ---------------------------------------
164 
165 It is possible to build the netCDF C libraries and utilities so that
166 only the netCDF classic and 64-bit offset formats are supported, or
167 the remote data access client is not built. (See \ref netcdf_format
168 for more information about the netCDF format variants. See the <a
169 href="http://www.opendap.org/documentation">DAP documentation and
170 support site</a> for more information about remote client access to
171 data on OPeNDAP servers.)
172 
173 If necessary, set the NCDIR shell variable to indicate where netCDF should be
174 installed. Then to build a netCDF-3 library without support for the
175 netCDF-4 formats or functions, but with remote client access, use:
176 
177 ~~~~{.py}
178  $ # Build and install netCDF-3 from netCDF-4 source
179  $ ./configure --prefix=${NCDIR} --disable-netcdf-4
180  $ make check install
181 ~~~~
182 
183 To build with full support for netCDF-4 API's and format but without
184 remote client access, use:
185 
186 ~~~~{.py}
187  $ # Build and install netCDF-4 without DAP client support
188  $ ./configure --prefix=${NCDIR} --disable-dap
189  $ make check install
190 ~~~~
191 
192 To build without netCDF-4 support or remote client access, use:
193 
194 ~~~~{.py}
195  $ # Build and install minimal netCDF-3 with no DAP client support
196  $ ./configure --prefix=${NCDIR} --disable-netcdf-4 --disable-dap
197  $ make check install
198 ~~~~
199 
200 If you get the message that netCDF installed correctly, then you are
201 done!
202 
203 Building with HDF4 Support {#build_hdf4}
204 ---------------------
205 
206 The netCDF-4 library can read HDF4 data files, if they were created
207 with the SD (Scientific Data) API.
208 
209 For this to work, you must build the HDF4 library with the
210 configure option `--disable-netcdf`
211 to prevent it from building an HDF4 version of the netCDF-2 library
212 that conflicts with the netCDF-2 functions that are built into the Unidata
213 netCDF library.
214 
215 Then, when building netCDF-4, use the `--enable-hdf4`
216 option to configure. The location for the HDF4 header files and
217 library must be specified in the CPPFLAGS and LDFLAGS environment variables
218 or configure options.
219 
220 For HDF4 access to work, the library must be built with netCDF-4
221 features.
222 
223 Here's an example, assuming the HDF5 library has been built and
224 installed in H5DIR and you will build and install the HDF4 library in
225 H4DIR (which could be the same as H5DIR). From the top-level HDF4
226 source directory:
227 
228 ~~~~{.py}
229  $ # Build and install HDF4
230  $ ./configure --enable-shared --disable-netcdf --disable-fortran --prefix=${H4DIR}
231  $ make check
232  $ make install
233 ~~~~
234 
235 Then from the top-level netCDF directory:
236 
237 ~~~~{.py}
238  $ # Build and install netCDF-4 with HDF4 access enabled
239  $ CPPFLAGS="-I${H5DIR}/include -I${H4DIR}/include" \
240  LDFLAGS="-L${H5DIR}/lib -L${H4DIR}/lib" \
241  ./configure --enable-hdf4 --enable-hdf4-file-tests
242  $ make check
243  $ make install
244 ~~~~
245 
246 Building with Parallel I/O Support {#build_parallel}
247 --------------
248 
249 For parallel I/O to work, HDF5 must be installed with
250 `--enable-parallel`, and an MPI library (and related libraries) must be
251 made available to the HDF5 configure. This can be accomplished with
252 an mpicc wrapper script.
253 
254 The following works from the top-level HDF5 source directory to build
255 HDF5 with parallel I/O:
256 
257 ~~~~{.py}
258  $ # Build and install HDF5 with parallel support
259  $ CC=mpicc ./configure --enable-parallel --prefix=${H5DIR}
260  $ make check
261  $ make install
262 ~~~~
263 
264 If the HDF5 used by netCDF has been built with parallel I/O, then netCDF will also be built with inherited support for parallel I/O. This allows parallel I/O access to netCDF-4/HDF5 files. (See /ref netcdf_formats for more information about the netCDF format variants.)
265 
266 From the top-level netCDF-4 source directory, the following builds netCDF-4 with parallel I/O, assuming H5DIR specifies where parallel HDF5 was installed:
267 
268 ~~~~{.py}
269  $ # Build, test, and install netCDF-4 with HDF5 parallel support
270  $ CC=mpicc CPPFLAGS=-I${H5DIR}/include LDFLAGS=-L${H5DIR}/lib \
271  ./configure --disable-shared --enable-parallel-tests --prefix=${NCDIR}
272  $ make check
273  $ make install
274 ~~~~
275 
276 ### Building PnetCDF from source {#build_pnetcdf_from_source}
277 
278 To enable parallel I/O support for classic netCDF files, i.e. CDF-1, 2 and 5
279 formats, [PnetCDF library](https://parallel-netcdf.github.io) must also be
280 installed. First specify where you want to install PnetCDF in a shell
281 variable, for example PNDIR, and build it from the PnetCDF top-level source
282 directory. If you would like to build the shared library, include
283 `--enable-shared` option at the configure command line. By default, only a
284 static library is built.
285 
286 ~~~~{.py}
287  $ # Build and install PnetCDF
288  $ PNDIR=/usr/local
289  $ ./configure --prefix=${PNDIR} --with-mpi=/path/to/MPI/compilers
290  $ make check
291  $ make install # or sudo make install, if root permissions required
292 ~~~~
293 
294 To build netCDF-4 with PnetCDF support, from the top-level netCDF-4 source
295 directory, configure netCDF with the "--enable-pnetcdf" option. If PnetCDF
296 is built with static library only, add "--disable-shared" option.
297 
298 ~~~~{.py}
299  $ # Build, test, and install netCDF-4 with PnetCDF support
300  $ CC=mpicc CPPFLAGS="-I${H5DIR}/include -I${PNDIR}/include" \
301  LDFLAGS="-L${H5DIR}/lib -L${PNDIR}/lib" ./configure \
302  --enable-pnetcdf --enable-parallel-tests \
303  --prefix=${NCDIR}
304  $ make check
305  $ make install
306 ~~~~
307 
308 Linking to netCDF-C {#linking}
309 -------------------
310 
311 For static builds of applications that use netCDF-4 you must link to all the
312 libraries, netCDF, HDF5, zlib, szip (if used with HDF5 build), PnetCDF (if used
313 with PnetCDF build), and curl (if the remote access client has not been
314 disabled). This will require -L options to your build for the locations of the
315 libraries, and -l (lower-case L) for the names of the libraries.
316 
317 For example, you might build other applications with netCDF-4 by
318 setting the LIBS environment variable, assuming NCDIR, H5DIR, PNDIT, and ZDIR
319 indicate where netCDF, HDF5, PnetCDF, and zlib are installed:
320 
321 ~~~~{.py}
322  LIBS="-L${NCDIR}/lib -lnetcdf -L${H5DIR}/lib -lhdf5_hl -lhdf5 -L${PNDIR} -lpnetcdf -L${ZDIR}/lib -lz -lm"
323 ~~~~
324 
325 For shared builds, only `-L${NCDIR}/lib -lnetcdf` is
326 needed. All other libraries will be found automatically.
327 
328 The `pkg-config` or `nc-config` utilities can be
329 used to specify build options for software that uses netCDF. For
330 example, to compile and link an application named myapp.c with a
331 netCDF-C libraries, whether shared or static, you can use
332 
333 ~~~~{.py}
334  $ cc -o myapp myapp.c `nc-config --cflags --libs`
335 ~~~~
336 
337 or
338 
339 ~~~~{.py}
340  $ PKG_CONFIG_PATH=${NCDIR}/lib/pkgconfig:$PKG_CONFIG_PATH
341  $ export PKG_CONFIG_PATH
342  $ cc -o myapp myapp.c `pkg-config --cflags --libs netcdf`
343 ~~~~
344 
345 configure options {#configure_options}
346 -----------------------------
347 
348 These options are used for `autotools`-based builds.yup
349 
350 Note: `--disable` prefix indicates that the option is normally enabled.
351 <table>
352 <tr><th>Option<th>Description<th>Dependencies
353 <tr><td>--disable-doxygen<td>Disable generation of documentation.<td>doxygen
354 <tr><td>--disable-fsync<td>disable fsync support<td>kernel fsync support
355 <tr><td>--disable-netcdf-4<td>build netcdf-3 without HDF5 and zlib<td>
356 <tr><td>--disable-netcdf4<td>synonym for disable-netcdf-4<td>
357 <tr><td>--enable-hdf4<td>build netcdf-4 with HDF4 read capability<td>HDF4, HDF5 and zlib
358 <tr><td>--enable-hdf4-file-tests<td>test ability to read HDF4 files<td>selected HDF4 files from Unidata ftp site
359 <tr><td>--disable-parallel4<td>build netcdf-4 without parallel I/O support<td>
360 <tr><td>--disable-cdf5<td>build netcdf-4 without support of classic CDF-5 file format<td>
361 <tr><td>--enable-pnetcdf<td>build netcdf-4 with parallel I/O for classic files (CDF-1, 2, and 5 formats) using PnetCDF<td>PnetCDF
362 <tr><td>--enable-extra-example-tests<td>Run extra example tests<td>--enable-netcdf-4,GNU sed
363 <tr><td>--disable-filter-testing<td>Run filter example<td>--enable-shared --enable-netcdf-4
364 <tr><td>--enable-parallel-tests <td>run extra parallel IO tests<td>--enable-netcdf-4 or --enable-pnetcdf, parallel IO support
365 <tr><td>--enable-logging<td>enable logging capability<td>--enable-netcdf-4
366 <tr><td>--disable-dap<td>build without DAP client support.<td>libcurl
367 <tr><td>--disable-dap-remote-tests<td>disable dap remote tests<td>--enable-dap
368 <tr><td>--enable-dap-long-tests<td>enable dap long tests<td>
369 <tr><td>--enable-extra-tests<td>run some extra tests that may not pass because of known issues<td>
370 <tr><td>--enable-ffio<td>use ffio instead of posixio (ex. on the Cray)<td>
371 <tr><td>--disable-examples<td>don't build the netCDF examples during make check
372  (examples are treated as extra tests by netCDF)<td>
373 <tr><td>--disable-v2<td>turn off the netCDF version 2 API<td>
374 <tr><td>--disable-utilities<td>don't build netCDF utilities ncgen, ncdump, and nccopy<td>
375 <tr><td>--disable-testsets<td>don't build or run netCDF tests<td>
376 <tr><td>--enable-large-file-tests <td>Run tests which create very large data
377  files<td>~13 GB disk space required, but recovered when
378  tests are complete). See option --with-temp-large to
379  specify temporary directory
380 <tr><td>--enable-benchmarks<td>Run benchmarks. This is an experimental feature.
381  The benchmarks are extra tests, used to check netCDF performance.
382  <td>sample data files from the Unidata ftp site
383 <tr><td>--disable-extreme-numbers
384 <td>don't use extreme numbers during testing, such as MAX_INT - 1<td>
385 <tr><td>--disable-shared<td>don't build shared libraries<td>
386 <tr><td>--disable-static<td>don't build static libraries<td>
387 <tr><td>--disable-largefile<td>omit support for files larger than 2GB<td>
388 <tr><td>--enable-mmap<td>Use mmap to implement NC_DISKLESS<td>System-provided `mmap` or `mremap` functions
389 <tr><td>--enable-valgrind-tests <td>build with valgrind-tests; static builds only<td>valgrind
390 </table>
391 
392 Build Instructions for netCDF-C using CMake {#netCDF-CMake}
393 ===========================================
394 
395 ## Overview {#cmake_overview}
396 
397 Starting with netCDF-C 4.3.0, we are happy to announce the inclusion of CMake support. CMake will allow for building netCDF on a wider range of platforms, include Microsoft Windows with Visual Studio. CMake support also provides robust unit and regression testing tools. We will also maintain the standard autotools-based build system in parallel.
398 
399 In addition to providing new build options for netCDF-C, we will also provide pre-built binary downloads for the shared versions of netCDF for use with Visual Studio.
400 
401 
402 ## Requirements {#cmake_requirements}
403 The following packages are required to build netCDF-C using CMake.
404 
405 * netCDF-C Source Code
406 * CMake version 2.8.12 or greater.
407 * Optional Requirements:
408  * HDF5 Libraries for netCDF4/HDF5 support.
409  * libcurl for DAP support.
410  * PnetCDF libraries for parallel I/O support to classic netCDF files
411 
412 <center>
413 <img src="deptree.jpg" height="250px" />
414 </center>
415 
416 ## The CMake Build Process {#cmake_build}
417 
418 There are four steps in the Build Process when using CMake
419 
420 1. Configuration: Before compiling, the software is configured based on the desired options.
421 2. Building: Once configuration is complete, the libraries are compiled.
422 3. Testing: Post-build, it is possible to run tests to ensure the functionality of the netCDF-C libraries.
423 4. Installation: If all tests pass, the libraries can be installed in the location specified during configuration.
424 
425 For users who prefer pre-built binaries, installation packages are available at \ref winbin
426 
427 ### Configuration {#cmake_configuration}
428 
429 The output of the configuration step is a project file based on the appropriate configurator specified. Common configurators include:
430 
431 * Unix Makefiles
432 * Visual Studio
433 * CodeBlocks
434 * ... and others
435 
436 ### Common CMake Options {#cmake_common_options}
437 
438 | **Option** | **Autotools** | **CMake** |
439 | :------- | :---- | :----- |
440 Specify Install Location | --prefix=PREFIX | -D"CMAKE_INSTALL_PREFIX=PREFIX"
441 Enable/Disable netCDF-4 | --enable-netcdf-4<br>--disable-netcdf-4 | -D"ENABLE_NETCDF_4=ON" <br> -D"ENABLE_NETCDF_4=OFF"
442 Enable/Disable DAP | --enable-dap <br> --disable-dap | -D"ENABLE_DAP=ON" <br> -D"ENABLE_DAP=OFF"
443 Enable/Disable Utilities | --enable-utilities <br> --disable-utilities | -D"BUILD_UTILITIES=ON" <br> -D"BUILD_UTILITIES=OFF"
444 Specify shared/Static Libraries | --enable-shared <br> --enable-static | -D"BUILD_SHARED_LIBS=ON" <br> -D"BUILD_SHARED_LIBS=OFF"
445 Enable/Disable Parallel netCDF-4 | --enable-parallel4 <br> --disable-parallel4 | -D"ENABLE_PARALLEL4=ON" <br> -D"ENABLE_PARALLEL4=OFF"
446 Enable/Disable PnetCDF | --enable-pnetcdf<br>--disable-pnetcdf | -D"ENABLE_PNETCDF=ON" <br> -D"ENABLE_PNETCDF=OFF"
447 Enable/Disable CDF5 | --enable-cdf5 <br> --disable-cdf5 | -D"ENABLE_CDF5=ON" <br> -D"ENABLE_CDF5=OFF"
448 Enable/Disable Tests | --enable-testsets <br> --disable-testsets | -D"ENABLE_TESTS=ON" <br> -D"ENABLE_TESTS=OFF"
449 Enable/Disable Parallel Tests | --enable-parallel-tests<br> --disable-parallel-tests | -D"ENABLE_PARALLEL_TESTS=ON" <br> -D"ENABLE_PARALLEL_TESTS=OFF"
450 Specify a custom library location | Use *CFLAGS* and *LDFLAGS* | -D"CMAKE_PREFIX_PATH=/usr/custom_libs/"
451 
452 A full list of *basic* options can be found by invoking `cmake [Source Directory] -L`. To enable a list of *basic* and *advanced* options, one would invoke `cmake [Source Directory] -LA`.
453 
454 ### Configuring your build from the command line. {#cmake_command_line}
455 
456 The easiest configuration case would be one in which all of the dependent libraries are installed on the system path (in either Unix/Linux or Windows) and all the default options are desired. From the build directory (often, but not required to be located within the source directory):
457 
458 > $ cmake [Source Directory]
459 
460 If you have libraries installed in a custom directory, you may need to specify the **CMAKE\_PREFIX_PATH** variable to tell cmake where the libraries are installed. For example:
461 
462 > $ cmake [Source Directory] -DCMAKE\_PREFIX\_PATH=/usr/custom_libraries/
463 
464 ## Building {#cmake_building}
465 
466 The compiler can be executed directly with 'make' or the appropriate command for the configurator which was used.
467 
468 > $ make
469 
470 Building can also be executed indirectly via cmake:
471 
472 > $ cmake --build [Build Directory]
473 
474 ## Testing {#cmake_testing}
475 
476 Testing can be executed several different ways:
477 
478 > $ make test
479 
480 or
481 
482 > $ ctest
483 
484 or
485 
486 > $ cmake --build [Build Directory] --target test
487 
488 ### Installation {#cmake_installation}
489 
490 Once netCDF has been built and tested, it may be installed using the following commands:
491 
492 > $ make install
493 
494 or
495 
496 > $ cmake --build [Build Directory] --target install
497 
498 ## See Also {#cmake_see_also}
499 
500 For further information regarding netCDF and CMake, see \ref cmake_faq.

Return to the Main Unidata NetCDF page.
Generated on Sat Apr 6 2019 08:19:00 for NetCDF. NetCDF is a Unidata library.