Skip to content

Commit 193cc05

Browse files
authored
[cppadcodegen] Add new port (#49148)
1 parent 5f035d2 commit 193cc05

File tree

6 files changed

+101
-0
lines changed

6 files changed

+101
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Index: CMakeLists.txt
2+
IDEA additional info:
3+
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
4+
<+>GBK
5+
===================================================================
6+
diff --git a/CMakeLists.txt b/CMakeLists.txt
7+
--- a/CMakeLists.txt (revision 656d23e3c06e0e3d573f02336eb457e1f30896f2)
8+
+++ b/CMakeLists.txt (date 1766635625297)
9+
@@ -167,16 +167,16 @@
10+
# Currently building tests as normal executables
11+
# ----------------------------------------------------------------------------
12+
ADD_SUBDIRECTORY(include)
13+
-ADD_SUBDIRECTORY(example EXCLUDE_FROM_ALL)
14+
+#ADD_SUBDIRECTORY(example EXCLUDE_FROM_ALL)
15+
#ADD_SUBDIRECTORY(introduction EXCLUDE_FROM_ALL)
16+
-ADD_SUBDIRECTORY(speed EXCLUDE_FROM_ALL)
17+
-ADD_SUBDIRECTORY(python)
18+
+#ADD_SUBDIRECTORY(speed EXCLUDE_FROM_ALL)
19+
+#ADD_SUBDIRECTORY(python)
20+
ADD_SUBDIRECTORY(pkgconfig)
21+
-ADD_SUBDIRECTORY(doc)
22+
+#ADD_SUBDIRECTORY(doc)
23+
24+
# enable testing must be called here in order for the target test to be created
25+
ENABLE_TESTING()
26+
-ADD_SUBDIRECTORY(test EXCLUDE_FROM_ALL)
27+
+#ADD_SUBDIRECTORY(test EXCLUDE_FROM_ALL)
28+
29+
# =============================================================================
30+
# uninstall procedure

ports/cppadcodegen/portfile.cmake

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
set(VCPKG_BUILD_TYPE release) # header-only port
2+
3+
vcpkg_from_github(
4+
OUT_SOURCE_PATH SOURCE_PATH
5+
REPO joaoleal/CppADCodeGen
6+
REF "v${VERSION}"
7+
SHA512 e197b9a9cb5e091dceead33e3d82a77f8b2a80e5e37d99b23d67ded19f6a7fb0b5b99e4322b9cb053b98d0e730cdab547a73b3073d921109acf83d7aade2e3fa
8+
HEAD_REF master
9+
PATCHES
10+
change_main_cmake.diff
11+
undef_CONST.diff
12+
)
13+
14+
vcpkg_cmake_configure(
15+
SOURCE_PATH ${SOURCE_PATH}
16+
)
17+
18+
vcpkg_cmake_install()
19+
vcpkg_cmake_config_fixup()
20+
vcpkg_fixup_pkgconfig()
21+
22+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/epl-v10.txt" "${SOURCE_PATH}/gpl3.txt")
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Index: include/cppad/cg/cppadcg.hpp
2+
IDEA additional info:
3+
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
4+
<+>GBK
5+
===================================================================
6+
diff --git a/include/cppad/cg/cppadcg.hpp b/include/cppad/cg/cppadcg.hpp
7+
--- a/include/cppad/cg/cppadcg.hpp (revision 656d23e3c06e0e3d573f02336eb457e1f30896f2)
8+
+++ b/include/cppad/cg/cppadcg.hpp (date 1766646866207)
9+
@@ -239,6 +239,9 @@
10+
#include <cppad/cg/model/threadpool/pthread_pool_h.hpp>
11+
#include <cppad/cg/model/threadpool/openmp_c.hpp>
12+
#include <cppad/cg/model/threadpool/openmp_h.hpp>
13+
+#ifdef CONST
14+
+#undef CONST
15+
+#endif
16+
#include <cppad/cg/model/model_c_source_gen.hpp>
17+
#include <cppad/cg/model/model_c_source_gen_impl.hpp>
18+
#include <cppad/cg/model/model_library_c_source_gen.hpp>

ports/cppadcodegen/vcpkg.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "cppadcodegen",
3+
"version": "2.5.0",
4+
"description": "Source code generation for automatic differentiation using operator overloading (extension of CppAD)",
5+
"homepage": "https://github.com/joaoleal/CppADCodeGen",
6+
"license": "EPL-1.0 OR GPL-3.0-only",
7+
"dependencies": [
8+
"cppad",
9+
{
10+
"name": "vcpkg-cmake",
11+
"host": true
12+
},
13+
{
14+
"name": "vcpkg-cmake-config",
15+
"host": true
16+
}
17+
]
18+
}

versions/baseline.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2048,6 +2048,10 @@
20482048
"baseline": "20250000.3",
20492049
"port-version": 2
20502050
},
2051+
"cppadcodegen": {
2052+
"baseline": "2.5.0",
2053+
"port-version": 0
2054+
},
20512055
"cppcms": {
20522056
"baseline": "2.0.1",
20532057
"port-version": 0

versions/c-/cppadcodegen.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"versions": [
3+
{
4+
"git-tree": "770851c3e5af44f6fe36a0982f9550e991ac1583",
5+
"version": "2.5.0",
6+
"port-version": 0
7+
}
8+
]
9+
}

0 commit comments

Comments
 (0)