♻️ 使用module重构所有代码
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
# MinGW/MSYS2 静态链接
|
||||
if(MINGW)
|
||||
add_link_options(-static -static-libgcc -static-libstdc++)
|
||||
elseif(UNIX AND NOT APPLE) # Linux 静态链接
|
||||
add_link_options(-static-libgcc -static-libstdc++)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
message(STATUS "Building tests with Clang")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
message(STATUS "Building tests with GCC; modules support is experimental")
|
||||
else()
|
||||
message(WARNING "Unsupported compiler for test modules: ${CMAKE_CXX_COMPILER_ID}. Build may fail.")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
@@ -30,3 +31,8 @@ endif()
|
||||
if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/test_semantic/CMakeLists.txt)
|
||||
add_subdirectory(test_semantic)
|
||||
endif()
|
||||
|
||||
# test_module 由顶层 add_subdirectory(test) 自动拉入,无需单独处理
|
||||
if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/test_module/CMakeLists.txt)
|
||||
add_subdirectory(test_module)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user