[cppadcodegen] Add new port (#49148)

This commit is contained in:
shixiong2333 2026-01-07 17:27:57 +08:00 committed by GitHub
parent 5f035d2cc7
commit 193cc05a9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 101 additions and 0 deletions

View File

@ -0,0 +1,30 @@
Index: CMakeLists.txt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>GBK
===================================================================
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt (revision 656d23e3c06e0e3d573f02336eb457e1f30896f2)
+++ b/CMakeLists.txt (date 1766635625297)
@@ -167,16 +167,16 @@
# Currently building tests as normal executables
# ----------------------------------------------------------------------------
ADD_SUBDIRECTORY(include)
-ADD_SUBDIRECTORY(example EXCLUDE_FROM_ALL)
+#ADD_SUBDIRECTORY(example EXCLUDE_FROM_ALL)
#ADD_SUBDIRECTORY(introduction EXCLUDE_FROM_ALL)
-ADD_SUBDIRECTORY(speed EXCLUDE_FROM_ALL)
-ADD_SUBDIRECTORY(python)
+#ADD_SUBDIRECTORY(speed EXCLUDE_FROM_ALL)
+#ADD_SUBDIRECTORY(python)
ADD_SUBDIRECTORY(pkgconfig)
-ADD_SUBDIRECTORY(doc)
+#ADD_SUBDIRECTORY(doc)
# enable testing must be called here in order for the target test to be created
ENABLE_TESTING()
-ADD_SUBDIRECTORY(test EXCLUDE_FROM_ALL)
+#ADD_SUBDIRECTORY(test EXCLUDE_FROM_ALL)
# =============================================================================
# uninstall procedure

View File

@ -0,0 +1,22 @@
set(VCPKG_BUILD_TYPE release) # header-only port
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO joaoleal/CppADCodeGen
REF "v${VERSION}"
SHA512 e197b9a9cb5e091dceead33e3d82a77f8b2a80e5e37d99b23d67ded19f6a7fb0b5b99e4322b9cb053b98d0e730cdab547a73b3073d921109acf83d7aade2e3fa
HEAD_REF master
PATCHES
change_main_cmake.diff
undef_CONST.diff
)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_fixup_pkgconfig()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/epl-v10.txt" "${SOURCE_PATH}/gpl3.txt")

View File

@ -0,0 +1,18 @@
Index: include/cppad/cg/cppadcg.hpp
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>GBK
===================================================================
diff --git a/include/cppad/cg/cppadcg.hpp b/include/cppad/cg/cppadcg.hpp
--- a/include/cppad/cg/cppadcg.hpp (revision 656d23e3c06e0e3d573f02336eb457e1f30896f2)
+++ b/include/cppad/cg/cppadcg.hpp (date 1766646866207)
@@ -239,6 +239,9 @@
#include <cppad/cg/model/threadpool/pthread_pool_h.hpp>
#include <cppad/cg/model/threadpool/openmp_c.hpp>
#include <cppad/cg/model/threadpool/openmp_h.hpp>
+#ifdef CONST
+#undef CONST
+#endif
#include <cppad/cg/model/model_c_source_gen.hpp>
#include <cppad/cg/model/model_c_source_gen_impl.hpp>
#include <cppad/cg/model/model_library_c_source_gen.hpp>

View File

@ -0,0 +1,18 @@
{
"name": "cppadcodegen",
"version": "2.5.0",
"description": "Source code generation for automatic differentiation using operator overloading (extension of CppAD)",
"homepage": "https://github.com/joaoleal/CppADCodeGen",
"license": "EPL-1.0 OR GPL-3.0-only",
"dependencies": [
"cppad",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -2048,6 +2048,10 @@
"baseline": "20250000.3",
"port-version": 2
},
"cppadcodegen": {
"baseline": "2.5.0",
"port-version": 0
},
"cppcms": {
"baseline": "2.0.1",
"port-version": 0

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "770851c3e5af44f6fe36a0982f9550e991ac1583",
"version": "2.5.0",
"port-version": 0
}
]
}