diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9227c1d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.10) + +project(HelloWorld) +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +enable_testing() + +find_package(fmt CONFIG REQUIRED) +find_package(GTest CONFIG REQUIRED) + +add_executable(HelloWorld helloworld.cpp) + +target_link_libraries(HelloWorld PRIVATE fmt::fmt) + +add_executable( + hello_test + hello_test.cc +) +target_link_libraries( + hello_test + GTest::gtest_main +) +include(GoogleTest) +gtest_discover_tests(hello_test) \ No newline at end of file diff --git a/README.md b/README.md index e69de29..8b86613 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,6 @@ +brew install ninja +vcpkg add port gtest +cmake --preset=default +cmake -S . -B build +cmake --build build +cd build && ctest