This is an automated email from the ASF dual-hosted git repository.

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 082a7c7  MINIFICPP-1441 Specify Lua version in Mac CI builds
082a7c7 is described below

commit 082a7c750c91be561ff70937c7c6ca66dedf62a8
Author: Gabor Gyimesi <[email protected]>
AuthorDate: Tue Jan 5 07:40:32 2021 +0100

    MINIFICPP-1441 Specify Lua version in Mac CI builds
    
    This closes #962
    
    Signed-off-by: Marton Szasz <[email protected]>
---
 .github/workflows/ci.yml         | 14 ++++++++++----
 extensions/script/CMakeLists.txt |  9 +++++++--
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c07de00..0712203 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -9,13 +9,16 @@ jobs:
       - id: checkout
         uses: actions/checkout@v2
       - id: install_dependencies
-        run: brew install ossp-uuid boost flex openssl python lua xz libssh2
+        run: brew install ossp-uuid boost flex openssl python [email protected] xz 
libssh2
       - id: setup_env
         run: |
           echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts > /dev/null
           sudo xcode-select -switch /Applications/Xcode_11.2.1.app
       - id: build
-        run: ./bootstrap.sh -e -t && cd build  && cmake 
-DCMAKE_BUILD_TYPE=Release -DENABLE_LUA_SCRIPTING=1 -DCMAKE_VERBOSE_MAKEFILE=ON 
-DCMAKE_RULE_MESSAGES=OFF -DSTRICT_GSL_CHECKS=AUDIT .. && cmake --build . 
--parallel 4 && make test ARGS="--timeout 300 -j4 --output-on-failure" && make 
linter
+        run: |
+          export 
PATH="/usr/local/opt/[email protected]/lib:/usr/local/opt/[email protected]/include:/usr/local/opt/[email protected]/bin:$PATH"
+          export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"
+          ./bootstrap.sh -e -t && cd build  && cmake 
-DCMAKE_BUILD_TYPE=Release -DENABLE_LUA_SCRIPTING=1 -DCMAKE_VERBOSE_MAKEFILE=ON 
-DCMAKE_RULE_MESSAGES=OFF -DSTRICT_GSL_CHECKS=AUDIT .. && cmake --build . 
--parallel 4 && make test ARGS="--timeout 300 -j4 --output-on-failure" && make 
linter
   macos_xcode_12_0:
     name: "macos-xcode12.0"
     runs-on: macos-10.15
@@ -24,13 +27,16 @@ jobs:
       - id: checkout
         uses: actions/checkout@v2
       - id: install_dependencies
-        run: brew install ossp-uuid boost flex openssl python lua xz libssh2
+        run: brew install ossp-uuid boost flex openssl python [email protected] xz 
libssh2
       - id: setup_env
         run: |
           echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts > /dev/null
           sudo xcode-select -switch /Applications/Xcode_12.app
       - id: build
-        run: ./bootstrap.sh -e -t && cd build  && cmake 
-DCMAKE_BUILD_TYPE=Release -DENABLE_LUA_SCRIPTING=1 -DCMAKE_VERBOSE_MAKEFILE=ON 
-DCMAKE_RULE_MESSAGES=OFF -DSTRICT_GSL_CHECKS=AUDIT .. && cmake --build . 
--parallel 4 && make test ARGS="--timeout 300 -j4 --output-on-failure" && make 
linter
+        run: |
+          export 
PATH="/usr/local/opt/[email protected]/lib:/usr/local/opt/[email protected]/include:/usr/local/opt/[email protected]/bin:$PATH"
+          export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"
+          ./bootstrap.sh -e -t && cd build  && cmake 
-DCMAKE_BUILD_TYPE=Release -DENABLE_LUA_SCRIPTING=1 -DCMAKE_VERBOSE_MAKEFILE=ON 
-DCMAKE_RULE_MESSAGES=OFF -DSTRICT_GSL_CHECKS=AUDIT .. && cmake --build . 
--parallel 4 && make test ARGS="--timeout 300 -j4 --output-on-failure" && make 
linter
   windows_VS2017:
     name: "windows-vs2017"
     runs-on: windows-2016
diff --git a/extensions/script/CMakeLists.txt b/extensions/script/CMakeLists.txt
index d89e4e5..d9a7b1f 100644
--- a/extensions/script/CMakeLists.txt
+++ b/extensions/script/CMakeLists.txt
@@ -34,7 +34,7 @@ if (ENABLE_LUA_SCRIPTING)
     set(CMAKE_CXX_STANDARD_REQUIRED ON)
 endif()
 
-include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt) 
+include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt)
 
 set (OTHER_SOURCES "")
 if (NOT DISABLE_PYTHON_SCRIPTING)
@@ -69,7 +69,12 @@ if (NOT DISABLE_PYTHON_SCRIPTING)
 endif()
 
 if (ENABLE_LUA_SCRIPTING)
-    find_package(Lua REQUIRED)
+    SET(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL)
+    SET(CMAKE_FIND_PACKAGE_SORT_DIRECTION ASC)
+    find_package(Lua 5.1 REQUIRED)
+    if ("${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" VERSION_GREATER_EQUAL 
"5.4")
+        message(FATAL_ERROR "No supported LUA version was found. Supported 
versions: 5.1, 5.2, 5.3")
+    endif()
 
     include_directories(${LUA_INCLUDE_DIR})
 

Reply via email to