diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 9e66f412f..3e8969eb9 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -102,7 +102,8 @@ builds, use the :code:`-D` option on the cmake line as in the example above. 64-bit signed and unsigned integer types and their literal suffixes. Platforms on which :code:`long int` is 32 bits wide may require :code:`long long int` as type and :code:`ll` as suffix. These macros - are primarily relevant when compiling in C89 mode. + are relevant **only** when compiling in C89 mode. When compiling in + C99 mode, integer types are taken from :file:`stdint.h`. Defaults: :code:`long int`, :code:`l`, :code:`unsigned long int`, and :code:`ul`, respectively. diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index b09fa2f4e..f4c300c14 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,17 +1,23 @@ add_executable(diffusion diffusion.cpp) target_link_libraries(diffusion zfp) +target_compile_definitions(diffusion PRIVATE ${zfp_defs}) add_executable(inplace inplace.c) target_link_libraries(inplace zfp) +target_compile_definitions(inplace PRIVATE ${zfp_defs}) -add_executable(iterator iterator.c) +add_executable(iterator iterator.cpp) target_link_libraries(iterator zfp) +target_compile_definitions(iterator PRIVATE ${zfp_defs}) add_executable(pgm pgm.c) target_link_libraries(pgm zfp) +target_compile_definitions(pgm PRIVATE ${zfp_defs}) add_executable(simple simple.c) target_link_libraries(simple zfp) +target_compile_definitions(simple PRIVATE ${zfp_defs}) add_executable(speed speed.c) target_link_libraries(speed zfp) +target_compile_definitions(speed PRIVATE ${zfp_defs}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 67e8628d5..e23452f94 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,6 +37,7 @@ add_subdirectory(src) add_executable(testzfp testzfp.cpp fields.c) target_link_libraries(testzfp zfp) +target_compile_definitions(testzfp PRIVATE ${zfp_defs}) option(ZFP_BUILD_TESTING_SMALL "Enable small-sized array testing" ON) if(ZFP_BUILD_TESTING_SMALL)