From 411f66a2540fa17c736116d865e0ceb0cfe5623b Mon Sep 17 00:00:00 2001 From: jeanne Date: Wed, 11 May 2022 09:54:38 -0700 Subject: Initial commit. --- src/lib/CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/lib/CMakeLists.txt (limited to 'src/lib/CMakeLists.txt') diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt new file mode 100644 index 0000000..9e0e924 --- /dev/null +++ b/src/lib/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required(VERSION 3.0) + +# Library + +add_library(neuralnet + src/matrix.c + src/neuralnet.c + src/train.c) + +target_include_directories(neuralnet PUBLIC + include) + +target_link_libraries(neuralnet PRIVATE + math # System math library. + random) + +target_compile_options(neuralnet PRIVATE -Wall -Wextra) + +# Test + +add_executable(neuralnet-test + test/matrix_test.c + test/neuralnet_test.c + test/test_main.c + test/train_linear_perceptron_test.c + test/train_linear_perceptron_non_origin_test.c + test/train_sigmoid_test.c + test/train_xor_test.c) + +target_link_libraries(neuralnet-test PRIVATE + neuralnet) + +# So that we can include header files from the private implementation. +target_include_directories(neuralnet-test PRIVATE + src) + +target_compile_options(neuralnet-test PRIVATE -DUNIT_TEST -Wall -Wextra) -- cgit v1.2.3