Поиск библиотек для расчётов с высокой точностью
This commit is contained in:
parent
ee00e43d25
commit
eabd2c4b31
@ -1,7 +1,7 @@
|
|||||||
# Подключение внешних проектов
|
# Подключение внешних проектов
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
|
|
||||||
if(MPFR_FOUND)
|
if(MPFR_FOUND AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/thirdparty/mpreal)
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
mpfrcpp
|
mpfrcpp
|
||||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/mpreal
|
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/mpreal
|
||||||
@ -9,7 +9,8 @@ if(MPFR_FOUND)
|
|||||||
CONFIGURE_COMMAND true
|
CONFIGURE_COMMAND true
|
||||||
BUILD_COMMAND true
|
BUILD_COMMAND true
|
||||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/mpreal.h <INSTALL_DIR>)
|
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/mpreal.h <INSTALL_DIR>)
|
||||||
|
|
||||||
|
set(MPFRCPP_PREFIX ${CMAKE_BINARY_DIR} CACHE FILEPATH "" FORCE)
|
||||||
|
set(MPFRCPP_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(MPFRCPP_PREFIX ${CMAKE_BINARY_DIR} CACHE FILEPATH "" FORCE)
|
|
||||||
set(MPFRCPP_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "" FORCE)
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
find_package(Quadmath)
|
function myx_cmake_enable_high_precision_math()
|
||||||
if(QUADMATH_FOUND)
|
find_package(Quadmath)
|
||||||
add_definitions(-DHAVE_QUADMATH=1)
|
if(QUADMATH_FOUND)
|
||||||
else()
|
add_definitions(-DHAVE_QUADMATH=1)
|
||||||
find_package(MPFR)
|
|
||||||
if(MPFR_FOUND)
|
|
||||||
find_package(MPFRCppThirdparty)
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Nor Quadmath, nor MPFR found.")
|
find_package(MPFR)
|
||||||
|
if(MPFR_FOUND)
|
||||||
|
find_package(MPFRCppThirdparty)
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Nor Quadmath, nor MPFR found.")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endfunction()
|
||||||
|
Loading…
Reference in New Issue
Block a user