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

prometheus-exporter with CMake #248

Closed
StevenYCChou opened this issue Dec 4, 2018 · 3 comments
Closed

prometheus-exporter with CMake #248

StevenYCChou opened this issue Dec 4, 2018 · 3 comments
Assignees

Comments

@StevenYCChou
Copy link
Contributor

StevenYCChou commented Dec 4, 2018

I'd like to build with prometheus-exporter with CMake, which should be part of #244

I plan to add prometheus-exporter into CMake support on https://github.com/StevenYCChou/opencensus-cpp/tree/ycchou-add-prometheus-exporter-cmake .

I tempted to build only prometheus-cpp's core library, but when I pass

-DENABLE_PUSH=OFF -DENABLE_PULL=OFF -DENABLE_COMPRESSION=OFF -DENABLE_TESTING=OFF

through CMAKE_ARGS, it doesn't really disable testing and compression for build time. The error message is:

% cmake CMakeLists.txt                       
-- Dependency: abseil
-- Configuring done
-- Generating done
-- Build files have been written to: /Codes/opencensus-cpp/abseil-download
[100%] Built target abseil_project
-- Configuring done
-- Generating done
-- Build files have been written to: /Codes/opencensus-cpp/prometheus-download
[100%] Built target prometheus_cpp_project
-- Could NOT find GoogleBenchmark (missing: GoogleBenchmark_LIBRARY GoogleBenchmark_INCLUDE_DIR) 
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindZLIB.cmake:112 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  prometheus-src/pull/CMakeLists.txt:9 (find_package)


-- Configuring incomplete, errors occurred!
See also "/Codes/opencensus-cpp/CMakeFiles/CMakeOutput.log".
See also "/Codes/opencensus-cpp/CMakeFiles/CMakeError.log".

Am I doing anything wrong?

@StevenYCChou
Copy link
Contributor Author

Just solved the problem by setting cmake options for prometheus-cpp.

@g-easy
Copy link
Contributor

g-easy commented Mar 1, 2019

Is this issue resolved?

@StevenYCChou
Copy link
Contributor Author

yes, the issue is solved. Thanks for supporting initial change on CMake support and the feedback on #249, @g-easy. Will close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants