🎉 Init project set up
This commit is contained in:
commit
27c5a55400
6 changed files with 40 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
build
|
||||||
|
.ccls-cache
|
||||||
7
CMakeLists.txt
Normal file
7
CMakeLists.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
cmake_minimum_required(VERSION 4.0)
|
||||||
|
|
||||||
|
project(Trenesis)
|
||||||
|
|
||||||
|
include_directories(lib)
|
||||||
|
|
||||||
|
add_subdirectory(tests)
|
||||||
0
lib/trenesis.h
Normal file
0
lib/trenesis.h
Normal file
14
tests/CMakeLists.txt
Normal file
14
tests/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
add_subdirectory(googletest)
|
||||||
|
|
||||||
|
add_executable(
|
||||||
|
test_trenesis
|
||||||
|
trenesis/test.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(
|
||||||
|
test_trenesis
|
||||||
|
GTest::gtest_main
|
||||||
|
)
|
||||||
|
|
||||||
|
include(GoogleTest)
|
||||||
|
gtest_discover_tests(test_trenesis)
|
||||||
11
tests/googletest/CMakeLists.txt
Normal file
11
tests/googletest/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# GoogleTest requires at least C++17
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
googletest
|
||||||
|
URL https://github.com/google/googletest/archive/9156d4caac880b513264ecbe0aa4746a3fead3d7.zip
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(googletest)
|
||||||
|
|
||||||
6
tests/trenesis/test.cpp
Normal file
6
tests/trenesis/test.cpp
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
#include "trenesis.h"
|
||||||
|
|
||||||
|
TEST(Trenesis, Test) {
|
||||||
|
EXPECT_EQ(true, true);
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue