This commit is contained in:
LiuYuanchi 2024-05-10 22:23:25 +08:00
parent 2b373378cb
commit aa7f674b96
7 changed files with 6 additions and 15 deletions

View File

@ -2,19 +2,14 @@ cmake_minimum_required(VERSION 3.10)
project(nfa) project(nfa)
# cpp # cpp
file(GLOB SOURCES dfa.cpp nfa.cpp tool.cpp test_main.cpp) file(GLOB SOURCES "src/*.cpp")
# bin
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# #
add_library(nfa STATIC ${SOURCES}) add_library(nfa STATIC ${SOURCES})
# Test:
add_executable(test_nfa test/test_main.cpp)
target_link_libraries(test_nfa nfa)
# #
target_include_directories(nfa PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(nfa PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
#
add_executable(test_nfa test_main.cpp nfa)
#
target_link_libraries(test_nfa nfa)

BIN
nfa/archive/nfa.zip Normal file

Binary file not shown.

View File

@ -1,8 +1,4 @@
// 将正则表达式转换为非确定性有限自动机 // 将正则表达式转换为非确定性有限自动机
#include "nfa.h" #include "nfa.h"