diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-03-21 09:26:47 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-03-21 09:26:47 (GMT) |
commit | 2d9ab8101ca2d287b7b033fc4c3057f56d9c5068 (patch) | |
tree | 4d162f6d4d58f961913dc09220921461911c02df /src | |
parent | 61b8806cf3a1164ae145d42cc48ca7c432e2ab53 (diff) |
Only compile Fortran compatibility if requested. Fix error in commit b97f4dff
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/lib/tng_io.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index 18cf32f..3cd090b 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -1,10 +1,14 @@ add_library(tng_io SHARED tng_io.c md5.c) if(HAVE_INTTYPES_H) - set_target_properties(tng_io PROPERTIES COMPILE_DEFINITIONS USE_STD_INTTYPES_H=1) + set_property(TARGET tng_io APPEND PROPERTY COMPILE_DEFINITIONS USE_STD_INTTYPES_H) +endif() + +if(BUILD_FORTRAN) + set_property(TARGET tng_io APPEND PROPERTY COMPILE_DEFINITIONS BUILD_FORTRAN) endif() if(ZLIB_FOUND) - set_target_properties(tng_io PROPERTIES COMPILE_DEFINITIONS USE_ZLIB=1) + set_property(TARGET tng_io APPEND PROPERTY COMPILE_DEFINITIONS USE_ZLIB) target_link_libraries(tng_io ${ZLIB_LIBRARIES}) endif() diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index fdb7809..d985b2d 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -11987,6 +11987,7 @@ tng_function_status tng_time_get_str(const tng_trajectory_t tng_data, } +#ifdef BUILD_FORTRAN /* The following is for calling the library from fortran */ tng_function_status tng_trajectory_init_(tng_trajectory_t *tng_data_p) @@ -12771,3 +12772,4 @@ tng_function_status tng_time_get_str_(const tng_trajectory_t tng_data, { return(tng_time_get_str(tng_data, time)); } +#endif |