set(SUITEDIR suite)
if(BUILD_WRITE)
  if(BUILD_FORTRAN)
    add_subdirectory(test_src)
    add_subdirectory(C)
    add_subdirectory(Fortran)
    add_subdirectory(genarray)
    add_subdirectory(bp_read)
    add_subdirectory(${SUITEDIR})
  else(BUILD_FORTRAN)
    add_subdirectory(test_src)
    add_subdirectory(C)
    add_subdirectory(bp_read)
    add_subdirectory(${SUITEDIR})
  endif(BUILD_FORTRAN)
endif(BUILD_WRITE)

#find_library(ADIOS_LIB adios ${PROJECT_BINARY_DIR}/src)
#if(${ADIOS_LIB}-NOTFOUND)
 # message(STATUS "cannot find adios.a in ${PROJECT_BINARY_DIR}/tests makefile")
#endif(${ADIOS_LIB}-NOTFOUND)

#if(BUILD_FORTRAN)
#  find_library(ADIOSREAD_LIB NAMES adiosreadf PATHS ${PROJECT_BINARY_DIR}/src)
#  find_library(ADIOSREAD_V1_LIB NAMES adiosreadf_v1 PATHS ${PROJECT_BINARY_DIR}/src)
#else(BUILD_FORTRAN)
#  find_library(ADIOSREAD_LIB adiosread ${PROJECT_BINARY_DIR}/src)
#  if(${ADIOSREAD_LIB}-NOTFOUND)
#    message(STATUS "cannot find adiosread.a in ${PROJECT_BINARY_DIR}/tests makefile")
#  endif(${ADIOSREAD_LIB}-NOTFOUND)
#endif(BUILD_FORTRAN)
