From 31a38782bb1869c98d87237925b20a0c3d99b13e Mon Sep 17 00:00:00 2001 From: Will Lane Date: Fri, 5 Nov 2021 21:15:11 -0700 Subject: [PATCH] updated readme instructions --- CMakeLists.txt | 14 +++++++------- README.md | 26 +++++++++++++++++++++----- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0588260..7375566 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.2) -project(bubbles C CXX) +project({{__NAME__}} C CXX) set(CXX_STANDARD 20) set(CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_FLAGS "-std=c++20") @@ -16,11 +16,11 @@ FetchContent_MakeAvailable(googletest) enable_testing() include_directories(src/) -add_executable(bubbles_test test/main.cpp) -target_link_libraries(bubbles_test gtest_main) +add_executable({{__NAME__}}_test test/main.cpp) +target_link_libraries({{__NAME__}}_test gtest_main) include(GoogleTest) -gtest_discover_tests(bubbles_test) +gtest_discover_tests({{__NAME__}}_test) find_package(Boost 1.76.0 COMPONENTS program_options REQUIRED) @@ -28,8 +28,8 @@ include_directories(${Boost_INCLUDE_DIR}) include_directories(include/) aux_source_directory(src/ SRC) -add_executable(bubbles ${SRC}) +add_executable({{__NAME__}} ${SRC}) -target_include_directories(bubbles PUBLIC include/) -target_include_directories(bubbles PUBLIC ${Boost_LIBRARIES}) +target_include_directories({{__NAME__}} PUBLIC include/) +target_include_directories({{__NAME__}} PUBLIC ${Boost_LIBRARIES}) diff --git a/README.md b/README.md index 3a78ed5..b77b4c1 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,27 @@ # Bubbles: A simple and expandable C++ project template with [Googletest](https://github.com/google/googletest) and [Boost](https://www.boost.org/) included. -## Building && Testing +## Setup + +```console +$ git clone https://willdoescode/bubbles +$ pwd +``` + +Copy pwd output to your [ctp](https://github.com/willdoescode/ctp) config. -```bash -cmake -S . -B build +```toml +[templates] +cpp = "" + +[commands-before] +[commands-after] +cpp = "rm .git" +``` + +## Building && Testing -cmake --build build +```console +$ cmake -S . -B build -./build/bubbles_test && ./build/bubbles +$ cmake --build build ```