mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 01:30:55 +08:00
[ampl-asl] Update to 20240201 and disable generated header when cross-compiling (#40958)
This commit is contained in:
parent
419d6258d0
commit
596470719b
13
ports/ampl-asl/0006-disable-generate-arith-h.diff
Normal file
13
ports/ampl-asl/0006-disable-generate-arith-h.diff
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1d4b65e..21b32ae 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -104,7 +104,7 @@ file(WRITE ${GENERATED_INCLUDE_DIR}/details.c "${DETAILS}")
|
||||
configure_file(${SRCDIR}/solvers/stdio1.h0 ${GENERATED_INCLUDE_DIR}/stdio1.h
|
||||
COPYONLY)
|
||||
|
||||
-if(CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "^x86")
|
||||
+if(0)
|
||||
include(CheckTypeSize)
|
||||
check_type_size(double DOUBLE_SIZE)
|
||||
check_type_size(long LONG_SIZE)
|
@ -1,59 +0,0 @@
|
||||
Licenses
|
||||
========
|
||||
|
||||
Copyright (C) 1990 - 2001 Lucent Technologies
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and
|
||||
its documentation for any purpose and without fee is hereby
|
||||
granted, provided that the above copyright notice appear in all
|
||||
copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of Lucent or any of its entities
|
||||
not be used in advertising or publicity pertaining to
|
||||
distribution of the software without specific, written prior
|
||||
permission.
|
||||
|
||||
LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
|
||||
IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
|
||||
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
|
||||
IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
||||
THIS SOFTWARE.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2007 David M. Gay
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that the copyright notice and this permission notice and warranty
|
||||
disclaimer appear in supporting documentation.
|
||||
|
||||
The author disclaims all warranties with regard to this software,
|
||||
including all implied warranties of merchantability and fitness.
|
||||
In no event shall the author be liable for any special, indirect or
|
||||
consequential damages or any damages whatsoever resulting from loss of
|
||||
use, data or profits, whether in an action of contract, negligence or
|
||||
other tortious action, arising out of or in connection with the use or
|
||||
performance of this software.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2002 - 2014 AMPL Optimization LLC
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that the copyright notice and this permission notice and warranty
|
||||
disclaimer appear in supporting documentation.
|
||||
|
||||
The author and AMPL Optimization LLC disclaim all warranties with
|
||||
regard to this software, including all implied warranties of
|
||||
merchantability and fitness. In no event shall the author be liable
|
||||
for any special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether in an
|
||||
action of contract, negligence or other tortious action, arising out
|
||||
of or in connection with the use or performance of this software.
|
@ -1,13 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 976af78..35d248d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -256,7 +256,7 @@ macro(createSingleASL name sourcedir sources)
|
||||
endif()
|
||||
if(MSVC)
|
||||
target_compile_options(${name} PRIVATE
|
||||
- /wd4013 /wd4018 /wd4101 /wd4244 /wd4273 /wd4267 /wd4996 /MT$<$<CONFIG:Debug>:d>)
|
||||
+ /wd4013 /wd4018 /wd4101 /wd4244 /wd4273 /wd4267 /wd4996)
|
||||
else()
|
||||
target_compile_options(${name} PRIVATE -Wno-unused-result -Wno-parentheses)
|
||||
endif()
|
@ -1,12 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 35d248d..8a85aa7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -317,6 +317,7 @@ if(BUILD_CPP)
|
||||
endif()
|
||||
|
||||
install(FILES ${ASL_HEADERS} ${ASL_SOURCE_DIR}/opcode.hd ${ASL_SOURCE_DIR}/r_opn.hd
|
||||
+ ${GENERATED_INCLUDE_DIR}/stdio1.h ${GENERATED_INCLUDE_DIR}/arith.h
|
||||
DESTINATION include/asl COMPONENT asl)
|
||||
install(FILES ${ASL2_HEADERS} ${ASL2_SOURCE_DIR}/opcode.hd ${ASL2_SOURCE_DIR}/r_opn.hd
|
||||
DESTINATION include/asl2 COMPONENT asl)
|
@ -1,39 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8a85aa7..c0619bc 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -247,8 +247,8 @@ endif()
|
||||
|
||||
macro(createSingleASL name sourcedir sources)
|
||||
add_library(${name} STATIC ${${sources}} ${GENERATED_INCLUDE_DIR}/arith.h)
|
||||
- target_include_directories(${name} PUBLIC ${GENERATED_INCLUDE_DIR}
|
||||
- ${sourcedir})
|
||||
+ target_include_directories(${name} PUBLIC $<BUILD_INTERFACE:${GENERATED_INCLUDE_DIR}>
|
||||
+ $<BUILD_INTERFACE:${sourcedir}> $<INSTALL_INTERFACE:include>)
|
||||
target_compile_definitions(${name} PRIVATE ${ASL_COMPILE_DEFINITIONS})
|
||||
target_link_libraries(${name} PUBLIC ${CMAKE_DL_LIBS})
|
||||
if(NOT WIN32)
|
||||
@@ -322,14 +322,16 @@ install(FILES ${ASL_HEADERS} ${ASL_SOURCE_DIR}/opcode.hd ${ASL_SOURCE_DIR}/r_opn
|
||||
install(FILES ${ASL2_HEADERS} ${ASL2_SOURCE_DIR}/opcode.hd ${ASL2_SOURCE_DIR}/r_opn.hd
|
||||
DESTINATION include/asl2 COMPONENT asl)
|
||||
|
||||
-install(TARGETS asl asl2 DESTINATION lib COMPONENT asl)
|
||||
+install(TARGETS asl asl2 EXPORT unofficial-asl-config DESTINATION lib COMPONENT asl)
|
||||
if(BUILD_MT_LIBS)
|
||||
- install(TARGETS asl-mt asl2-mt DESTINATION lib COMPONENT asl)
|
||||
+ install(TARGETS asl-mt asl2-mt EXPORT unofficial-asl-config DESTINATION lib COMPONENT asl)
|
||||
endif()
|
||||
if(MSVC AND BUILD_DYNRT_LIBS)
|
||||
- install(TARGETS asl-dynrt asl2-dynrt DESTINATION lib COMPONENT asl)
|
||||
+ install(TARGETS asl-dynrt asl2-dynrt EXPORT unofficial-asl-config DESTINATION lib COMPONENT asl)
|
||||
endif()
|
||||
if(TARGET aslcpp)
|
||||
install(FILES ${ASL_CPP_HEADERS} DESTINATION include/aslcpp COMPONENT asl)
|
||||
- install(TARGETS aslcpp DESTINATION lib COMPONENT asl)
|
||||
-endif()
|
||||
\ No newline at end of file
|
||||
+ install(TARGETS aslcpp EXPORT unofficial-asl-config DESTINATION lib COMPONENT asl)
|
||||
+endif()
|
||||
+
|
||||
+install(EXPORT unofficial-asl-config DESTINATION share/unofficial-asl)
|
||||
\ No newline at end of file
|
@ -3,14 +3,12 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ampl/asl
|
||||
REF 934d34719c8a620fcf16ae5a3c00c326eb22e748
|
||||
SHA512 b6fcb3dcb53a53d975666db1643d7ea518246e8fb6745621ce4b63de4393f7767844e9241baa6fdf1a45c241a9aa0866844c47deec0020313278128cccff6869
|
||||
REF 2f5d9de248c53a3063bba23af2013cd3db768bf8
|
||||
SHA512 a551420f60b2419285195063fc42b208e59f076d1d00e4b90847c15613997ba35d319d57275687df37e74a7486420fec2cde7da71a6126802ed19a12dcb8ffdc
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
workaround-msvc-optimizer-ice.patch
|
||||
fix-crt-linkage.patch # CRT linkage uses C/CXX FLAGS in vcpkg
|
||||
install-extra-headers.patch
|
||||
install-targets.patch
|
||||
0006-disable-generate-arith-h.diff
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
@ -26,9 +24,8 @@ vcpkg_cmake_install()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-asl)
|
||||
vcpkg_cmake_config_fixup()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
# from ampl-mp license
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
@ -1,11 +1,10 @@
|
||||
{
|
||||
"name": "ampl-asl",
|
||||
"version-date": "2020-11-11",
|
||||
"port-version": 3,
|
||||
"version-date": "2024-02-01",
|
||||
"description": "AMPL Solver Library",
|
||||
"homepage": "https://github.com/ampl/asl",
|
||||
"license": null,
|
||||
"supports": "!uwp & !(osx & arm64)",
|
||||
"license": "BSD-3-Clause",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
|
25
ports/ampl-mp/0007-unofficial-export.cmake
Normal file
25
ports/ampl-mp/0007-unofficial-export.cmake
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
install(
|
||||
EXPORT unofficial-mp-targets
|
||||
NAMESPACE
|
||||
DESTINATION share/unofficial-mp
|
||||
)
|
||||
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-mp-config.cmake.in" [[
|
||||
@PACKAGE_INIT@
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(ampl-asl CONFIG)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-mp-targets.cmake")
|
||||
]]
|
||||
)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
configure_package_config_file("${CMAKE_CURRENT_BINARY_DIR}/unofficial-mp-config.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/unofficial-mp-config.cmake"
|
||||
INSTALL_DESTINATION "share/unofficial-mp"
|
||||
)
|
||||
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/unofficial-mp-config.cmake"
|
||||
DESTINATION "share/unofficial-mp"
|
||||
)
|
@ -6,7 +6,7 @@ index 13f11cb..92089a3 100644
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
+find_package(unofficial-asl CONFIG REQUIRED)
|
||||
+find_package(ampl-asl CONFIG REQUIRED)
|
||||
add_subdirectory(doc)
|
||||
add_subdirectory(src/amplsig)
|
||||
-add_subdirectory(src/asl)
|
||||
|
@ -16,8 +16,8 @@ index d4c6762..c7b15b6 100644
|
||||
|
||||
install(DIRECTORY include/mp DESTINATION include)
|
||||
-install(TARGETS mp DESTINATION lib RUNTIME DESTINATION bin)
|
||||
+install(TARGETS mp EXPORT unofficial-mp-config DESTINATION lib RUNTIME DESTINATION bin)
|
||||
+install(TARGETS mp EXPORT unofficial-mp-targets DESTINATION lib RUNTIME DESTINATION bin)
|
||||
install(FILES LICENSE.rst DESTINATION share/mp)
|
||||
+install(EXPORT unofficial-mp-config DESTINATION share/unofficial-mp)
|
||||
+include(0007-unofficial-export.cmake)
|
||||
install(TARGETS gen-expr-info RUNTIME DESTINATION bin)
|
||||
\ No newline at end of file
|
||||
|
@ -13,6 +13,7 @@ vcpkg_from_github(
|
||||
fix-arm-build.patch # https://github.com/ampl/mp/issues/115
|
||||
install-targets.patch
|
||||
)
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/0007-unofficial-export.cmake" DESTINATION "${SOURCE_PATH}/")
|
||||
|
||||
if (NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET)
|
||||
set(ARITHCHK_EXEC ${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}/gen-expr-info${VCPKG_HOST_EXECUTABLE_SUFFIX})
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ampl-mp",
|
||||
"version-date": "2020-11-11",
|
||||
"port-version": 4,
|
||||
"port-version": 5,
|
||||
"description": "An open-source library for mathematical programming",
|
||||
"homepage": "https://github.com/ampl/mp",
|
||||
"supports": "!uwp",
|
||||
|
@ -48,7 +48,6 @@ ace:x64-android=fail
|
||||
allegro5:arm-neon-android=fail
|
||||
allegro5:arm64-android=fail
|
||||
allegro5:x64-android=fail
|
||||
ampl-asl:x64-android=fail
|
||||
apr:arm-neon-android=fail
|
||||
apr:arm64-android=fail
|
||||
apr:x64-android=fail
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "af475f9134b986c7677f68e74b1658725d60b876",
|
||||
"version-date": "2024-02-01",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "2a88fb5c85a975bf5c5b49b6d87224b25504553d",
|
||||
"version-date": "2020-11-11",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "5d383d7b192993a98f67775f292f9443d041e516",
|
||||
"version-date": "2020-11-11",
|
||||
"port-version": 5
|
||||
},
|
||||
{
|
||||
"git-tree": "adc07c10ee68ac3ebb3ea916bc4a62bf1ceaf5cc",
|
||||
"version-date": "2020-11-11",
|
||||
|
@ -109,12 +109,12 @@
|
||||
"port-version": 1
|
||||
},
|
||||
"ampl-asl": {
|
||||
"baseline": "2020-11-11",
|
||||
"port-version": 3
|
||||
"baseline": "2024-02-01",
|
||||
"port-version": 0
|
||||
},
|
||||
"ampl-mp": {
|
||||
"baseline": "2020-11-11",
|
||||
"port-version": 4
|
||||
"port-version": 5
|
||||
},
|
||||
"amqpcpp": {
|
||||
"baseline": "4.3.26",
|
||||
|
Loading…
x
Reference in New Issue
Block a user