Skip to content

Commit

Permalink
Pass CMake options to tests and examples, update installation docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lindstro committed Sep 28, 2017
1 parent 7ebc49e commit c7eba05
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
8 changes: 7 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c7eba05

Please sign in to comment.