Added STDIO option to CMake-based build.

This commit is contained in:
Ward Fisher 2015-10-09 13:06:32 -06:00
parent aa2af5cd5a
commit ef586766e3
2 changed files with 11 additions and 1 deletions

View File

@ -695,6 +695,13 @@ ENDIF()
SET(MATH "")
IF(NOT WIN32)
# STDIO instead of posixio.
OPTION(ENABLE_STDIO "If true, use stdio instead of posixio (ex. on the Cray)" OFF)
IF(ENABLE_STDIO)
SET(USE_STDIO ON CACHE BOOL "")
ENDIF()
# FFIO insteaad of PosixIO
OPTION(ENABLE_FFIO "If true, use ffio instead of posixio" OFF)
IF(ENABLE_FFIO)

View File

@ -11,7 +11,8 @@ endforeach(f)
SET(libsrc_SOURCES v1hpg.c putget.c attr.c nc3dispatch.c
nc3internal.c var.c dim.c ncx.c lookup3.c ncio.c)
SET(libsrc_SOURCES ${libsrc_SOURCES} pstdint.h)
SET(libsrc_SOURCES ${libsrc_SOURCES} pstdint.h ncio.h ncx.h)
IF (BUILD_DISKLESS)
SET(libsrc_SOURCES ${libsrc_SOURCES} memio.c)
@ -23,6 +24,8 @@ ENDIF (BUILD_DISKLESS)
IF (USE_FFIO)
SET(libsrc_SOURCES ${libsrc_SOURCES} ffio.c)
ELSEIF (USE_STDIO)
SET(libsrc_SORUCES ${libsrc_SOURCES} ncstdio.c)
ELSE (USE_FFIO)
SET(libsrc_SOURCES ${libsrc_SOURCES} posixio.c)
ENDIF (USE_FFIO)