1include_directories(. .. ../../include)
2
3add_custom_command(
4  OUTPUT err_data.c
5  COMMAND ${GO_EXECUTABLE} run err_data_generate.go > ${CMAKE_CURRENT_BINARY_DIR}/err_data.c
6  DEPENDS
7  err_data_generate.go
8  asn1.errordata
9  bio.errordata
10  bn.errordata
11  buf.errordata
12  cipher.errordata
13  conf.errordata
14  crypto.errordata
15  dh.errordata
16  digest.errordata
17  dsa.errordata
18  ecdh.errordata
19  ecdsa.errordata
20  ec.errordata
21  engine.errordata
22  evp.errordata
23  hkdf.errordata
24  obj.errordata
25  pem.errordata
26  pkcs8.errordata
27  rsa.errordata
28  ssl.errordata
29  x509.errordata
30  x509v3.errordata
31  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
32)
33
34add_library(
35  err
36
37  OBJECT
38
39  err.c
40  err_data.c
41)
42
43add_executable(
44  err_test
45
46  err_test.cc
47
48  $<TARGET_OBJECTS:test_support>
49)
50
51target_link_libraries(err_test crypto)
52