Files
YYCCommonplace/test/CMakeLists.txt
T

72 lines
1.5 KiB
CMake
Raw Normal View History

2025-09-29 13:34:02 +08:00
# Create executable test
add_executable(YYCCTest "")
# Setup test sources
target_sources(YYCCTest
2024-06-03 14:24:05 +08:00
PRIVATE
2025-08-19 20:53:51 +08:00
main.cpp
shared/literals.cpp
2025-08-04 21:15:49 +08:00
yycc/macro/version_cmp.cpp
2025-08-15 16:55:39 +08:00
yycc/macro/os_detector.cpp
yycc/macro/compiler_detector.cpp
yycc/macro/endian_detector.cpp
yycc/macro/ptr_size_detector.cpp
yycc/macro/stl_detector.cpp
2025-12-16 21:22:15 +08:00
yycc/cenum.cpp
2025-08-05 10:54:15 +08:00
yycc/patch/ptr_pad.cpp
2025-08-13 08:49:18 +08:00
yycc/patch/fopen.cpp
2025-09-25 15:29:55 +08:00
yycc/patch/stream.cpp
yycc/patch/format.cpp
yycc/env.cpp
2025-06-20 23:38:34 +08:00
yycc/string/reinterpret.cpp
yycc/string/op.cpp
yycc/num/parse.cpp
yycc/num/stringify.cpp
2025-08-05 13:53:59 +08:00
yycc/num/op.cpp
yycc/num/safe_cast.cpp
yycc/num/safe_op.cpp
yycc/encoding/stl.cpp
yycc/encoding/windows.cpp
yycc/encoding/iconv.cpp
2025-08-13 15:29:47 +08:00
yycc/windows/com.cpp
2025-08-21 11:00:04 +08:00
yycc/windows/dialog.cpp
2025-08-13 15:29:47 +08:00
yycc/windows/winfct.cpp
2025-08-22 21:51:32 +08:00
yycc/windows/console.cpp
2025-08-12 16:32:59 +08:00
yycc/carton/pycodec.cpp
2025-08-19 13:50:51 +08:00
yycc/carton/termcolor.cpp
2025-08-15 16:42:28 +08:00
yycc/carton/wcwidth.cpp
2025-08-19 20:53:51 +08:00
yycc/carton/tabulate.cpp
yycc/carton/clap.cpp
2025-12-11 15:21:59 +08:00
yycc/carton/binstore.cpp
yycc/carton/lexer61.cpp
yycc/carton/fft.cpp
2024-05-29 23:11:52 +08:00
)
2025-09-29 13:34:02 +08:00
target_sources(YYCCTest
PRIVATE
FILE_SET HEADERS
FILES
shared/literals.hpp
)
2025-06-20 23:38:34 +08:00
# Setup headers
2025-09-29 13:34:02 +08:00
target_include_directories(YYCCTest
2025-06-20 23:38:34 +08:00
PUBLIC
"${CMAKE_CURRENT_LIST_DIR}"
2024-05-29 23:11:52 +08:00
)
2025-06-20 23:38:34 +08:00
# Setup libraries
2025-09-29 13:34:02 +08:00
target_link_libraries(YYCCTest
2024-05-29 23:11:52 +08:00
PRIVATE
YYCCommonplace
2025-06-20 23:38:34 +08:00
GTest::gtest_main
2024-05-29 23:11:52 +08:00
)
2024-06-03 14:24:05 +08:00
2026-01-22 16:10:54 +08:00
# Install binary
install(TARGETS YYCCTest
RUNTIME DESTINATION ${YYCC_INSTALL_BIN_PATH}
)
2025-06-20 23:38:34 +08:00
# Discover all test
include(GoogleTest)
2025-09-29 13:34:02 +08:00
gtest_discover_tests(YYCCTest)