能生成测试的test.exe了

This commit is contained in:
建峰 2024-06-21 17:37:59 +08:00
parent 5e7d07c7de
commit 75b0842cb4
5 changed files with 19 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
# cmake # cmake
build/ build/
release/
# SI4 # SI4
SIP.si4project/ SIP.si4project/

View File

@ -22,3 +22,12 @@ set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
# install # install
set(CMAKE_INSTALL_PREFIX "./release") set(CMAKE_INSTALL_PREFIX "./release")
# generate target
# add_executable(${PROJECT_NAME} ${DIR_TEST})
# link libary
# target_link_libraries(${PROJECT_NAME} unicstl)
# install
# install(TARGETS ${PROJECT_NAME} DESTINATION bin)

View File

@ -4,4 +4,4 @@ aux_source_directory(. LIB_SRC)
add_library(unicstl STATIC ${LIB_SRC}) add_library(unicstl STATIC ${LIB_SRC})
# install # install
install(TARGETS unicstl DESTINATION bin) install(TARGETS unicstl DESTINATION lib)

View File

@ -1,10 +1,14 @@
project(test)
# include
include_directories(.)
# add src
aux_source_directory(. DIR_TEST) aux_source_directory(. DIR_TEST)
include_directories(.)
# generate target # generate target
add_executable(${PROJECT_NAME} test.c) add_executable(${PROJECT_NAME} ${DIR_TEST})
# link libary # link libary
target_link_libraries(${PROJECT_NAME} unicstl) target_link_libraries(${PROJECT_NAME} unicstl)

View File

@ -3,6 +3,7 @@
int main() int main()
{ {
printf("----- unicstl -----\n");
// while (1) // while (1)
{ {
// list_test(); // list_test();