Skip to content

Commit

Permalink
test(cmake): check for exported version number
Browse files Browse the repository at this point in the history
  • Loading branch information
gjasny committed May 26, 2024
1 parent 5b3e4d6 commit 6f9fbbc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/project-import-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ project(prometheus-cpp-import)

find_package(prometheus-cpp CONFIG REQUIRED)

if(NOT DEFINED prometheus-cpp_VERSION)
message(FATAL_ERROR "prometheus-cpp_VERSION is not defined")
endif()

if(PROMETHEUS_CPP_ENABLE_PUSH)
add_executable(sample-client sample_client.cc)
target_link_libraries(sample-client PRIVATE prometheus-cpp::push $<$<BOOL:${WIN32}>:Ws2_32>)
Expand Down

0 comments on commit 6f9fbbc

Please sign in to comment.