Skip to content

Commit

Permalink
Add library suffix option
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromKitware committed May 13, 2020
1 parent 98c9205 commit 24efd7f
Show file tree
Hide file tree
Showing 26 changed files with 78 additions and 44 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ if(NOT MSVC)
set(CMAKE_C_STANDARD_REQUIRED True)
endif()

# Option for packagers to add a suffix after "adios" in library names (to
# install multiple builds in parallel)
set(ADIOS2_LIBRARY_SUFFIX "" CACHE STRING
"Suffix to put after \"adios\" in library names")
set(ADIOS2_EXECUTABLE_SUFFIX "${ADIOS2_LIBRARY_SUFFIX}" CACHE STRING
"Suffix to append to executable names")
mark_as_advanced(ADIOS2_LIBRARY_SUFFIX ADIOS2_EXECUTABLE_SUFFIX)

# Use meta-compile features if available, otherwise use specific language
# features
if(CMAKE_VERSION VERSION_LESS 3.9 OR
Expand Down
2 changes: 2 additions & 0 deletions bindings/C/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ add_library(adios2_c
adios2/c/adios2_c_operator.cpp
)
set_property(TARGET adios2_c PROPERTY EXPORT_NAME c)
set_property(TARGET adios2_c PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_c)
target_link_libraries(adios2_c PRIVATE adios2_core)

target_include_directories(adios2_c
Expand All @@ -31,6 +32,7 @@ if(ADIOS2_HAVE_MPI)
adios2/c/adios2_c_io_mpi.cpp
)
set_property(TARGET adios2_c_mpi PROPERTY EXPORT_NAME c_mpi)
set_property(TARGET adios2_c_mpi PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_c_mpi)
target_link_libraries(adios2_c_mpi PUBLIC adios2_c PRIVATE adios2_core_mpi PUBLIC MPI::MPI_C)
target_compile_definitions(adios2_c_mpi INTERFACE ADIOS2_USE_MPI)
add_library(adios2::c_mpi ALIAS adios2_c_mpi)
Expand Down
2 changes: 2 additions & 0 deletions bindings/CXX11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ add_library(adios2_cxx11
adios2/cxx11/fstream/ADIOS2fstream.cpp
)
set_property(TARGET adios2_cxx11 PROPERTY EXPORT_NAME cxx11)
set_property(TARGET adios2_cxx11 PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_cxx11)
target_link_libraries(adios2_cxx11 PRIVATE adios2_core adios2::thirdparty::pugixml)
target_compile_features(adios2_cxx11 INTERFACE ${ADIOS2_CXX11_FEATURES})

Expand All @@ -38,6 +39,7 @@ if(ADIOS2_HAVE_MPI)
adios2/cxx11/fstream/ADIOS2fstreamMPI.cpp
)
set_property(TARGET adios2_cxx11_mpi PROPERTY EXPORT_NAME cxx11_mpi)
set_property(TARGET adios2_cxx11_mpi PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_cxx11_mpi)
target_link_libraries(adios2_cxx11_mpi PUBLIC adios2_cxx11 PRIVATE adios2_core_mpi PUBLIC MPI::MPI_CXX)
set(maybe_adios2_cxx11_mpi adios2_cxx11_mpi)
target_compile_definitions(adios2_cxx11_mpi INTERFACE ADIOS2_USE_MPI)
Expand Down
2 changes: 2 additions & 0 deletions bindings/Fortran/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ add_library(adios2_fortran
modules/adios2_operator_mod.f90
)
set_property(TARGET adios2_fortran PROPERTY EXPORT_NAME fortran)
set_property(TARGET adios2_fortran PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_fortran)

target_include_directories(adios2_fortran
PUBLIC
Expand Down Expand Up @@ -98,6 +99,7 @@ if(ADIOS2_HAVE_MPI)
VERSION ${ADIOS2_LIBRARY_VERSION}
SOVERSION ${ADIOS2_VERSION_MAJOR}
)
set_property(TARGET adios2_fortran_mpi PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_fortran_mpi)
else()
# Without submodules we need to put everything in one library.
add_library(adios2_fortran_mpi INTERFACE)
Expand Down
9 changes: 5 additions & 4 deletions bindings/Python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Python_add_library(adios2_py MODULE
py11File.cpp py11File.tcc
py11glue.cpp
)
target_compile_definitions(adios2_py PRIVATE "ADIOS2_PYTHON_MODULE_NAME=adios2${ADIOS2_LIBRARY_SUFFIX}")
if(ADIOS2_HAVE_MPI)
target_sources(adios2_py PRIVATE
py11ADIOSMPI.cpp
Expand All @@ -30,14 +31,14 @@ target_link_libraries(adios2_py PRIVATE
${maybe_mpi4py} Python::NumPy
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/__init__.py
${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in
${CMAKE_PYTHON_OUTPUT_DIRECTORY}/adios2/__init__.py
COPYONLY
@ONLY
)

set_target_properties(adios2_py PROPERTIES
CXX_VISIBILITY_PRESET hidden
OUTPUT_NAME adios2
OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_PYTHON_OUTPUT_DIRECTORY}/adios2
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_PYTHON_OUTPUT_DIRECTORY}/adios2
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_PYTHON_OUTPUT_DIRECTORY}/adios2
Expand All @@ -56,7 +57,7 @@ install(TARGETS adios2_py
DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/adios2
COMPONENT adios2_python-python
)
install(FILES __init__.py
install(FILES ${CMAKE_PYTHON_OUTPUT_DIRECTORY}/adios2/__init__.py
DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/adios2
COMPONENT adios2_python-python
)
1 change: 0 additions & 1 deletion bindings/Python/__init__.py

This file was deleted.

1 change: 1 addition & 0 deletions bindings/Python/__init__.py.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .adios2@ADIOS2_LIBRARY_SUFFIX@ import *
2 changes: 1 addition & 1 deletion bindings/Python/py11glue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ adios2::py11::File OpenConfig(const std::string &name, const std::string mode,
return adios2::py11::File(name, mode, configfile, ioinconfigfile);
}

PYBIND11_MODULE(adios2, m)
PYBIND11_MODULE(ADIOS2_PYTHON_MODULE_NAME, m)
{
m.attr("DebugON") = true;
m.attr("DebugOFF") = false;
Expand Down
8 changes: 4 additions & 4 deletions cmake/install/post/generate-adios2-config.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ then
EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DCMAKE_PREFIX_PATH=@CMAKE_PREFIX_PATH@"
fi

echo "Configuring adios2-config dummy CMake project"
echo "Configuring adios2-config@ADIOS2_EXECUTABLE_SUFFIX@ dummy CMake project"
if ! ${CMAKE} -G "Unix Makefiles" ${SOURCE_DIR} ${EXTRA_CMAKE_ARGS}
then
echo "Failed"
Expand Down Expand Up @@ -169,11 +169,11 @@ else
BINDIR="${adios2_DIR}/@CMAKE_INSTALL_BINDIR@"
fi

echo "Writing ${BINDIR}/adios2-config"
echo "Writing ${BINDIR}/adios2-config@ADIOS2_EXECUTABLE_SUFFIX@"
cat \
"@ADIOS2_BINARY_DIR@/cmake/install/post/adios2-config.pre.sh" \
adios2.flags \
"@ADIOS2_BINARY_DIR@/cmake/install/post/adios2-config.post.sh" > "${BINDIR}/adios2-config"
chmod +x "${BINDIR}/adios2-config"
"@ADIOS2_BINARY_DIR@/cmake/install/post/adios2-config.post.sh" > "${BINDIR}/adios2-config@ADIOS2_EXECUTABLE_SUFFIX@"
chmod +x "${BINDIR}/adios2-config@ADIOS2_EXECUTABLE_SUFFIX@"
popd
rm -rf ${BUILD_DIR}
2 changes: 2 additions & 0 deletions scripts/ci/cmake/ci-debian-sid-openmpi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SSC:BOOL=ON
ADIOS2_USE_SST:BOOL=ON
ADIOS2_USE_ZeroMQ:BOOL=ON
ADIOS2_LIBRARY_SUFFIX:STRING=_openmpi
ADIOS2_EXECUTABLE_SUFFIX:STRING=.openmpi
MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe
")
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci/cmake/ci-debian-sid.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SSC:BOOL=ON
ADIOS2_USE_SST:BOOL=ON
ADIOS2_USE_ZeroMQ:BOOL=ON
ADIOS2_LIBRARY_SUFFIX:STRING=_serial
ADIOS2_EXECUTABLE_SUFFIX:STRING=.serial
")

set(CTEST_CMAKE_GENERATOR "Ninja")
Expand Down
5 changes: 5 additions & 0 deletions source/adios2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ add_library(taustubs
target_include_directories(taustubs PRIVATE
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/source>
)
set_property(TARGET taustubs PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_taustubs)

target_link_libraries(taustubs PRIVATE ${CMAKE_DL_LIBS})

Expand Down Expand Up @@ -111,6 +112,7 @@ add_library(adios2_core
toolkit/burstbuffer/FileDrainerSingleThread.cpp
)
set_property(TARGET adios2_core PROPERTY EXPORT_NAME core)
set_property(TARGET adios2_core PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_core)

target_include_directories(adios2_core
PUBLIC
Expand All @@ -135,6 +137,7 @@ if(ADIOS2_HAVE_MPI)
engine/insitumpi/InSituMPIFunctions.cpp engine/insitumpi/InSituMPISchedules.cpp
)
set_property(TARGET adios2_core_mpi PROPERTY EXPORT_NAME core_mpi)
set_property(TARGET adios2_core_mpi PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_core_mpi)
target_link_libraries(adios2_core_mpi PUBLIC adios2_core MPI::MPI_C PRIVATE taustubs)
target_compile_definitions(adios2_core_mpi PUBLIC "$<BUILD_INTERFACE:ADIOS2_USE_MPI>")
endif()
Expand Down Expand Up @@ -264,6 +267,7 @@ if(ADIOS2_HAVE_HDF5)
endif()
target_link_libraries(adios2_core PRIVATE adios2_hdf5)
set_property(TARGET adios2_hdf5 PROPERTY EXPORT_NAME hdf5)
set_property(TARGET adios2_hdf5 PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_hdf5)

set(adios2_hdf5_objs adios2_hdf5)
if(HDF5_IS_PARALLEL)
Expand All @@ -275,6 +279,7 @@ if(ADIOS2_HAVE_HDF5)
target_compile_definitions(adios2_hdf5_mpi PRIVATE ADIOS2_USE_MPI)
target_link_libraries(adios2_core_mpi PRIVATE adios2_hdf5_mpi)
set_property(TARGET adios2_hdf5_mpi PROPERTY EXPORT_NAME hdf5_mpi)
set_property(TARGET adios2_hdf5_mpi PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_hdf5_mpi)
endif()

foreach(lib IN LISTS adios2_hdf5_objs)
Expand Down
2 changes: 1 addition & 1 deletion source/adios2/toolkit/sst/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ endif()

# Set library version information
set_target_properties(sst PROPERTIES
OUTPUT_NAME adios2_sst
OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_sst
VERSION ${ADIOS2_LIBRARY_VERSION}
SOVERSION ${ADIOS2_VERSION_MAJOR}
)
Expand Down
1 change: 1 addition & 0 deletions source/adios2/toolkit/sst/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ endif()
# stt_conn_tool
add_executable(sst_conn_tool sst_conn_tool.c sst_conn_tool.cxx)
target_link_libraries(sst_conn_tool ${maybe_adios2_core_mpi} adios2_core)
set_property(TARGET sst_conn_tool PROPERTY OUTPUT_NAME sst_conn_tool${ADIOS2_EXECUTABLE_SUFFIX})

if(WIN32)
target_link_libraries(sst_conn_tool getopt)
Expand Down
8 changes: 7 additions & 1 deletion source/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ configure_file(
add_executable(bpls ./bpls/bpls.cpp)
target_link_libraries(bpls adios2_core adios2sys adios2::thirdparty::pugixml)
target_include_directories(bpls PRIVATE ${PROJECT_BINARY_DIR})
set_property(TARGET bpls PROPERTY OUTPUT_NAME bpls${ADIOS2_EXECUTABLE_SUFFIX})
install(TARGETS bpls EXPORT adios2
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime
)
Expand Down Expand Up @@ -47,10 +48,12 @@ else()
endif()
add_executable(adios_reorganize ${adios_reorganize_srcs})
target_link_libraries(adios_reorganize PRIVATE adios2_core ${maybe_mgard})
set_property(TARGET adios_reorganize PROPERTY OUTPUT_NAME adios2_reorganize${ADIOS2_EXECUTABLE_SUFFIX})

if(ADIOS2_HAVE_MPI)
add_executable(adios_reorganize_mpi ${adios_reorganize_srcs})
target_link_libraries(adios_reorganize_mpi PRIVATE adios2_core_mpi ${maybe_mgard})
set_property(TARGET adios_reorganize_mpi PROPERTY OUTPUT_NAME adios2_reorganize_mpi${ADIOS2_EXECUTABLE_SUFFIX})
set(maybe_adios_reorganize_mpi adios_reorganize_mpi)
else()
set(maybe_adios_reorganize_mpi)
Expand All @@ -70,4 +73,7 @@ if(Python_Interpreter_FOUND)
add_subdirectory(bp4dbg)
endif()

install(PROGRAMS adios_deactivate_bp.sh DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_scripts-runtime)
install(PROGRAMS adios_deactivate_bp.sh
RENAME adios2_deactivate_bp
DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT adios2_scripts-runtime)
1 change: 1 addition & 0 deletions source/utils/adios_iotest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ target_link_libraries(adios_iotest adios2::cxx11_mpi MPI::MPI_C)
if(WIN32)
target_link_libraries(adios_iotest getopt)
endif()
set_property(TARGET adios_iotest PROPERTY OUTPUT_NAME adios2_iotest${ADIOS2_EXECUTABLE_SUFFIX})

if(ADIOS2_HAVE_HDF5 AND HDF5_IS_PARALLEL)
target_compile_definitions(adios_iotest PRIVATE ADIOS2_HAVE_HDF5_PARALLEL)
Expand Down
18 changes: 9 additions & 9 deletions testing/install/C/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,38 @@ test: adios_c_test adios_c_test_2
$(mpiexec) ./adios_c_test_2

adios_c_test: main.o
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o adios_c_test main.o $(shell adios2-config --c-libs)
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o adios_c_test main.o $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) --c-libs)

main.o: $(main_c)
$(CC) $(CFLAGS) $(ISYSROOT) -o main.o -c $(main_c) $(shell adios2-config --c-flags)
$(CC) $(CFLAGS) $(ISYSROOT) -o main.o -c $(main_c) $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) --c-flags)

adios_c_test_2: $(main_c)
$(CXX) $(LDFLAGS) $(CXXFLAGS) $(ISYSROOT) -o adios_c_test_2 $(main_c) $(shell adios2-config -c)
$(CXX) $(LDFLAGS) $(CXXFLAGS) $(ISYSROOT) -o adios_c_test_2 $(main_c) $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -c)


test_serial: adios_c_serial_test adios_c_serial_test_2
./adios_c_serial_test
./adios_c_serial_test_2

adios_c_serial_test: main_nompi.o
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o adios_c_serial_test main_nompi.o $(shell adios2-config --serial --c-libs)
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o adios_c_serial_test main_nompi.o $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) --serial --c-libs)

main_nompi.o: main_nompi.c
$(CC) $(CFLAGS) $(ISYSROOT) -o main_nompi.o -c main_nompi.c $(shell adios2-config -s --c-flags)
$(CC) $(CFLAGS) $(ISYSROOT) -o main_nompi.o -c main_nompi.c $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -s --c-flags)

adios_c_serial_test_2: main_nompi.o
$(CXX) $(LDFLAGS) $(CXXFLAGS) $(ISYSROOT) -o adios_c_serial_test_2 main_nompi.c $(shell adios2-config -s -c)
$(CXX) $(LDFLAGS) $(CXXFLAGS) $(ISYSROOT) -o adios_c_serial_test_2 main_nompi.c $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -s -c)


test_mpi: adios_c_mpi_test adios_c_mpi_test_2
$(MPIEXEC) ./adios_c_mpi_test
$(MPIEXEC) ./adios_c_mpi_test_2

adios_c_mpi_test: main_mpi.o
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o adios_c_mpi_test main_mpi.o $(shell adios2-config --mpi --c-libs)
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o adios_c_mpi_test main_mpi.o $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) --mpi --c-libs)

main_mpi.o: main_mpi.c
$(CC) $(CFLAGS) $(ISYSROOT) -o main_mpi.o -c main_mpi.c $(shell adios2-config -m --c-flags)
$(CC) $(CFLAGS) $(ISYSROOT) -o main_mpi.o -c main_mpi.c $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -m --c-flags)

adios_c_mpi_test_2: main_mpi.o
$(CXX) $(LDFLAGS) $(CXXFLAGS) $(ISYSROOT) -o adios_c_mpi_test_2 main_mpi.c $(shell adios2-config -m -c)
$(CXX) $(LDFLAGS) $(CXXFLAGS) $(ISYSROOT) -o adios_c_mpi_test_2 main_mpi.c $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -m -c)
1 change: 1 addition & 0 deletions testing/install/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function(add_install_make_test name)
"-DADIOS2_SOURCE_DIR=${CMAKE_SOURCE_DIR}"
"-DADIOS2_BINARY_DIR=${CMAKE_BINARY_DIR}"
"-DADIOS2_HAVE_MPI=${ADIOS2_HAVE_MPI}"
"-DADIOS2_EXECUTABLE_SUFFIX=${ADIOS2_EXECUTABLE_SUFFIX}"
"-DMAKE_COMMAND=${MAKE_COMMAND}"
"-DCMAKE_C_COMPILER=${cc}"
"-DCMAKE_CXX_COMPILER=${cxx}"
Expand Down
18 changes: 9 additions & 9 deletions testing/install/CXX11/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,38 @@ test: adios_cxx11_test adios_cxx11_test_2
$(mpiexec) ./adios_cxx11_test_2

adios_cxx11_test: main.o
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o adios_cxx11_test main.o $(shell adios2-config --cxx-libs)
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o adios_cxx11_test main.o $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) --cxx-libs)

main.o: $(main_cxx)
$(CXX) $(CXXFLAGS) $(ISYSROOT) -o main.o -c $(main_cxx) $(shell adios2-config --cxx-flags)
$(CXX) $(CXXFLAGS) $(ISYSROOT) -o main.o -c $(main_cxx) $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) --cxx-flags)

adios_cxx11_test_2: $(main_cxx)
$(CXX) $(LDFLAGS) $(CXXFLAGS) $(ISYSROOT) -o adios_cxx11_test_2 $(main_cxx) $(shell adios2-config -x)
$(CXX) $(LDFLAGS) $(CXXFLAGS) $(ISYSROOT) -o adios_cxx11_test_2 $(main_cxx) $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -x)


test_serial: adios_cxx11_serial_test adios_cxx11_serial_test_2
./adios_cxx11_serial_test
./adios_cxx11_serial_test_2

adios_cxx11_serial_test: main_nompi.o
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o adios_cxx11_serial_test main_nompi.o $(shell adios2-config --serial --cxx-libs)
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o adios_cxx11_serial_test main_nompi.o $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) --serial --cxx-libs)

main_nompi.o: main_nompi.cxx
$(CXX) $(CXXFLAGS) $(ISYSROOT) -o main_nompi.o -c main_nompi.cxx $(shell adios2-config -s --cxx-flags)
$(CXX) $(CXXFLAGS) $(ISYSROOT) -o main_nompi.o -c main_nompi.cxx $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -s --cxx-flags)

adios_cxx11_serial_test_2: main_nompi.o
$(CXX) $(LDFLAGS) $(CXXFLAGS) $(ISYSROOT) -o adios_cxx11_serial_test_2 main_nompi.cxx $(shell adios2-config -s -x)
$(CXX) $(LDFLAGS) $(CXXFLAGS) $(ISYSROOT) -o adios_cxx11_serial_test_2 main_nompi.cxx $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -s -x)


test_mpi: adios_cxx11_mpi_test adios_cxx11_mpi_test_2
$(MPIEXEC) ./adios_cxx11_mpi_test
$(MPIEXEC) ./adios_cxx11_mpi_test_2

adios_cxx11_mpi_test: main_mpi.o
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o adios_cxx11_mpi_test main_mpi.o $(shell adios2-config --mpi --cxx-libs)
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o adios_cxx11_mpi_test main_mpi.o $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) --mpi --cxx-libs)

main_mpi.o: main_mpi.cxx
$(CXX) $(CXXFLAGS) $(ISYSROOT) -o main_mpi.o -c main_mpi.cxx $(shell adios2-config -m --cxx-flags)
$(CXX) $(CXXFLAGS) $(ISYSROOT) -o main_mpi.o -c main_mpi.cxx $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -m --cxx-flags)

adios_cxx11_mpi_test_2: main_mpi.o
$(CXX) $(LDFLAGS) $(CXXFLAGS) $(ISYSROOT) -o adios_cxx11_mpi_test_2 main_mpi.cxx $(shell adios2-config -m -x)
$(CXX) $(LDFLAGS) $(CXXFLAGS) $(ISYSROOT) -o adios_cxx11_mpi_test_2 main_mpi.cxx $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -m -x)
18 changes: 9 additions & 9 deletions testing/install/Fortran/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,38 @@ test: adios_fortran_test adios_fortran_test_2
$(mpiexec) ./adios_fortran_test_2

adios_fortran_test: main.o
$(FC) $(FFLAGS) -o adios_fortran_test main.o $(shell adios2-config --fortran-libs)
$(FC) $(FFLAGS) -o adios_fortran_test main.o $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) --fortran-libs)

main.o: $(main_f90)
$(FC) $(FFLAGS) -o main.o -c $(main_f90) $(shell adios2-config --fortran-flags)
$(FC) $(FFLAGS) -o main.o -c $(main_f90) $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) --fortran-flags)

adios_fortran_test_2: $(main_f90)
$(FC) $(FFLAGS) -o adios_fortran_test_2 $(main_f90) $(shell adios2-config -f)
$(FC) $(FFLAGS) -o adios_fortran_test_2 $(main_f90) $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -f)


test_serial: adios_fortran_serial_test adios_fortran_serial_test_2
./adios_fortran_serial_test
./adios_fortran_serial_test_2

adios_fortran_serial_test: main_nompi.o
$(FC) $(FFLAGS) -o adios_fortran_serial_test main_nompi.o $(shell adios2-config --serial --fortran-libs)
$(FC) $(FFLAGS) -o adios_fortran_serial_test main_nompi.o $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) --serial --fortran-libs)

main_nompi.o: main_nompi.f90
$(FC) $(FFLAGS) -o main_nompi.o -c main_nompi.f90 $(shell adios2-config -s --fortran-flags)
$(FC) $(FFLAGS) -o main_nompi.o -c main_nompi.f90 $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -s --fortran-flags)

adios_fortran_serial_test_2: main_nompi.o
$(FC) $(FFLAGS) -o adios_fortran_serial_test_2 main_nompi.f90 $(shell adios2-config -s -f)
$(FC) $(FFLAGS) -o adios_fortran_serial_test_2 main_nompi.f90 $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -s -f)


test_mpi: adios_fortran_mpi_test adios_fortran_mpi_test_2
$(MPIEXEC) ./adios_fortran_mpi_test
$(MPIEXEC) ./adios_fortran_mpi_test_2

adios_fortran_mpi_test: main_mpi.o
$(FC) $(FFLAGS) -o adios_fortran_mpi_test main_mpi.o $(shell adios2-config --mpi --fortran-libs)
$(FC) $(FFLAGS) -o adios_fortran_mpi_test main_mpi.o $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) --mpi --fortran-libs)

main_mpi.o: main_mpi.f90
$(FC) $(FFLAGS) -o main_mpi.o -c main_mpi.f90 $(shell adios2-config -m --fortran-flags)
$(FC) $(FFLAGS) -o main_mpi.o -c main_mpi.f90 $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -m --fortran-flags)

adios_fortran_mpi_test_2: main_mpi.o
$(FC) $(FFLAGS) -o adios_fortran_mpi_test_2 main_mpi.f90 $(shell adios2-config -m -f)
$(FC) $(FFLAGS) -o adios_fortran_mpi_test_2 main_mpi.f90 $(shell adios2-config$(ADIOS2_EXECUTABLE_SUFFIX) -m -f)
Loading

0 comments on commit 24efd7f

Please sign in to comment.