diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-03-19 16:23:32 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-03-19 16:23:32 (GMT) |
commit | b97f4dff0e286abe9dfe6e9c14e988274541e974 (patch) | |
tree | f9f61465b68ecf2151c633ce8543db163aa58798 /src/tests | |
parent | 30c94e0da4ffc0c7017c981b7305d855feea5441 (diff) |
If inttypes is not found (Visual Studio) some typedefs and defines need to be done
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/tests/tng_io_testing.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 8ec785b..4a63c54 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -13,6 +13,10 @@ include_directories(${CMAKE_BINARY_DIR}/generated/) add_executable(tng_testing tng_io_testing.c) target_link_libraries(tng_testing tng_io) +if(HAVE_INTTYPES_H) + set_target_properties(tng_testing PROPERTIES COMPILE_DEFINITIONS USE_STD_INTTYPES_H=1) +endif() + if(OPENMP_FOUND) add_executable(md_openmp md_openmp.c) target_link_libraries(md_openmp tng_io ${OpenMP_LIBS} m) diff --git a/src/tests/tng_io_testing.c b/src/tests/tng_io_testing.c index a8782f2..133a1fb 100644 --- a/src/tests/tng_io_testing.c +++ b/src/tests/tng_io_testing.c @@ -13,7 +13,10 @@ * of the License, or (at your option) any later version. */ +#ifdef USE_STD_INTTYPES_H #include <inttypes.h> +#endif + #include <stdlib.h> #include <string.h> #include <tng_io.h> |