Skip to content

Commit df0f677

Browse files
committed
Fix wasm build ci
1 parent c8979a2 commit df0f677

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,11 @@ include_directories(BEFORE SYSTEM
328328
string(REPLACE "-Wcovered-switch-default" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
329329

330330
file(STRINGS "VERSION" CPPINTEROP_VERSION)
331-
string(REGEX MATCH "([0-9]*)\.([0-9]*)\.([0-9]*)" CPPINTEROP_VERSION_ONLY "${CPPINTEROP_VERSION}")
332-
set(CPPINTEROP_VERSION_MAJOR "${CMAKE_MATCH_1}")
333-
set(CPPINTEROP_VERSION_MINOR "${CMAKE_MATCH_2}")
334-
set(CPPINTEROP_VERSION_PATCH "${CMAKE_MATCH_3}")
331+
string(REPLACE "." ";" VERSION_LIST "${CPPINTEROP_VERSION}")
332+
message(Debug "${VERSION_LIST}")
333+
list(GET VERSION_LIST 0 CPPINTEROP_VERSION_MAJOR)
334+
list(GET VERSION_LIST 1 CPPINTEROP_VERSION_MINOR)
335+
list(GET VERSION_LIST 2 CPPINTEROP_VERSION_PATCH)
335336

336337
configure_file(
337338
${CMAKE_CURRENT_SOURCE_DIR}/cmake/CppInterOp/CppInterOpConfig.cmake.in

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.0;dev
1+
1.4.0;dev
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
set(PACKAGE_VERSION "@CPPINTEROP_VERSION@")
22

3-
# LLVM is API-compatible only with matching major.minor versions
4-
# and patch versions not less than that requested.
5-
6-
if("@CPPINTEROP_VERSION_MAJOR@.@CPPINTEROP_VERSION_MINOR@" VERSION_EQUAL "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}"
3+
if("${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}" VERSION_LESS "@CPPINTEROP_VERSION_MAJOR@.@CPPINTEROP_VERSION_MINOR@"
74
AND NOT "@CPPINTEROP_VERSION_PATCH@" VERSION_LESS "${PACKAGE_FIND_VERSION_PATCH}")
85
set(PACKAGE_VERSION_COMPATIBLE 1)
9-
if("@CPPINTEROP_VERSION_PATCH@" VERSION_EQUAL "${PACKAGE_FIND_VERSION_PATCH}")
6+
endif()
7+
if("@CPPINTEROP_VERSION_MAJOR@.@CPPINTEROP_VERSION_MINOR@.@CPPINTEROP_VERSION_PATCH@" VERSION_EQUAL "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}.${PACKAGE_FIND_VERSION_PATCH}")
108
set(PACKAGE_VERSION_EXACT 1)
11-
endif()
129
endif()

0 commit comments

Comments
 (0)