]> www.ginac.de Git - cln.git/blob - examples/CMakeLists.txt
Move GETVAL macro from acinclude.m4 to m4/getval.m4.
[cln.git] / examples / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.10)
2 project(CLN_examples)
3
4 set(cln_examples
5         contfrac
6         e
7         fibonacci
8         legendre
9         lucaslehmer
10         nextprime
11         perfnum
12         pi
13 )
14
15 if (NOT TARGET cln)
16         find_package(cln REQUIRED CONFIG)
17 endif()
18 macro(cl_add_example srcname)
19         add_executable(${srcname} ${srcname}.cc)
20         target_link_libraries(${srcname} cln::cln)
21 endmacro()
22
23 foreach(_ex ${cln_examples})
24         cl_add_example(${_ex})
25 endforeach()
26
27 install(TARGETS pi RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
28