Auto-update ade to v0.1.2 (#4474)

* Update ade to v0.1.2

* patch mingw

---------

Co-authored-by: star9029 <hengxings783@gmail.com>
pull/4506/head
ruki 10 months ago committed by GitHub
parent f3799e8734
commit 48a7261601
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 27
      packages/a/ade/patches/0.1.2/cmake-mingw.patch
  2. 9
      packages/a/ade/xmake.lua

@ -0,0 +1,27 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af78061..8aba951 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,13 +39,15 @@ function(add_security_flags target)
target_compile_options( ${target} PRIVATE -fstack-protector-strong)
endif()
elseif(WIN32)
- target_compile_options( ${target} PRIVATE /GS /DynamicBase)
- if(BUILD_WITH_STATIC_CRT)
- target_compile_options( ${target} PRIVATE "/MT")
- endif()
- if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
- # These options for 32 bit builds only
- target_compile_options( ${target} PRIVATE /SAFESEH /NXCOMPAT )
+ if (MSVC)
+ target_compile_options( ${target} PRIVATE /GS /DynamicBase)
+ if(BUILD_WITH_STATIC_CRT)
+ target_compile_options( ${target} PRIVATE "/MT")
+ endif()
+ if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
+ # These options for 32 bit builds only
+ target_compile_options( ${target} PRIVATE /SAFESEH /NXCOMPAT )
+ endif()
endif()
endif()
endfunction()

@ -7,6 +7,9 @@ package("ade")
"https://github.com/opencv/ade.git")
add_versions("v0.1.2d", "edefba61a33d6cd4b78a9976cb3309c95212610a81ba6dade09882d1794198ff")
add_versions("v0.1.2", "ac2e6a4acbe6e0b0942418687ec37c6cd55dcaec5112c7ca09abefe6ee539499")
add_patches("0.1.2", "patches/0.1.2/cmake-mingw.patch", "59ac0ed938b82090e97de6dee358ba683b371908c3063b4d10146999a30eaaaa")
add_deps("cmake")
@ -19,5 +22,9 @@ package("ade")
end)
on_test(function (package)
assert(package:has_cxxtypes("ade::Graph", {configs = {languages = "c++11"}, includes = "ade/graph.hpp"}))
assert(package:check_cxxsnippets({test = [[
void test() {
ade::Graph x;
}
]]}, {configs = {languages = "c++11"}, includes = "ade/graph.hpp"}))
end)

Loading…
Cancel
Save