Skip to content

Commit

Permalink
Use time_generator_v1 in cmake_install_test
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jun 12, 2024
1 parent d35a395 commit f10ede7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/cmake_install_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ project(cmake_install_test LANGUAGES CXX)

find_package(boost_uuid REQUIRED)

add_executable(quick ../quick.cpp)
target_link_libraries(quick Boost::uuid)
add_executable(main main.cpp)
target_link_libraries(main Boost::uuid)

enable_testing()
add_test(quick quick)
add_test(main main)

add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
15 changes: 15 additions & 0 deletions test/cmake_install_test/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2024 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt)

#include <boost/uuid.hpp>

int main()
{
boost::uuids::time_generator_v1 gen;

boost::uuids::uuid u1 = gen();
boost::uuids::uuid u2 = gen();

return u1 == u2;
}

0 comments on commit f10ede7

Please sign in to comment.