diff options
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | include/tng_io.h | 6 | ||||
-rw-r--r-- | include/tng_io.hpp | 2 | ||||
-rw-r--r-- | include/tng_io_fwd.h | 2 | ||||
-rw-r--r-- | include/version.h.in | 7 | ||||
-rw-r--r-- | src/lib/tng_io.c | 5 | ||||
-rw-r--r-- | src/lib/tng_io_fortran.c | 2 | ||||
-rw-r--r-- | src/tests/tng_io_read_pos.c | 2 | ||||
-rw-r--r-- | src/tests/tng_io_read_pos_util.c | 2 | ||||
-rw-r--r-- | src/tests/tng_io_testing.c | 2 | ||||
-rw-r--r-- | src/tests/tng_parallel_read.c | 2 |
11 files changed, 15 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3116844..97f056b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,12 @@ cmake_minimum_required(VERSION 2.8) project(TNG_IO) +set(PROJECT_VERSION "1.5") +set(API_VERSION "5") + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/version.h.in + ${CMAKE_BINARY_DIR}/include/version.h ) +include_directories(${CMAKE_BINARY_DIR}/include) if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall") diff --git a/include/tng_io.h b/include/tng_io.h index 45cb1d8..ebdc618 100644 --- a/include/tng_io.h +++ b/include/tng_io.h @@ -1,7 +1,5 @@ /* This code is part of the tng binary trajectory format. * - * VERSION 1.5 - * * Written by Magnus Lundborg * Copyright (c) 2012-2013, The GROMACS development team. * Check out http://www.gromacs.org for more information. @@ -343,10 +341,6 @@ typedef unsigned __int64 uint64_t; #endif /* USE_WINDOWS */ #endif /* DECLSPECDLLEXPORT */ - -/** The version of this TNG build */ -#define TNG_VERSION 5 /* TNG_VERSION 4 => Api version 1.5 */ - /** Flag to indicate frame dependent data. */ #define TNG_FRAME_DEPENDENT 1 /** Flag to indicate particle dependent data. */ diff --git a/include/tng_io.hpp b/include/tng_io.hpp index f3bc32a..12172e5 100644 --- a/include/tng_io.hpp +++ b/include/tng_io.hpp @@ -1,7 +1,5 @@ /* This code is part of the tng binary trajectory format. * - * VERSION 1.5 - * * Written by Anders Gärdenäs * Copyright (c) 2012-2013, The GROMACS development team. * Check out http://www.gromacs.org for more information. diff --git a/include/tng_io_fwd.h b/include/tng_io_fwd.h index 34ddd87..8b63a9a 100644 --- a/include/tng_io_fwd.h +++ b/include/tng_io_fwd.h @@ -1,7 +1,5 @@ /* This code is part of the tng binary trajectory format. * - * VERSION 1.5 - * * Written by Magnus Lundborg * Copyright (c) 2012-2013, The GROMACS development team. * Check out http://www.gromacs.org for more information. diff --git a/include/version.h.in b/include/version.h.in new file mode 100644 index 0000000..840e454 --- /dev/null +++ b/include/version.h.in @@ -0,0 +1,7 @@ +#ifndef VERSION_CONFIG_H +#define VERSION_CONFIG_H + +/* define the API version */ +#define TNG_API_VERSION @API_VERSION@ + +#endif diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index c906f10..83ea162 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -1,7 +1,5 @@ /* This code is part of the tng binary trajectory format. * - * VERSION 1.5 - * * Written by Magnus Lundborg * Copyright (c) 2012-2013, The GROMACS development team. * Check out http://www.gromacs.org for more information. @@ -27,6 +25,7 @@ #include "../../include/tng_io.h" #include "../../include/md5.h" #include "../../include/compression/tng_compress.h" +#include "../include/version.h" struct tng_bond { @@ -744,7 +743,7 @@ static tng_function_status tng_block_init(struct tng_gen_block **block_p) /* Reset the md5_hash */ memcpy(block->md5_hash, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", TNG_MD5_HASH_LEN); block->name = 0; - block->block_version = TNG_VERSION; + block->block_version = TNG_API_VERSION; block->header_contents = 0; block->header_contents_size = 0; block->block_contents = 0; diff --git a/src/lib/tng_io_fortran.c b/src/lib/tng_io_fortran.c index baceef7..d53d15b 100644 --- a/src/lib/tng_io_fortran.c +++ b/src/lib/tng_io_fortran.c @@ -1,7 +1,5 @@ /* This code is part of the tng binary trajectory format. * - * VERSION 1.5 - * * Written by Magnus Lundborg * Copyright (c) 2012-2013, The GROMACS development team. * Check out http://www.gromacs.org for more information. diff --git a/src/tests/tng_io_read_pos.c b/src/tests/tng_io_read_pos.c index 079cad7..2a0bb09 100644 --- a/src/tests/tng_io_read_pos.c +++ b/src/tests/tng_io_read_pos.c @@ -1,7 +1,5 @@ /* This code is part of the tng binary trajectory format. * - * VERSION 1.0 - * * Written by Magnus Lundborg * Copyright (c) 2012-2013, The GROMACS development team. * check out http://www.gromacs.org for more information. diff --git a/src/tests/tng_io_read_pos_util.c b/src/tests/tng_io_read_pos_util.c index 64df9df..1667bae 100644 --- a/src/tests/tng_io_read_pos_util.c +++ b/src/tests/tng_io_read_pos_util.c @@ -2,8 +2,6 @@ * * The high-level API of the TNG API is used where appropriate. * - * VERSION 1.0 - * * Written by Magnus Lundborg * Copyright (c) 2012-2013, The GROMACS development team. * Check out http://www.gromacs.org for more information. diff --git a/src/tests/tng_io_testing.c b/src/tests/tng_io_testing.c index 973ac4f..17718d0 100644 --- a/src/tests/tng_io_testing.c +++ b/src/tests/tng_io_testing.c @@ -1,7 +1,5 @@ /* This code is part of the tng binary trajectory format. * - * VERSION 1.0 - * * Written by Magnus Lundborg * Copyright (c) 2012-2013, The GROMACS development team. * Check out http://www.gromacs.org for more information. diff --git a/src/tests/tng_parallel_read.c b/src/tests/tng_parallel_read.c index 95d1c9a..e2e23c6 100644 --- a/src/tests/tng_parallel_read.c +++ b/src/tests/tng_parallel_read.c @@ -2,8 +2,6 @@ /* This code is part of the tng binary trajectory format. * - * VERSION 1.0 - * * Written by Magnus Lundborg * Copyright (c) 2012-2013, The GROMACS development team. * Check out http://www.gromacs.org for more information. |