diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 33393167f9..9813330b14 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -56,15 +56,18 @@ add_t8_example( NAME t8_example_geometries SOURCES geometry/t8_exam add_t8_example( NAME t8_cmesh_load_save SOURCES IO/cmesh/t8_cmesh_load_save.cxx ) add_t8_example( NAME t8_read_msh_file SOURCES IO/cmesh/gmsh/t8_read_msh_file.cxx ) add_t8_example( NAME t8_load_and_refine_square_w_hole SOURCES IO/cmesh/gmsh/t8_load_and_refine_square_w_hole.cxx ) -add_t8_example( NAME t8_write_cmesh_netcdf SOURCES IO/cmesh/netcdf/t8_write_cmesh_netcdf.cxx ) add_t8_example( NAME t8_read_tetgen SOURCES IO/cmesh/tetgen/t8_read_tetgen_file.cxx ) add_t8_example( NAME t8_time_tetgen SOURCES IO/cmesh/tetgen/t8_time_tetgen_file.cxx ) add_t8_example( NAME t8_forest_tetgen SOURCES IO/cmesh/tetgen/t8_forest_from_tetgen.cxx ) add_t8_example( NAME t8_read_triangle SOURCES IO/cmesh/triangle/t8_read_triangle_file.cxx ) add_t8_example( NAME t8_cmesh_read_from_vtk SOURCES IO/cmesh/vtk/t8_cmesh_read_from_vtk.cxx ) -add_t8_example( NAME t8_netcdf_compilation_status SOURCES IO/forest/netcdf/t8_netcdf_status.c ) -add_t8_example( NAME t8_write_forest_netcdf SOURCES IO/forest/netcdf/t8_write_forest_netcdf.cxx ) +if(T8CODE_ENABLE_NETCDF) + add_t8_example( NAME t8_write_cmesh_netcdf SOURCES IO/cmesh/netcdf/t8_write_cmesh_netcdf.cxx ) + add_t8_example( NAME t8_netcdf_compilation_status SOURCES IO/forest/netcdf/t8_netcdf_status.c ) + add_t8_example( NAME t8_write_forest_netcdf SOURCES IO/forest/netcdf/t8_write_forest_netcdf.cxx ) +endif() + add_t8_example( NAME t8_gmsh_to_vtk SOURCES IO/forest/gmsh/t8_gmsh_to_vtk.cxx ) add_t8_example( NAME t8_example_spheres SOURCES remove/t8_example_spheres.cxx ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4e842966c6..d34f31c70a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -34,6 +34,16 @@ if( T8CODE_ENABLE_NETCDF ) target_compile_definitions(T8 PUBLIC T8_WITH_NETCDF $<$,$>:T8_WITH_NETCDF_PAR> ) + target_sources( T8 PRIVATE + t8_netcdf.c + t8_cmesh/t8_cmesh_netcdf.c + t8_forest/t8_forest_netcdf.cxx + ) + install( FILES + t8_cmesh_netcdf.h + t8_forest_netcdf.h + t8_netcdf.h + ) endif() set_target_properties( T8 PROPERTIES OUTPUT_NAME t8 ) @@ -89,7 +99,6 @@ target_sources( T8 PRIVATE t8_element_shape.c t8_element.cxx t8_mesh.c - t8_netcdf.c t8_refcount.c t8_version.c t8_vtk.c @@ -99,7 +108,6 @@ target_sources( T8 PRIVATE t8_cmesh/t8_cmesh_stash.c t8_cmesh/t8_cmesh_vtk_reader.cxx t8_cmesh/t8_cmesh_save.cxx - t8_cmesh/t8_cmesh_netcdf.c t8_cmesh/t8_cmesh_trees.cxx t8_cmesh/t8_cmesh_commit.cxx t8_cmesh/t8_cmesh_partition.cxx @@ -118,7 +126,6 @@ target_sources( T8 PRIVATE t8_forest/t8_forest_ghost.cxx t8_forest/t8_forest_iterate.cxx t8_forest/t8_forest_balance.cxx - t8_forest/t8_forest_netcdf.cxx t8_forest/t8_forest_search/t8_forest_search.cxx t8_geometry/t8_geometry.cxx t8_geometry/t8_geometry_helpers.c @@ -185,7 +192,6 @@ install( FILES t8.h t8_cmesh.h t8_cmesh.hxx - t8_cmesh_netcdf.h t8_cmesh_readmshfile.h t8_cmesh_tetgen.h t8_cmesh_triangle.h @@ -193,10 +199,8 @@ install( FILES t8_eclass.h t8_element.h t8_element_shape.h - t8_forest_netcdf.h t8_mat.h t8_mesh.h - t8_netcdf.h t8_refcount.h t8_types/t8_vec.hxx t8_version.h