Skip to content

Commit c783cc6

Browse files
committed
feat(CMake): Add CMakeLists.txt for each folders
1 parent 0672316 commit c783cc6

File tree

6 files changed

+33
-0
lines changed

6 files changed

+33
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ FetchContent_MakeAvailable(googletest)
2222
###
2323

2424
add_executable(cplusplus main.cpp)
25+
add_subdirectory(src)

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
add_subdirectory(onlinePlatform)

src/onlinePlatform/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
project(OnlinePlatform)
2+
add_subdirectory(codewars)
3+
add_subdirectory(leetcode)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
project(5kyu)
2+
3+
include(FetchContent)
4+
FetchContent_Declare(
5+
googletest
6+
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
7+
)
8+
# For Windows: Prevent overriding the parent project's compiler/linker settings
9+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
10+
FetchContent_MakeAvailable(googletest)
11+
12+
enable_testing()
13+
14+
add_executable(
15+
rot13GoogleTest
16+
rot13GoogleTest.cc
17+
)
18+
target_link_libraries(
19+
rot13GoogleTest
20+
GTest::gtest_main
21+
)
22+
23+
include(GoogleTest)
24+
gtest_discover_tests(rot13GoogleTest)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
project(codewars)
2+
3+
add_subdirectory(5kyu)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
project(leetcode)

0 commit comments

Comments
 (0)