-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
20 lines (18 loc) · 4.09 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
cmake_minimum_required(VERSION 3.23)
project(NGram)
set(CMAKE_C_STANDARD 17)
set(CMAKE_C_FLAGS "-O3")
find_package(sampling_c REQUIRED)
find_package(math_c REQUIRED)
add_library(NGram src/NGramNode.c src/NGramNode.h src/MultipleFile.c src/MultipleFile.h src/NGram.c src/NGram.h src/NoSmoothing.c src/NoSmoothing.h src/GoodTuringSmoothing.c src/GoodTuringSmoothing.h src/LaplaceSmoothing.c src/LaplaceSmoothing.h src/NoSmoothingWithDictionary.c src/NoSmoothingWithDictionary.h src/NoSmoothingWithNonRareWords.c src/NoSmoothingWithNonRareWords.h src/TrainedSmoothing.c src/TrainedSmoothing.h src/AdditiveSmoothing.c src/AdditiveSmoothing.h src/InterpolatedSmoothing.c src/InterpolatedSmoothing.h)
target_link_libraries(NGram sampling_c::sampling_c math_c::math_c)
add_executable(NGramTest src/NGramNode.c src/NGramNode.h src/MultipleFile.c src/MultipleFile.h src/NGram.c src/NGram.h src/NoSmoothing.c src/NoSmoothing.h src/GoodTuringSmoothing.c src/GoodTuringSmoothing.h src/LaplaceSmoothing.c src/LaplaceSmoothing.h src/NoSmoothingWithDictionary.c src/NoSmoothingWithDictionary.h src/NoSmoothingWithNonRareWords.c src/NoSmoothingWithNonRareWords.h src/TrainedSmoothing.c src/TrainedSmoothing.h src/AdditiveSmoothing.c src/AdditiveSmoothing.h src/InterpolatedSmoothing.c src/InterpolatedSmoothing.h Test/ReadCorpus.c Test/ReadCorpus.h Test/NGramTest.c)
target_link_libraries(NGramTest sampling_c::sampling_c math_c::math_c)
add_executable(NoSmoothingTest src/NGramNode.c src/NGramNode.h src/MultipleFile.c src/MultipleFile.h src/NGram.c src/NGram.h src/NoSmoothing.c src/NoSmoothing.h src/GoodTuringSmoothing.c src/GoodTuringSmoothing.h src/LaplaceSmoothing.c src/LaplaceSmoothing.h src/NoSmoothingWithDictionary.c src/NoSmoothingWithDictionary.h src/NoSmoothingWithNonRareWords.c src/NoSmoothingWithNonRareWords.h src/TrainedSmoothing.c src/TrainedSmoothing.h src/AdditiveSmoothing.c src/AdditiveSmoothing.h src/InterpolatedSmoothing.c src/InterpolatedSmoothing.h Test/ReadCorpus.c Test/ReadCorpus.h Test/NoSmoothingTest.c)
target_link_libraries(NoSmoothingTest sampling_c::sampling_c math_c::math_c)
add_executable(LaplaceSmoothingTest src/NGramNode.c src/NGramNode.h src/MultipleFile.c src/MultipleFile.h src/NGram.c src/NGram.h src/NoSmoothing.c src/NoSmoothing.h src/GoodTuringSmoothing.c src/GoodTuringSmoothing.h src/LaplaceSmoothing.c src/LaplaceSmoothing.h src/NoSmoothingWithDictionary.c src/NoSmoothingWithDictionary.h src/NoSmoothingWithNonRareWords.c src/NoSmoothingWithNonRareWords.h src/TrainedSmoothing.c src/TrainedSmoothing.h src/AdditiveSmoothing.c src/AdditiveSmoothing.h src/InterpolatedSmoothing.c src/InterpolatedSmoothing.h Test/ReadCorpus.c Test/ReadCorpus.h Test/LaplaceSmoothingTest.c)
target_link_libraries(LaplaceSmoothingTest sampling_c::sampling_c math_c::math_c)
add_executable(GoodTuringSmoothingTest src/NGramNode.c src/NGramNode.h src/MultipleFile.c src/MultipleFile.h src/NGram.c src/NGram.h src/NoSmoothing.c src/NoSmoothing.h src/GoodTuringSmoothing.c src/GoodTuringSmoothing.h src/LaplaceSmoothing.c src/LaplaceSmoothing.h src/NoSmoothingWithDictionary.c src/NoSmoothingWithDictionary.h src/NoSmoothingWithNonRareWords.c src/NoSmoothingWithNonRareWords.h src/TrainedSmoothing.c src/TrainedSmoothing.h src/AdditiveSmoothing.c src/AdditiveSmoothing.h src/InterpolatedSmoothing.c src/InterpolatedSmoothing.h Test/ReadCorpus.c Test/ReadCorpus.h Test/GoodTuringSmoothingTest.c)
target_link_libraries(GoodTuringSmoothingTest sampling_c::sampling_c math_c::math_c)
add_executable(AdditiveSmoothingTest src/NGramNode.c src/NGramNode.h src/MultipleFile.c src/MultipleFile.h src/NGram.c src/NGram.h src/NoSmoothing.c src/NoSmoothing.h src/GoodTuringSmoothing.c src/GoodTuringSmoothing.h src/LaplaceSmoothing.c src/LaplaceSmoothing.h src/NoSmoothingWithDictionary.c src/NoSmoothingWithDictionary.h src/NoSmoothingWithNonRareWords.c src/NoSmoothingWithNonRareWords.h src/TrainedSmoothing.c src/TrainedSmoothing.h src/AdditiveSmoothing.c src/AdditiveSmoothing.h src/InterpolatedSmoothing.c src/InterpolatedSmoothing.h Test/ReadCorpus.c Test/ReadCorpus.h Test/AdditiveSmoothingTest.c)
target_link_libraries(AdditiveSmoothingTest sampling_c::sampling_c math_c::math_c)