mirror of https://github.com/microsoft/vcpkg.git
136 lines
6.0 KiB
Diff
136 lines
6.0 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index b424686..cd7fb81 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -72,6 +72,12 @@ if (NOT DEFINED LAPACK_LIBRARIES)
|
|
endif ()
|
|
list (APPEND OPENTURNS_PRIVATE_LIBRARIES ${LAPACK_LIBRARIES})
|
|
|
|
+find_package(kissfft CONFIG REQUIRED)
|
|
+list(APPEND OPENTURNS_PRIVATE_LIBRARIES kissfft::kissfft-double)
|
|
+
|
|
+find_path(RAPIDCSV_INCLUDE_DIRS "rapidcsv.h" REQUIRED)
|
|
+list(APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${RAPIDCSV_INCLUDE_DIRS})
|
|
+
|
|
if (USE_SPECTRA)
|
|
find_package (Spectra 1.0 CONFIG)
|
|
endif ()
|
|
@@ -147,6 +153,8 @@ if (muparser_FOUND)
|
|
endif ()
|
|
|
|
if (USE_EXPRTK)
|
|
+ find_path(EXPRTK_INCLUDE_DIRS "exprtk.hpp" REQUIRED)
|
|
+ list(APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${EXPRTK_INCLUDE_DIRS})
|
|
set (OPENTURNS_HAVE_EXPRTK TRUE)
|
|
set (OPENTURNS_HAVE_ANALYTICAL_PARSER TRUE)
|
|
set (SYMBOLICPARSER_DEFAULT_BACKEND ExprTk)
|
|
@@ -211,7 +219,9 @@ if (USE_BOOST)
|
|
endif ()
|
|
endif ()
|
|
if (USE_MPFR)
|
|
- find_package (MPFR)
|
|
+ find_package(PkgConfig REQUIRED)
|
|
+ pkg_check_modules(MPFR mpfr REQUIRED)
|
|
+ set(MPFR_LIBRARIES "${MPFR_LINK_LIBRARIES}")
|
|
if (MPFR_FOUND)
|
|
set (OPENTURNS_HAVE_MPFR TRUE)
|
|
list (APPEND OPENTURNS_PRIVATE_INCLUDE_DIRS ${MPFR_INCLUDE_DIRS})
|
|
@@ -260,8 +270,8 @@ if (USE_CERES)
|
|
set (Ceres_FOUND FALSE)
|
|
endif ()
|
|
if (Ceres_FOUND AND "SuiteSparse" IN_LIST CERES_COMPILED_COMPONENTS)
|
|
- message (STATUS "Ceres was built with SuiteSparse GPL components, disabling.")
|
|
- set (Ceres_FOUND FALSE)
|
|
+ # https://github.com/openturns/openturns/issues/3170
|
|
+ message (WARNING "Ceres was built with SuiteSparse GPL components.")
|
|
endif ()
|
|
if (Ceres_FOUND)
|
|
set (OPENTURNS_HAVE_CERES TRUE)
|
|
@@ -547,6 +557,36 @@ set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
|
|
|
set (OPENTURNS_SWIG_INCLUDE_DIRS ${INCLUDE_PATH}/openturns/swig)
|
|
|
|
+# Subdirs and OpenTURNSConfig.cmake.in rely on <Pkg>_FOUND variables.
|
|
+# Force strict control of *direct* dependencies via USE_<PKG>
|
|
+# *and* catch new USE_<PKG> variables during port updates.
|
|
+get_directory_property(vars_to_check CACHE_VARIABLES)
|
|
+list(FILTER vars_to_check INCLUDE REGEX "^USE_")
|
|
+list(REMOVE_ITEM vars_to_check
|
|
+ USE_EXPRTK # find_path
|
|
+ USE_EXTERNAL_LIBS # special
|
|
+ USE_MPFR # pkgconfig
|
|
+ USE_SPHINX # find_program
|
|
+ USE_OPENBLAS # disables OpenBLAS threading when TBB is active and LAPACK uses OpenBLAS
|
|
+)
|
|
+foreach(package IN ITEMS Bonmin Boost Ceres CMinpack Cuba dlib Eigen3 HDF5 highs HMAT Ipopt LibXml2
|
|
+ MPC muparser nanoflann NLopt OpenMP Pagmo primesieve Spectra TBB)
|
|
+ set(package_found_var "${package}_FOUND")
|
|
+ string(TOUPPER "USE_${package}" use_package_var)
|
|
+ string(REPLACE "USE_EIGEN3" "USE_SPECTRA" use_package_var "${use_package_var}")
|
|
+ if(NOT "${${use_package_var}}")
|
|
+ set("${package_found_var}" FALSE) # no accidental use
|
|
+ elseif(NOT DEFINED "${package_found_var}")
|
|
+ message(SEND_ERROR "${use_package_var} was set to ${${use_package_var}}, but ${package_found_var} is not set.")
|
|
+ elseif(NOT "${${package_found_var}}")
|
|
+ message(SEND_ERROR "${use_package_var} was set to ${${use_package_var}}, but ${package} was not found.")
|
|
+ endif()
|
|
+ list(REMOVE_ITEM vars_to_check "${use_package_var}")
|
|
+endforeach()
|
|
+if(vars_to_check)
|
|
+ message(SEND_ERROR "New input variables must be integrated into the check: ${vars_to_check}")
|
|
+endif()
|
|
+
|
|
add_subdirectory (lib)
|
|
|
|
if (Python_FOUND AND SWIG_FOUND)
|
|
diff --git a/LICENSE b/LICENSE
|
|
index 2bd2cde..3148f78 100644
|
|
--- a/LICENSE
|
|
+++ b/LICENSE
|
|
@@ -4,11 +4,8 @@ This library bundles several third-party codes with various licenses compatible
|
|
- COBYLA optimization solver (lib/src/Base/Optim/algocobyla.*) under Expat license, see COPYING.cobyla
|
|
- Mersenne twister RNG (lib/src/Base/Stat/dsfmt.*) under BSD license, see COPYING.dsfmt
|
|
- Ev3 symbolic library (lib/src/Base/Diff/Ev3/*) under LGPL license, see COPYING.ev3
|
|
-- ExprTk symbolic parser (lib/src/Base/Func/openturns/exprtk.hpp) under Expat license, see COPYING.exprtk
|
|
- Faddeeva function (lib/src/Base/Func/SpecFunc/Faddeeva.*) under Expat license, see COPYING.faddeeva
|
|
- Kendall Tau (lib/src/Base/Stat/kendall.c) under BSL license, see COPYING.kendall
|
|
-- KissFFT (lib/src/Base/Algo/kissfft.hh), under BSD license, see COPYING.kissfft
|
|
- KS distribution from Cephes library (lib/src/Uncertainty/Distribution/cephes/*) under BSD license, see COPYING.cephes
|
|
- TNC optimization solver (lib/src/Base/Optim/algotnc.*) under Expat license, see COPYING.tnc
|
|
- Gauss Legendre quadrature from FastGL library (lib/src/Base/Algo/fastgl*) under BSD license, see COPYING.fastGL
|
|
-- Rapidcsv parser library (lib/src/Base/Stat/rapidcsv.h) under BSD license, see COPYING.rapidcsv
|
|
diff --git a/lib/OpenTURNSConfig.cmake.in b/lib/OpenTURNSConfig.cmake.in
|
|
index bce893e..a74da31 100644
|
|
--- a/lib/OpenTURNSConfig.cmake.in
|
|
+++ b/lib/OpenTURNSConfig.cmake.in
|
|
@@ -44,7 +44,7 @@ set_and_check (OPENTURNS_INCLUDE_DIR "@PACKAGE_OPENTURNS_INCLUDE_DIR@")
|
|
set (OPENTURNS_INCLUDE_DIRS "@PACKAGE_OPENTURNS_INCLUDE_DIRS@")
|
|
set (OPENTURNS_LIBRARY "@OPENTURNS_LIBRARY@")
|
|
set (OPENTURNS_LIBRARIES "@OPENTURNS_LIBRARIES@")
|
|
-set (OPENTURNS_LIBRARY_DIRS "@PACKAGE_OPENTURNS_LIBRARY_DIRS@")
|
|
+set (OPENTURNS_LIBRARY_DIRS "")
|
|
set_and_check (OPENTURNS_ROOT_DIR "@PACKAGE_OPENTURNS_ROOT_DIR@")
|
|
|
|
set (OPENTURNS_VERSION_STRING "@OPENTURNS_VERSION_STRING@")
|
|
@@ -59,6 +59,7 @@ set (OPENTURNS_PYTHON_MODULE_PATH "@PACKAGE_PYTHON_MODULE_PATH@")
|
|
# static libraries dependencies are transitive so imported targets must be defined
|
|
if (NOT @BUILD_SHARED_LIBS@)
|
|
include (CMakeFindDependencyMacro)
|
|
+ find_dependency(kissfft CONFIG)
|
|
|
|
if ("@Boost_FOUND@")
|
|
find_dependency (Boost CONFIG QUIET)
|
|
diff --git a/lib/src/Base/Func/SymbolicParserExprTk.cxx b/lib/src/Base/Func/SymbolicParserExprTk.cxx
|
|
index bb8b95d..19427f6 100644
|
|
--- a/lib/src/Base/Func/SymbolicParserExprTk.cxx
|
|
+++ b/lib/src/Base/Func/SymbolicParserExprTk.cxx
|
|
@@ -27,7 +27,7 @@
|
|
|
|
#include "openturns/OTwindows.h" // exprtk includes windows.h
|
|
#define exprtk_disable_caseinsensitivity
|
|
-#include "openturns/exprtk.hpp"
|
|
+#include <exprtk.hpp>
|
|
|
|
BEGIN_NAMESPACE_OPENTURNS
|
|
|