aboutsummaryrefslogtreecommitdiff
path: root/src/lib/CMakeLists.txt
blob: 9e0e9244d49e579038adef54c31cbbcdfa6ba5b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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)