File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ include(sources.cmake)
3333# Options
3434#-----------------------------------------------------------------------------
3535option (WITH_LTM "Build with support for libtommath" TRUE )
36+ option (WITH_TFM "Build with support for tomsfastmath" FALSE )
3637option (WITH_GMP "Build with support for GNU Multi Precision Arithmetic Library" FALSE )
3738set (MPI_PROVIDER "LTM" CACHE STRING "Build tests and demos against 'LTM', 'TFM' or 'GMP', default is LTM" )
3839option (BUILD_SHARED_LIBS "Build shared library and only the shared library if \" ON\" , default is static" OFF )
@@ -138,6 +139,17 @@ if(WITH_LTM)
138139 target_link_libraries (${PROJECT_NAME} PUBLIC libtommath)
139140 list (APPEND MPI_PROVIDERS -ltommath)
140141endif ()
142+ # tomsfastmath
143+ if (WITH_TFM)
144+ find_package (tomsfastmath 0.13.1 REQUIRED)
145+
146+ target_compile_definitions (${PROJECT_NAME} PUBLIC TFM_DESC)
147+ if (MPI_PROVIDER MATCHES "TFM" )
148+ target_compile_definitions (${PROJECT_NAME} PUBLIC USE_TFM)
149+ endif ()
150+ target_link_libraries (${PROJECT_NAME} PUBLIC tomsfastmath)
151+ list (APPEND MPI_PROVIDERS -ltfm)
152+ endif ()
141153# GNU MP
142154if (WITH_GMP)
143155 pkg_check_modules(GMP REQUIRED gmp>=6.1.2)
You can’t perform that action at this time.
0 commit comments