Skip to content
This repository has been archived by the owner on May 6, 2023. It is now read-only.

Don't package CMake metadata #17

Merged
merged 4 commits into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '11'
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
target_platform:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/linux_aarch64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '11'
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
target_platform:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/linux_ppc64le_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '11'
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
target_platform:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channel_targets:
cxx_compiler:
- clangxx
cxx_compiler_version:
- '14'
- '15'
macos_machine:
- x86_64-apple-darwin13.4.0
target_platform:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_arm64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channel_targets:
cxx_compiler:
- clangxx
cxx_compiler_version:
- '14'
- '15'
macos_machine:
- arm64-apple-darwin20.0.0
target_platform:
Expand Down
4 changes: 4 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cd build-cpp
cmake .. ^
-GNinja ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_CXX_STANDARD=17 ^
-DCMAKE_PREFIX_PATH=%CONDA_PREFIX% ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DBUILD_TESTING=OFF ^
Expand All @@ -17,3 +18,6 @@ cmake .. ^

cmake --build . --config Release --target install
if errorlevel 1 exit 1

:: ensure we don't clobber CMake files from cpp-opentelemetry-sdk
rmdir /s /q %LIBRARY_LIB%\cmake\opentelemetry-cpp
7 changes: 4 additions & 3 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#!/bin/bash

set -ex

export CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_CXX_STANDARD=11"

mkdir -p build-cpp
pushd build-cpp

cmake ${CMAKE_ARGS} .. \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DBUILD_TESTING=OFF \
Expand All @@ -20,3 +18,6 @@ cmake ${CMAKE_ARGS} .. \

ninja install
popd

# ensure we don't clobber CMake files from cpp-opentelemetry-sdk
rm -rf $PREFIX/lib/cmake/opentelemetry-cpp
14 changes: 9 additions & 5 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{% set name = "cpp-opentelemetry-api" %}
{% set version = "1.9.0" %}

package:
name: {{ name|lower }}
name: cpp-opentelemetry-api
version: {{ version }}

source:
url: https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v{{ version }}.tar.gz
sha256: 0fdbefbdc2c154634728097e26de52a8210ed95cb032beb5f35da0a493cd5066

build:
number: 0
number: 1

requirements:
build:
Expand All @@ -20,8 +19,13 @@ requirements:

test:
commands:
- test -d $PREFIX/include/opentelemetry/ # [unix]
- if not exist %LIBRARY_INC%\opentelemetry exit 1 # [win]
# headers
- test -d $PREFIX/include/opentelemetry # [unix]
- if not exist %LIBRARY_INC%\opentelemetry exit 1 # [win]

# absence of CMake metadata (reserved for cpp-opentelemetry-sdk)
- test ! -d $PREFIX/lib/cmake/opentelemetry-cpp # [unix]
- if exist %LIBRARY_LIB%\cmake\opentelemetry-cpp exit 1 # [win]

about:
home: https://github.com/open-telemetry/opentelemetry-cpp
Expand Down