Skip to content

Commit

Permalink
Merge pull request #1588 from NCAR/ejh_fix_cmake
Browse files Browse the repository at this point in the history
fix cmake build in autotools dist
  • Loading branch information
edhartnett authored Aug 18, 2019
2 parents cd0b55f + 51217ec commit 86ad446
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 11 deletions.
5 changes: 2 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ if BUILD_DOCS
DOC = doc
endif

SUBDIRS = src tests examples ${DOC} scripts

EXTRA_DIST = CMakeLists.txt set_flags.am COPYRIGHT
SUBDIRS = src tests examples ${DOC} scripts cmake

EXTRA_DIST = CMakeLists.txt set_flags.am COPYRIGHT cmake_config.h.in
13 changes: 13 additions & 0 deletions cmake/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## This is the automake file for the cmake directory of the PIO
## libraries. This directory holds files needed for the CMake build,
## but not the autotools build.

# Ed Hartnett 8/19/19

# Cmake needs all these extra files to build.
EXTRA_DIST = FindGPTL.cmake FindHDF5.cmake FindLIBRT.cmake \
FindLIBZ.cmake FindMPE.cmake FindMPISERIAL.cmake FindNetCDF.cmake \
FindPAPI.cmake FindPnetCDF.cmake FindSZIP.cmake LibCheck.cmake \
LibFind.cmake LibMPI.cmake Makefile.am mpiexec.alcf mpiexec.ncsa \
mpiexec.nersc mpiexec.nwscla mpiexec.olcf TryHDF5_HAS_SZIP.c \
TryNetCDF_DAP.c TryNetCDF_PARALLEL.c TryNetCDF_PNETCDF.c
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -314,4 +314,5 @@ AC_OUTPUT(Makefile
examples/Makefile
examples/c/Makefile
examples/f03/Makefile
cmake/Makefile
scripts/Makefile)
2 changes: 2 additions & 0 deletions examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ F03 = f03
endif # BUILD_FORTRAN

SUBDIRS = c ${F03}

EXTRA_DIST = CMakeLists.txt
6 changes: 3 additions & 3 deletions examples/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ ADD_EXECUTABLE(darray_no_async darray_no_async.c)
TARGET_LINK_LIBRARIES(darray_no_async pioc)
add_dependencies(tests darray_no_async)

ADD_EXECUTABLE(darray_async darray_async.c)
TARGET_LINK_LIBRARIES(darray_async pioc)
add_dependencies(tests darray_async)
# ADD_EXECUTABLE(darray_async darray_async.c)
# TARGET_LINK_LIBRARIES(darray_async pioc)
# add_dependencies(tests darray_async)

if (PIO_USE_MPISERIAL)
add_test(NAME examplePio COMMAND examplePio)
Expand Down
2 changes: 1 addition & 1 deletion examples/c/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ TESTS = run_tests.sh
endif # RUN_TESTS

# Distribute the test script.
EXTRA_DIST = run_tests.sh
EXTRA_DIST = run_tests.sh CMakeLists.txt example2.c

# Clean up files produced during testing.
CLEANFILES = *.nc *.log *.clog2 *.slog2
2 changes: 1 addition & 1 deletion src/clib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ pioc_support.c pio_darray_int.c pio_get_nc.c pio_lists.c pio_nc4.c \
pio_put_nc.c pio_spmd.c pio_get_vard.c pio_put_vard.c pio_internal.h \
bget.h uthash.h pio_error.h

EXTRA_DIST = CMakeLists.txt
EXTRA_DIST = CMakeLists.txt topology.c
4 changes: 3 additions & 1 deletion src/gptl/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ perf_mod.mod: perf_mod.$(OBJEXT)
#if BUILD_FORTRAN
#endif

EXTRA_DIST = CMakeLists.txt
EXTRA_DIST = CMakeLists.txt GPTLget_memusage.c GPTLprint_memusage.c \
GPTLutil.c f_wrappers.c gptl.c gptl_papi.c threadutil.c gptl.inc \
gptl.h private.h
2 changes: 1 addition & 1 deletion tests/cunit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ test_async_perf_SOURCES = test_async_perf.c test_common.c pio_tests.h
test_darray_vard_SOURCES = test_darray_vard.c test_common.c pio_tests.h

# Distribute the test script.
EXTRA_DIST = run_tests.sh
EXTRA_DIST = run_tests.sh CMakeLists.txt test_darray_frame.c

# Clean up files produced during testing.
CLEANFILES = *.nc *.log decomp*.txt *.clog2 *.slog2
2 changes: 1 addition & 1 deletion tests/unit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TESTS = run_tests.sh
endif # RUN_TESTS

# Distribute the test script.
EXTRA_DIST = CMakeLists.txt run_tests.sh input.nl
EXTRA_DIST = CMakeLists.txt run_tests.sh input.nl not_netcdf.ieee

# Clean up files produced during testing.
CLEANFILES = *.nc *.log *.mod

0 comments on commit 86ad446

Please sign in to comment.