netcdf-c/ncgen/CMakeLists.txt

27 lines
1.1 KiB
CMake
Raw Normal View History

2012-08-04 06:24:29 +08:00
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
INCLUDE_DIRECTORIES(".")
SET(ncgen_FILES generate.c main.c cdata.c bindata.c genchar.c cvt.c data.c debug.c escapes.c genc.c genbin.c generr.c genlib.c getfill.c odom.c offsets.c semantics.c ncgentab.c dump.c util.c bytebuffer.c list.c genf77.c f77data.c genj.c jdata.c nciter.c ConvertUTF.c )
ADD_EXECUTABLE(ncgen ${ncgen_FILES})
2012-08-21 06:49:53 +08:00
#MESSAGE(STATUS "ALL_TLL_LIBS (ncgen): ${ALL_TLL_LIBS}")
2012-08-11 05:44:00 +08:00
TARGET_LINK_LIBRARIES(ncgen netcdf ${ALL_TLL_LIBS})
2012-08-04 06:24:29 +08:00
INSTALL(TARGETS ncgen DESTINATION bin)
# Stuff to build if tests are enabled.
2012-08-08 06:42:42 +08:00
IF(ENABLE_TESTS)
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
ADD_TEST(run_ncgen_tests sh ${CMAKE_CURRENT_BINARY_DIR}/run_tests.sh)
2012-08-08 06:42:42 +08:00
IF(USE_NETCDF4)
ADD_TEST(run_ncgen_nc4_tests sh ${CMAKE_CURRENT_BINARY_DIR}/run_nc4_tests.sh)
2012-08-08 06:42:42 +08:00
ENDIF()
ENDIF()
2012-08-04 06:24:29 +08:00
2012-08-28 05:49:09 +08:00
SET(CLEANFILES c0.nc c0_64.nc c0_4.nc c0_4c.nc ref_camrun.c)
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CLEANFILES}")