summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Fedoryshchenko <denys.f@collabora.com>2023-04-30 17:40:54 +0300
committerDmitriy Eshenko <dmitriy.eshenko@accel-ppp.org>2023-06-09 19:56:00 +0300
commit6df439595309bdffdc0dd4c1d2b4dc7bc2968bce (patch)
tree059c193818c0fc52c0b424e6b5ac68fc96708183
parent2b0226f25bd65dbe357b751aeeb481c09df20382 (diff)
downloadaccel-ppp-6df439595309bdffdc0dd4c1d2b4dc7bc2968bce.tar.gz
accel-ppp-6df439595309bdffdc0dd4c1d2b4dc7bc2968bce.zip
Fix compile failure with cmake failing on forks, fixes issue #80
We set fake variables so recipe doesn't fail. It is a bit of hack for such situation, but makes development easier. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
-rw-r--r--cmake/cpack.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/cpack.cmake b/cmake/cpack.cmake
index b46f8b1..81bc714 100644
--- a/cmake/cpack.cmake
+++ b/cmake/cpack.cmake
@@ -1,6 +1,13 @@
INCLUDE(InstallRequiredSystemLibraries)
string(REPLACE "." ";" VERSION_LIST ${ACCEL_PPP_VERSION})
+
+# Verify if VERSION_LIST has 3 elements
+# If not assign dummy variables
+list(LENGTH VERSION_LIST VERSION_LIST_LENGTH)
+if(NOT VERSION_LIST_LENGTH EQUAL 3)
+ set(VERSION_LIST git;git;git)
+endif()
list(GET VERSION_LIST 0 CPACK_PACKAGE_VERSION_MAJOR)
list(GET VERSION_LIST 1 CPACK_PACKAGE_VERSION_MINOR)
list(GET VERSION_LIST 2 CPACK_PACKAGE_VERSION_PATCH)