Skip to content
Snippets Groups Projects
Commit 0f43bded authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Programatically generate ADIOSConfig.h contents

Use a 2-pass approach to generate ADIOS2.config.  The first pass
generates the configurable options in the header and the second pass
configures them.  This allows for consistency in the options used and
thier ordering with respect to where they're used elsewhere.
parent 75193030
No related branches found
No related tags found
1 merge request!280Fix zmq cmake config
......@@ -40,8 +40,13 @@ function(python_add_test)
endfunction()
function(GenerateADIOSHeaderConfig)
set(ADIOS2_CONFIG_DEFINES)
foreach(OPT IN LISTS ARGN)
string(TOUPPER ${OPT} OPT_UPPER)
string(APPEND ADIOS2_CONFIG_DEFINES "
/* CMake Option: ADIOS_USE_${OPT}=OFF */
#cmakedefine ADIOS2_HAVE_${OPT_UPPER}
")
if(ADIOS2_HAVE_${OPT})
set(ADIOS2_HAVE_${OPT_UPPER} 1)
else()
......@@ -51,6 +56,10 @@ function(GenerateADIOSHeaderConfig)
configure_file(
${ADIOS2_SOURCE_DIR}/source/adios2/ADIOSConfig.h.in
${ADIOS2_BINARY_DIR}/source/adios2/ADIOSConfig.h.in
)
configure_file(
${ADIOS2_BINARY_DIR}/source/adios2/ADIOSConfig.h.in
${ADIOS2_BINARY_DIR}/source/adios2/ADIOSConfig.h
)
endfunction()
......
......@@ -24,33 +24,8 @@
* Id: @CMAKE_Fortran_COMPILER_ID@ @CMAKE_CXX_COMPILER_VERSION@
*/
/* CMake Option: ADIOS_USE_MPI=OFF */
#cmakedefine ADIOS2_HAVE_MPI
/* Everything past this line is programatically generated */
/* CMake Option: ADIOS_USE_ZFP=ON */
#cmakedefine ADIOS2_HAVE_ZFP
/* CMake Option: ADIOS_USE_BZip2=ON */
#cmakedefine ADIOS2_HAVE_BZIP2
/* CMake Option: ADIOS_USE_ADIOS1=ON */
#cmakedefine ADIOS2_HAVE_ADIOS1
/* CMake Option: ADIOS_USE_HDF5=ON */
#cmakedefine ADIOS2_HAVE_HDF5
/* CMake Option: ADIOS_USE_ZeroMQ=ON */
#cmakedefine ADIOS2_HAVE_ZEROMQ
/* CMake Option: ADIOS_USE_SysVShMem=ON */
#cmakedefine ADIOS2_HAVE_SYSVSHMEM
/* Optional Language Bindings: */
/* CMake Option: ADIOS_USE_Python=ON */
#cmakedefine ADIOS2_HAVE_PYTHON
/* CMake Option: ADIOS_USE_Fortran=ON */
#cmakedefine ADIOS2_HAVE_FORTRAN
@ADIOS2_CONFIG_DEFINES@
#endif /* ADIOSCONFIG_H_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment