Skip to content

Commit 8b71324

Browse files
committed
Add test installed version project
1 parent d7360c3 commit 8b71324

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/myproj/tests/CMakeLists.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cmake_minimum_required(VERSION 3.21...3.29)
2+
3+
set(CMAKE_CXX_STANDARD 20)
4+
5+
project(myproj_test VERSION 0.2.0 LANGUAGES CXX)
6+
7+
find_package(myproj_header_only_lib 0.2.0 CONFIG REQUIRED)
8+
9+
# Executable
10+
add_executable(main ../src/main/main.cpp)
11+
target_link_libraries(
12+
main
13+
PRIVATE myproj_header_only_lib::lib #
14+
myproj_header_only_lib::myproj_project_options
15+
myproj_header_only_lib::myproj_project_warnings
16+
)
17+
18+
## tests
19+
enable_testing()
20+
add_test(NAME main COMMAND main)

0 commit comments

Comments
 (0)