[8cc501] | 1 | # -*- mode: cmake; -*- |
---|
| 2 | # |
---|
| 3 | # |
---|
| 4 | |
---|
| 5 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mod2.h.cmake.in |
---|
| 6 | ${CMAKE_CURRENT_BINARY_DIR}/mod2.h) |
---|
| 7 | |
---|
| 8 | include_directories(${CMAKE_CURRENT_BINARY_DIR}) |
---|
| 9 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) |
---|
| 10 | include_directories(${CMAKE_BINARY_DIR}) |
---|
| 11 | include_directories(${CMAKE_SOURCE_DIR}) |
---|
| 12 | include_directories(${CMAKE_SOURCE_DIR}/factory) |
---|
| 13 | include_directories(${CMAKE_SOURCE_DIR}/ntl/include) |
---|
| 14 | |
---|
| 15 | include(VersionMacros) |
---|
| 16 | include(KernelMacros) |
---|
| 17 | create_version(KVERSION) |
---|
| 18 | |
---|
| 19 | set(ADD_DEFS "NOSTREAMIO;${_OSDEF};HAVE_CONFIG_H;SINGULAR") |
---|
| 20 | mk_prcopy(PRCOPY ${CMAKE_CURRENT_SOURCE_DIR}/prCopy.pl) |
---|
| 21 | |
---|
| 22 | # C++ sources which are used if part of the kernel are dynamically linked |
---|
| 23 | #if(${DL_KERNEL}) |
---|
| 24 | set(proc_dyn_srcs p_Procs_Generate.cc p_Procs_Impl.h mod2.h) |
---|
| 25 | add_executable(p_Procs_Dynamic ${proc_dyn_srcs}) |
---|
| 26 | set_target_properties(p_Procs_Dynamic PROPERTIES |
---|
| 27 | COMPILE_DEFINITIONS "p_Procs_Dynamic") |
---|
| 28 | mk_procs(DL_KERNEL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/p_Procs_Dynamic "Dynamic") |
---|
| 29 | #else(${DL_KERNEL}) |
---|
| 30 | # set(DL_KERNEL_SRCS "") |
---|
| 31 | #endif(${DL_KERNEL}) |
---|
| 32 | |
---|
| 33 | # C++ sources which are used for dynamic libraries if part of the kernel is |
---|
| 34 | # dynamically linked |
---|
| 35 | set(proc_lib_srcs ${DL_KERNEL_SRCS} p_Procs_Generate.cc) |
---|
| 36 | add_executable(p_Procs_Lib ${proc_lib_srcs}) |
---|
| 37 | set_target_properties(p_Procs_Dynamic PROPERTIES |
---|
| 38 | COMPILE_DEFINITIONS "p_Procs_Lib") |
---|
| 39 | mk_procs(DL_LIB_SRCS ${CMAKE_CURRENT_BINARY_DIR}/p_Procs_Lib "Lib") |
---|
| 40 | |
---|
| 41 | # C++ sources which are used if no parts of the kernel are dynamically linked |
---|
| 42 | set(proc_static_srcs p_Procs_Generate.cc p_Procs_Impl.h mod2.h) |
---|
| 43 | add_executable(p_Procs_Static ${proc_static_srcs}) |
---|
| 44 | set_target_properties(p_Procs_Static PROPERTIES |
---|
| 45 | COMPILE_DEFINITIONS "p_Procs_Static") |
---|
| 46 | mk_procs(STATIC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/p_Procs_Static "Static") |
---|
| 47 | |
---|
| 48 | # |
---|
| 49 | set(kernel_dl_srcs ${DL_LIB_SRCS} p_Procs_Dynamic.cc) |
---|
| 50 | set(dl_lib_srcs ${DL_LIB_SRCS} p_Procs_Lib.cc) |
---|
| 51 | set(kernel_static_srcs ${STATIC_SRCS} p_Procs_Static.cc) |
---|
| 52 | |
---|
| 53 | # |
---|
| 54 | # |
---|
| 55 | # |
---|
| 56 | # normal C++ source files |
---|
| 57 | set(kernel_srcs |
---|
| 58 | ${PRCOPY} |
---|
| 59 | clapconv.cc |
---|
| 60 | clapsing.cc |
---|
| 61 | febase.cc feread.cc feResource.cc |
---|
| 62 | ffields.cc hdegree.cc hilb.cc hutil.cc |
---|
| 63 | sca.cc gring.cc gr_kstd2.cc summator.cc ncSAMult.cc ncSACache.cc ncSAFormula.cc |
---|
| 64 | ideals.cc intvec.cc int64vec.cc |
---|
| 65 | khstd.cc kstdfac.cc |
---|
| 66 | kstd1.cc kstd2.cc kutil.cc |
---|
| 67 | longalg.cc longrat.cc longrat0.cc |
---|
| 68 | maps.cc matpol.cc misc.cc gnumpfl.cc gnumpc.cc |
---|
| 69 | rmodulo2m.cc rmodulon.cc rintegers.cc |
---|
| 70 | modulop.cc mpr_complex.cc sparsmat.cc fast_maps.cc |
---|
| 71 | fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc fglmcomb.cc |
---|
| 72 | numbers.cc polys.cc p_polys.cc polys0.cc polys1.cc polys-impl.cc |
---|
| 73 | ring.cc shortfl.cc kspoly.cc |
---|
| 74 | syz.cc syz0.cc syz1.cc syz2.cc syz3.cc |
---|
| 75 | timer.cc weight.cc |
---|
| 76 | GMPrat.cc multicnt.cc npolygon.cc semic.cc spectrum.cc splist.cc |
---|
| 77 | mod_raw.cc walkProc.cc walkMain.cc walkSupport.cc |
---|
| 78 | eigenval.cc units.cc kbuckets.cc sbuckets.cc |
---|
| 79 | mpr_inout.cc mpr_base.cc mpr_numeric.cc |
---|
| 80 | prCopy.cc p_Mult_q.cc |
---|
| 81 | pDebug.cc pInline2.cc pInline1.cc pInline0.cc |
---|
| 82 | pShallowCopyDelete.cc fast_mult.cc digitech.cc |
---|
| 83 | tgb.cc tgbgauss.cc ringgb.cc f5data.cc f5lists.cc f5gb.cc |
---|
| 84 | f5c.cc F5cLists.cc ratgring.cc shiftgb.cc gfan.cc linearAlgebra.cc |
---|
| 85 | ${KVERSION} |
---|
| 86 | weight0.c fegetopt.c fereadl.c dError.c mmstd.c |
---|
| 87 | ) |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | set(kernel_hdrs hutil.h stairc.h ideals.h |
---|
| 91 | longalg.h structs.h intvec.h int64vec.h longrat.h |
---|
| 92 | numbers.h stype.h clapconv.h maps.h |
---|
| 93 | clapsing.h matpol.h polys.h p_polys.h syz.h |
---|
| 94 | ring.h timer.h dError.h fast_maps.h |
---|
| 95 | febase.h shortfl.h mpr_complex.h mpr_global.h |
---|
| 96 | summator.h ncSAMult.h ncSACache.h sca.h gring.h ncSAFormula.h |
---|
| 97 | walkProc.h walkMain.h walkSupport.h |
---|
| 98 | ffields.h khstd.h sparsmat.h gnumpfl.h gnumpc.h |
---|
| 99 | fglm.h kstd1.h |
---|
| 100 | rmodulo2m.h rmodulon.h rintegers.h modulop.h sing_dbm.h weight.h |
---|
| 101 | fglmgauss.h fglmvec.h |
---|
| 102 | kstdfac.h kmatrix.h |
---|
| 103 | kutil.h |
---|
| 104 | dbm_sl.h polys-impl.h |
---|
| 105 | GMPrat.h multicnt.h npolygon.h semic.h spectrum.h splist.h multicnt.h |
---|
| 106 | eigenval.h units.h mod_raw.h kbuckets.h sbuckets.h |
---|
| 107 | mpr_global.h mpr_inout.h mpr_base.h mpr_numeric.h |
---|
| 108 | fegetopt.h distrib.h |
---|
| 109 | ratgring.h shiftgb.h prCopy.h prCopyMacros.h |
---|
| 110 | p_MemAdd.h p_MemCopy.h p_MemCmp.h p_Numbers.h |
---|
| 111 | pInline2.h pInline1.h pInline0.h mmalloc.h |
---|
| 112 | omSingularConfig.h pShallowCopyDelete.h |
---|
| 113 | p_Procs_Dynamic.h p_Procs_Impl.h p_Procs_Set.h |
---|
| 114 | p_Procs.h p_Procs_Static.h p_Mult_q.h gfan.h |
---|
| 115 | ) |
---|
| 116 | |
---|
| 117 | # define the libraries to be created |
---|
| 118 | add_library(kernel STATIC ${kernel_static_srcs} ${kernel_srcs}) |
---|
| 119 | set_target_properties(kernel PROPERTIES COMPILE_DEFINITIONS "${ADD_DEFS}") |
---|
| 120 | |
---|
| 121 | if(${DL_KERNEL}) |
---|
| 122 | add_library(kernel_so SHARED ${kernel_dl_srcs} ${kernel_cxx_srcs} ${kernel_c_srcs}) |
---|
| 123 | set_target_properties(kernel_so PROPERTIES COMPILE_DEFINITIONS "${ADD_DEFS}") |
---|
| 124 | endif(${DL_KERNEL}) |
---|
| 125 | |
---|
| 126 | add_library(kernel_mmalloc STATIC mmalloc.cc) |
---|
| 127 | set_target_properties(kernel_mmalloc PROPERTIES COMPILE_DEFINITIONS "${ADD_DEFS} ${CMAKE_CXX_FLAGS_DEBUG}") |
---|
| 128 | |
---|
| 129 | add_library(sg-fegetopt fegetopt.c) |
---|