File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -328,10 +328,11 @@ include_directories(BEFORE SYSTEM
328
328
string (REPLACE "-Wcovered-switch-default" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
329
329
330
330
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 )
335
336
336
337
configure_file (
337
338
${CMAKE_CURRENT_SOURCE_DIR} /cmake/CppInterOp/CppInterOpConfig.cmake.in
Original file line number Diff line number Diff line change 1
- 1.4.0;dev
1
+ 1.4.0;dev
Original file line number Diff line number Diff line change 1
1
set (PACKAGE_VERSION "@CPPINTEROP_VERSION@" )
2
2
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@"
7
4
AND NOT "@CPPINTEROP_VERSION_PATCH@" VERSION_LESS "${PACKAGE_FIND_VERSION_PATCH} " )
8
5
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} " )
10
8
set (PACKAGE_VERSION_EXACT 1 )
11
- endif ()
12
9
endif ()
You can’t perform that action at this time.
0 commit comments