diff --git a/recipe/cmake_test/CMakeLists.txt b/recipe/cmake_test/CMakeLists.txt new file mode 100644 index 0000000..5488faa --- /dev/null +++ b/recipe/cmake_test/CMakeLists.txt @@ -0,0 +1,4 @@ +project(cf_dummy LANGUAGES C CXX) +cmake_minimum_required(VERSION 3.12) +# make sure package is found +find_package(Thrift REQUIRED) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 291ffc2..3dc003c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -47,6 +47,14 @@ outputs: - openssl - zlib test: + requires: + # cmake needs compiler to be able to run package detection, see + # https://discourse.cmake.org/t/questions-about-find-package-cli-msvc/6194 + - {{ compiler('cxx') }} + - cmake + - ninja + files: + - cmake_test/ commands: # presence of shared libs - test -f $PREFIX/lib/libthrift.so # [linux] @@ -65,6 +73,11 @@ outputs: - test -f $PREFIX/include/thrift/Thrift.h # [unix] - if not exist %LIBRARY_INC%\thrift\Thrift.h exit 1 # [win] + # test CMake integration, i.e. find_package(thrift) + - cd cmake_test + - cmake -GNinja $CMAKE_ARGS . # [unix] + - cmake -GNinja %CMAKE_ARGS% . # [win] + - name: thrift-compiler script: install.sh # [unix] script: install.bat # [win]