Index: akeLists.txt
===================================================================
--- CMakeLists.txt	(revision 23fb95c1e215ef122b642006b6c3130ee96b8329)
+++ 	(revision )
@@ -1,373 +1,0 @@
-# -*- mode: cmake; -*-
-project(Singular)
-cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
-cmake_policy(VERSION 2.6)
-#if(POLICY CMP0011)
-#  cmake_policy(SET CMP0011 NEW)
-#endif(POLICY CMP0011)
-
-# have the full monty in makefiles
-set(CMAKE_VERBOSE_MAKEFILE true)
-
-set(V_MAJOR 3)
-set(V_MINOR 1)
-set(V_PATCH 0)
-set(VERSION_SEP "-")
-
-set(SINGULAR_SHORT_VERSION "${V_MAJOR}${VERSION_SEP}${V_MINOR}")
-set(SINGULAR_VERSION "${SINGULAR_SHORT_VERSION}${VERSION_SEP}${V_PATCH}")
-set(SINGULAR_RPM_VERSION "${V_MAJOR}.${V_MINOR}.${V_PATCH}")
-set(VERSION_DATE "2010-01-12")
-set(SINGULAR_ROOT_DIR {${PROJECT_NAME}_SOURCE_DIR}) # is ${top_srcdir}
-
-set(PROJECT_DESCRIPTION "A Computer Algebra System for Polynomial Computations")
-set(PROJECT_VENDOR      "FB Mathematik der Universitaet, D-67653 Kaiserslautern")
-set(PROJECT_COPYRIGHT   "Copyright 2009 ")
-set(PROJECT_CONTACT     "<singular@mathematik.uni-kl.de>")
-set(PROJECT_VERSION     "${V_MAJOR}.${V_MINOR}.${V_PATCH}")
-set(PROJECT_README      "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}-${V_MAJOR}.${V_MINOR}/README")
-set(PROJECT_COPYING     "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}-${V_MAJOR}.${V_MINOR}/COPYING")
-set(PROJECT_DIR         "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}")
-
-###########################################################
-# tree of dependencies (attempt)
-#
-# omalloc    ntl
-#     \      /
-#     factory
-#
-# Singular
-# kernel
-# libfac
-
-###########################################################
-# we do not want to run cmake in the source directory
-if( ${PROJECT_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
-   message(STATUS "DO not run cmake in the source directory")
-   message(STATUS "create an extra binary directory")
-   message(STATUS "Don't forget to remove CMakeCache.txt CMakeFiles")
-   message(FATAL_ERROR "Exiting cmake here.")
-endif( ${PROJECT_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
-
-#message(FATAL_ERROR "my test failed")
-
-###########################################################
-# add a path where some libraries might be stored
-set(CMAKE_ADDITIONAL_PATH "$ENV{CMAKE_ADDITIONAL_PATH}" 
-    CACHE PATH "Path where many locally installed libraries can be found")
-
-###########################################################
-# Where are the additional libraries installed? Note: provide includes
-# path here, subsequent checks will resolve everything else
-set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${CMAKE_ADDITIONAL_PATH}/include)
-set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${CMAKE_ADDITIONAL_PATH}/lib)
-set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" 
-  "${CMAKE_SOURCE_DIR}/modules" 
-  "$ENV{CMAKE_MODULE_PATH}")
-
-###########################################################
-##
-###########################################################
-OPTION(ENABLE_OMALLOC   "omalloc memory managment" ON)
-OPTION(ENABLE_GMP       "Gnu Multiple Precision package" ON)
-OPTION(ENABLE_FACTORY   "polynomial factorization library" ON)
-OPTION(ENABLE_LIBFAC    "char set and modp poly factorization library" ON)
-OPTION(ENABLE_SINGULAR  "CAS for Polynomial Computations" ON)
-OPTION(ENABLE_MP        "Multi Protocol library" OFF)
-
-###########################################################
-##
-###########################################################
-set(ENABLE_OMALLOC  On)
-set(ENABLE_GMP      On)
-set(ENABLE_FACTORY  On)
-set(ENABLE_LIBFAC   On)
-set(ENABLE_SINGULAR On)
-set(ENABLE_NTL      On)
-
-###########################################################
-##
-###########################################################
-#set(STDC_HEADERS 1)
-set(NOSTREAMIO 0)
-
-set(NTL_TARGET gen-gen)
-
-## just for test
-message(STATUS "CMAKE_SYSTEM_PROCESSOR='${CMAKE_SYSTEM_PROCESSOR}'")
-message(STATUS "CMAKE_SYSTEM='${CMAKE_SYSTEM}'")
-message(STATUS "CMAKE_SYSTEM_NAME='${CMAKE_SYSTEM_NAME}'")
-message(STATUS "CMAKE_SYSTEM_VERSION='${CMAKE_SYSTEM_VERSION}'")
-message(STATUS "PROJECT_DIR='${PROJECT_DIR}'")
-
-# OSDEF can be: x86_64_Linux
-set(_OSDEF "NDEBUG;OM_NDEBUG;${CMAKE_SYSTEM_PROCESSOR}_${CMAKE_SYSTEM_NAME}")
-#set(ADD_DEFS "NOSTREAMIO;${_OSDEF};HAVE_CONFIG_H;SINGULAR")
-set(ADD_DEFS "${_OSDEF};HAVE_CONFIG_H")
-
-###########################################################
-# add a path where some libraries might be stored
-set(CMAKE_ADDITIONAL_PATH "$ENV{CMAKE_ADDITIONAL_PATH}"
-    CACHE PATH "Path where many locally installed libraries can be found")
-
-###########################################################
-# No user settings below
-###########################################################
-message(STATUS "Have compiler: '${CMAKE_CXX_COMPILER_ID}'")
-if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-  #if (${CMAKE_BUILD_TYPE} MATCHES "Release")
-  #endif (${CMAKE_BUILD_TYPE} MATCHES "Release")
-
-  #set(CMAKE_CXX_FLAGS "-W -Wall -Wextra -Winline -Wno-non-virtual-dtor")
-  set(CMAKE_C_FLAGS "-w -pipe ")
-  set(CMAKE_CXX_FLAGS "-w  -pipe ") #-fno-rtti
-  # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-implicit-templates")
-  # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-
-  set(CMAKE_C_FLAGS_RELEASE "-O3 -fomit-frame-pointer")
-  set(CMAKE_CXX_FLAGS_RELEASE "-O3 -fno-rtti -fomit-frame-pointer")
-
-  #set(CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer -DNDEBUG ")
-  #set(CMAKE_CXX_FLAGS_RELEASE "-O2 -fomit-frame-pointer -DNDEBUG -DOM_NDEBUG")
-
-  #set(CMAKE_CXX_FLAGS_DEBUG "-Werror -O0 -g -ggdb -Wreturn-type -fno-omit-frame-pointer")
-  set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wreturn-type -fno-omit-frame-pointer")
-  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wunused-variable -Wunused-parameter")
-  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wunused-function -Wunused")
-  #set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Woverloaded-virtual")
-  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-system-headers")
-
-  #set(CMAKE_C_FLAGS_DEBUG "-Werror -O0 -g -ggdb -Wreturn-type -fno-omit-frame-pointer")
-  set(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wreturn-type -fno-omit-frame-pointer")
-  set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fno-inline-functions")
-  set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused-variable -Wunused-parameter")
-  set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused-function -Wunused")
-  set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wno-system-headers -Wall")
-
-  # gprof and gcov support
-  set(CMAKE_CXX_FLAGS_PROFILE "-O0 -g -ggdb -Wreturn-type -Woverloaded-virtual")
-#  set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_PROFILE} -Wno-system-headers -pg")
-  set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_PROFILE} -Wno-system-headers ")
-  set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_PROFILE} -fprofile-arcs -ftest-coverage")
-
-  set(CMAKE_C_FLAGS_PROFILE "-O0 -g -ggdb -Wreturn-type -Woverloaded-virtual")
-  set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} -Wno-system-headers -pg")
-  set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} -fprofile-arcs -ftest-coverage")
-endif (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-
-###########################################################
-# Where are the additional libraries installed? Note: provide includes
-# path here, subsequent checks will resolve everything else
-set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${CMAKE_ADDITIONAL_PATH}/include)
-set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${CMAKE_ADDITIONAL_PATH}/lib)
-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
-
-###########################################################
-# load requires cmake includes
-include(LibMacros)
-
-###########################################################
-### check programms
-###########################################################
-find_program(PERL_CMD perl)
-find_program(UUDECODE uudecode)
-find_program(GUNZIP gunzip)
-find_program(GZIP gzip)
-find_program(LATEX2HTML latex2html)
-
-###########################################################
-### check libraries
-###########################################################
-include(InstallRequiredSystemLibraries)
-
-
-###########################################################
-### check header files
-###########################################################
-include(FindHeader)
-check_headers(gmp.h MP.h  MPT.h factory.h factor.h omalloc.h)
-check_headers(limits.h unistd.h)
-check_headers(sys/file.h sys/ioctl.h sys/time.h sys/times.h sys/types.h
-  sys/stat.h fcntl.h sys/param.h pwd.h asm/sigcontext.h pwd.h termcap.h
-  termios.h term.h readline/readline.h readline/history.h)
-check_headers(iostream.h iostream)
-
-check_library(m)
-check_library(bsd)
-check_library(socket)
-check_library(nsl)
-check_library(gmp)
-check_library(MPT)
-check_library(readline)
-set(HAVE_LIBREADLINE 1)
-set(HAVE_READLINE 1)
-check_library(dl)
-if(${HAVE_LIBDL})
-  message(STATUS "setting dynamic kernel to yes")
-  set(DL_KERNEL 1)
-endif(${HAVE_LIBDL})
-
-include(CheckFunctionExists)
-check_funcs(popen readlink sbrk getcwd getwd)
-check_funcs(gettimeofday atexit bcopy getcwd getwd vsnprintf readlink
-  sleep usleep getpwnam popen setenv siginterrupt sysconf)
-set(TIME_WITH_SYS_TIME 1)
-
-###########################################################
-include (CheckTypeSize)
-check_type_size(int SIZEOF_INT)
-check_type_size(long SIZEOF_LONG)
-check_type_size(void* SIZEOF_VOIDP)
-check_type_size(double SIZEOF_DOUBLE)
-check_type_size(size_t SIZEOF_SIZE_T)
-
-
-###########################################################
-## set include directories
-#include_directories(${CMAKE_CURRENT_BINARY_DIR})
-#include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/factory)
-#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ntl/include)
-
-## PkgConfig is helpful
-include(FindPkgConfig)
-if ( PKG_CONFIG_FOUND )
-#   pkg_check_modules (CPPUNIT REQUIRED cppunit>=1.12)
-#   message(STATUS "CPPUnit: -I${CPPUNIT_INCLUDE_DIRS} -L${CPPUNIT_LIBRARY_DIRS} -l${CPPUNIT_LIBRARIES}")
-
-else  ( PKG_CONFIG_FOUND )
-  message(FATAL_ERROR "No PKGCONFIG found - hoping for the best.")
-  IF(WIN32)
-    # search packages by hand
-    # CPPunit
-    include(FindCppUnit)
-  ENDIF(WIN32)
-endif ( PKG_CONFIG_FOUND )
-
-if( ${CMAKE_BUILD_TYPE} MATCHES "Release")
-  set(MAKE_DISTRIBUTION 1)
-endif( ${CMAKE_BUILD_TYPE} MATCHES "Release")
-message(STATUS ">>${CMAKE_BUILD_TYPE}<<")
-message(STATUS ">>${MAKE_DISTRIBUTION}<<")
-
-###########################################################
-### check directories
-###########################################################
-set(TMPDIR ${${PROJECT_NAME}_BINARY_DIR}/tmp)
-# set various define used with configure. 
-if(ENABLE_SINGULAR)
-  SET(WITH_SINGULAR On)
-  set(WITH_SINGULARERROR On)
-endif(ENABLE_SINGULAR)
-
-# copied from configure, seems to be useless, because omalloc is now part 
-# of the project
-if(ENABLE_OMALLOC)
-  add_subdirectory(omalloc)
-else(ENABLE_OMALLOC)
-  message(FATAL_ERROR "can not build without omalloc")
-endif(ENABLE_OMALLOC)
-
-message(STATUS "Header 0: '${OMALLOC_H}'")
-if(ENABLE_NTL)
-  include(NTLMacros)
-  add_ntl(NTL_TARGET NTL_LIBRARY ${CMAKE_SOURCE_DIR}/ntl)
-  include_directories(${CMAKE_SOURCE_DIR}/ntl/include)
-  message(STATUS "Compiling with ntl target '${NTL_TARGET}'")
-else(ENABLE_NTL)
-  message(STATUS "Compiling without ntl")
-endif(ENABLE_NTL)
-
-# switch ENABLE_FACTORY ist useless. Singular does not compile without
-# factory. 
-if(ENABLE_FACTORY)
-  set(HAVE_FACTORY 1)
-  add_subdirectory(factory)
-  message(STATUS "Compiling with factory")
-else(ENABLE_FACTORY)
-  message(STATUS "Singular canot be compiled without factory.")
-endif(ENABLE_FACTORY)
-
-if(ENABLE_LIBFAC)
-  set(HAVE_LIBFAC 0)
-  add_subdirectory(libfac)
-  add_dependencies(fac ${FACTORY_TARGET})
-  message(STATUS "Compiling with libfac")
-else(ENABLE_LIBFAC)
-  message(STATUS "Compiling without libfac")
-endif(ENABLE_LIBFAC)
-
-# MP Multi-Protocol is not 64bit clean. 
-include (CheckTypeSize)
-check_type_size(long SIZEOF_LONG)
-message(STATUS "Sizeof long is ${SIZEOF_LONG}.")
-if( NOT ${SIZEOF_LONG} EQUAL 4)
-  message(STATUS "MP disabled!")
-#  set(ENABLE_MP No)
-endif(NOT ${SIZEOF_LONG} EQUAL 4)
-if(ENABLE_MP)
-  if(ENABLE_GMP)
-    add_subdirectory(MP)
-    message(STATUS "Compile with local  MP.")
-    set(WITH_MP Yes)
-  else(ENABLE_GMP)
-    set(ENABLE_MP No)
-    set(WITH_MP No)
-    message(STATUS "can not build MP without gmp.")
-  endif(ENABLE_GMP)
-endif(ENABLE_MP)
-
-add_subdirectory(kernel)
-add_subdirectory(Singular)
-
-include(CTest)
-enable_testing()
-#add_subdirectory(tests)
-
-# print configuration
-message(STATUS "Report of the settings used")
-message(STATUS "Enable Singular is .........: ${ENABLE_SINGULAR}")
-message(STATUS "Enable omalloc is ..........: ${ENABLE_OMALLOC}")
-message(STATUS "Enable gmp is ..............: ${ENABLE_GMP}")
-message(STATUS "Enable MP is ...............: ${ENABLE_MP}")
-message(STATUS "Enable factory .............: ${ENABLE_FACTORY}")
-message(STATUS "Enable libfac ..............: ${ENABLE_LIBFAC}")
-message(STATUS "Enable .....................: ${ENABLE_SINGULAR}")
-message(STATUS "Enable TexInfo .............: ${ENABLE_TEXINFO}")
-message(STATUS "Enable Texi2Html ...........: ${ENABLE_TEXI2HTML}")
-message(STATUS "Enable doc .................: ${ENABLE_DOC}")
-message(STATUS "Enable emacs ...............: ${ENABLE_EMACS}")
-
-#message(STATUS "with MP is .................: ${WITH_MP}")
-#message(STATUS "with factory ...............: ${WITH_FACTORY}")
-#message(STATUS "with libfac ................: ${WITH_LIBFAC}")
-#message(STATUS "with apint  ................: ${WITH_APINT}")
-message(STATUS "with NOSTREAMIO ............: ${WITH_NOSTREAMIO}")
-
-
-# cpack configuration
-include(InstallRequiredSystemLibraries)
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_DESCRIPTION})
-set(CPACK_PACKAGE_VENDOR ${PROJECT_VENDOR})
-set(CPACK_PACKAGE_CONTACT "<singular@mathematik.uni-kl.de>")
-set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
-set(CPACK_PACKAGE_VERSION_MAJOR "${V_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${V_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${V_PATCH}")
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
-
-# Pack rpms
-set(CPACK_RPM_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_DESCRIPTION})
-set(CPACK_RPM_PACKAGE_VENDOR ${PROJECT_VENDOR})
-set(CPACK_RPM_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
-set(CPACK_RPM_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
-set(CPACK_RPM_PACKAGE_VERSION_MAJOR "${V_MAJOR}")
-set(CPACK_RPM_PACKAGE_VERSION_MINOR "${V_MINOR}")
-set(CPACK_RPM_PACKAGE_VERSION_PATCH "${V_PATCH}")
-set(CPACK_RPM_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
-set(CPACK_SOURCE_RPM ON)
-set(CPACK_BINARY_RPM ON)
-
-include(CPack)
-
Index: ngular/CMakeLists.txt
===================================================================
--- Singular/CMakeLists.txt	(revision 23fb95c1e215ef122b642006b6c3130ee96b8329)
+++ 	(revision )
@@ -1,287 +1,0 @@
-# -*- mode: cmake; -*-
-#
-#
-
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${CMAKE_BINARY_DIR})
-include_directories(${CMAKE_SOURCE_DIR})
-
-#include_directories(${CMAKE_SOURCE_DIR}/factory)
-include_directories(${CMAKE_SOURCE_DIR}/ntl/include)
-
-add_subdirectory(LIB)
-include(SingularMacros)
-
-singular_mk_version(SINGULAR_VERSION_H)
-
-message(STATUS ">>DIST: '${MAKE_DISTRIBUTION}'")
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/distrib.h.in
-  ${CMAKE_CURRENT_BINARY_DIR}/distrib.h )
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
-#################################################################
-###  check for lex/flex and add parser files
-### 
-find_program(FLEX flex)
-
-include(LexMacros)
-check_lex_version(GEN_NEW_LEX)
-add_lex(SCANNER_CPP ${CMAKE_CURRENT_SOURCE_DIR}/scanner.l "")
-add_lex(LIBPARSE_CPP ${CMAKE_CURRENT_SOURCE_DIR}/libparse.l "yylp")
-message(STATUS "Add lex ${SCANNER_CPP}")
-message(STATUS "Add lex ${LIBPARSE_CPP}")
-
-#################################################################
-###  check for bison/yacc and grammar files
-### 
-include(BisonMacros)
-add_grammar(GRAMMAR_TARGET GRAMMAR_CPP GRAMMAR_H ${CMAKE_CURRENT_SOURCE_DIR}/grammar.y)
-
-#################################################################
-###
-###
-set(_feopt_srcs feOpt.cc mod2.h)
-add_executable(feOpt ${_feopt_srcs})
-set_target_properties(feOpt PROPERTIES
-  COMPILE_DEFINITIONS "${ADD_DEFS};GENERATE_OPTION_INDEX")
-add_dependencies(feOpt omalloc)
-#singular_generate_incfile(FEOPT_TARGET FEOPT_FILE_INC
-singular_generate_incfile(feopt_target FEOPT_FILE_INC
-  ${CMAKE_CURRENT_BINARY_DIR}/feOpt feOpt)
-#  add_custom_target(feopt_target DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/feOpt
-#    COMMAND ${CMAKE_CURRENT_BINARY_DIR}/feOpt
-#    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/feOpt
-#    COMMENT "Creating 'feopt.inc'....."
-#    )
-#add_index(FEOPT_FILE_INC ${CMAKE_CURRENT_BINARY_DIR}/feOpt feOpt)
-
-#################################################################
-###
-###
-add_executable(feOptES ${_feopt_srcs})
-set_target_properties(feOptES PROPERTIES COMPILE_DEFINITIONS "${ADD_DEFS};GENERATE_OPTION_INDEX -DESINGULAR")
-add_dependencies(feOptES omalloc)
-singular_generate_incfile(feOptES_target FEOPTES_FILE_INC
-  ${CMAKE_CURRENT_BINARY_DIR}/feOptES feOptES)
-#add_index(FEOPTES_FILE_INC ${CMAKE_CURRENT_BINARY_DIR}/feOptES feOptES)
-
-#################################################################
-###
-###
-add_executable(feOptTS ${_feopt_srcs})
-set_target_properties(feOptTS PROPERTIES COMPILE_DEFINITIONS "${ADD_DEFS};GENERATE_OPTION_INDEX -DTSINGULAR")
-add_dependencies(feOptTS omalloc)
-singular_generate_incfile(feoptsts_target FEOPTSTS_FILE_INC
-  ${CMAKE_CURRENT_BINARY_DIR}/feOptTS feOptTS)
-#add_index(FEOPTSTS_FILE_INC ${CMAKE_CURRENT_BINARY_DIR}/feOptTS feOptTS)
-
-#################################################################
-###  build gentable and create iparith.inc
-###
-
-# C++ sources which are used if no parts of the kernel are dynamically linked
-set(static_sources links/slInit_Static.cc)
-
-set(_iparith_inc_srcs  iparith.cc tesths.cc tok.h mpsr_Tok.cc mod2.h)
-add_executable(gentable ${_iparith_inc_srcs} claptmpl.cc ${static_sources})
-add_dependencies(gentable omalloc)
-set_target_properties(gentable PROPERTIES
-  COMPILE_DEFINITIONS "${ADD_DEFS};GENTABLE=1")
-
-#target_link_libraries(gentable omalloc_ndebug sing-main kernel gmp fac singcf sing-gentable ${NTL_LIBRARY} )
-#LIBS           = -lreadline -lhtmlhelp -Xlinker -Bdynamic -lgmp -lomalloc -lncurses
-
-#target_link_libraries(gentable sing-main omalloc_ndebug kernel_mmalloc)
-target_link_libraries(gentable sing-main)
-target_link_libraries(gentable kernel)
-target_link_libraries(gentable singfac)
-target_link_libraries(gentable singcf)
-target_link_libraries(gentable ${NTL_LIBRARY})
-target_link_libraries(gentable omalloc  )
-
-target_link_libraries(gentable gmp)
-target_link_libraries(gentable readline)
-target_link_libraries(gentable ncurses)
-target_link_libraries(gentable m)
-
-singular_generate_incfile(iparith_target IPARITH_INC
-  ${CMAKE_CURRENT_BINARY_DIR}/gentable iparith)
-#singular_gen_iparith(IPARITH_TARGET IPARITH_INC ${CMAKE_CURRENT_BINARY_DIR}/gentable
-#  ${_iparith_inc_srcs})
-message(STATUS "====== '${IPARITH_INC}' ====")
-
-##########
-#
-# normal C++ source files
-set(cxxsources ${GRAMMAR_CPP}  ${SCANNER_CPP} attrib.cc
-  ${LIBPARSE_CPP}
-  ${SINGULAR_VERSION_H}
-  ${FEOPT_FILE_INC}
-    eigenval_ip.cc
-    extra.cc fehelp.cc feOpt.cc
-    ipassign.cc ipconv.cc ipid.cc iplib.cc
-    ipprint.cc ipshell.cc
-    lists.cc
-    sdb.cc
-    fglm.cc interpolation.cc
-    silink.cc ssiLink.cc
-    subexpr.cc
-    janet.cc wrapper.cc
-    sing_win.cc
-    gms.cc pcv.cc maps_ip.cc
-    walk.cc walk_ip.cc
-    cntrlc.cc misc_ip.cc
-    calcSVD.cc pipeLink.cc
-    Minor.cc
-    MinorProcessor.cc
-    MinorInterface.cc
-)
-
-# C++ sources which are used if part of the kernel are dynamically linked
-set(dl_kernel_sources links/slInit_Dynamic.cc )
-
-# C++ sources which are used for dynamic libraries if part of the kernel is
-# dynamically linked
-set(dl_lib_sources "")
-
-# stuff for dbm
-set(dbmsr_sources ndbm.cc sing_dbm.cc)
-
-###
-if( ${GEN_NEW_LEX} EQUAL 1)
-  set(FLEXFLAGS ";NEW_FLEX")
-else( ${GEN_NEW_LEX} EQUAL 1)
-  set(FLEXFLAGS "")
-endif( ${GEN_NEW_LEX} EQUAL 1)
-add_library(sing-main ${cxxsources} ${dbmsr_sources})
-set_target_properties(sing-main PROPERTIES
-  COMPILE_DEFINITIONS "${ADD_DEFS}${FLEXFLAGS}")
-set_target_properties(sing-main PROPERTIES
-  COMPILE_FLAGS "-fno-implicit-templates")
-
-#message(STATUS "=== '${CMAKE_CXX_FLAGS_DEBUG}'")
-#add_library(sing-main_g ${cxxsources})
-#set_target_properties(sing-main_g PROPERTIES COMPILE_FLAGS
-#  "-fno-implicit-templates${CMAKE_CXX_FLAGS_DEBUG}")
-#
-message("Grammar creates ${GRAMMAR_CPP}...")
-message("Grammar creates ${GRAMMAR_H}...")
-
-# stuff for MP
-set(mpsr_sources mpsr_Put.cc mpsr_PutPoly.cc mpsr_GetPoly.cc mpsr_sl.cc
-        mpsr_Get.cc mpsr_GetMisc.cc mpsr_Error.cc )
-
-
-# normal C source files
-set(CSOURCES "")
-
-# C++ sources for which both, shared and static object files are needed
-set(common_sources ${mpsr_sources} ${dbmsr_sources} )
-
-# special C++ source files (need extra compiling and/or linking), for which
-# dependencies should be generated
-set(esources ${IPARITH_INC} iparith.cc ${common_sources}
-  ${dl_kernel_sources} ${dl_lib_sources} ${static_sources} ) #
-set_source_files_properties(iparith.cc PROPERTIES OBJECT_DEPENDS ${IPARITH_INC})
-
-set(sources ${csources} ${cxxsources}
-        grammar.y scanner.l libparse.l
-        utils.cc utils.h
-        tesths.cc mpsr_Tok.cc claptmpl.cc )
-
-set(headers lists.h attrib.h
-        mpsr_Tok.h
-        ipconv.h
-        subexpr.h ipid.h
-        cntrlc.h ipprint.h sdb.h
-        ipshell.h tok.h
-        links/silink.h
-        sing_dbm.h maps_ip.h interpolation.h
-        mpsr.h mpsr_sl.h
-        mpsr_Get.h janet.h
-        mpsr_Put.h walk.h
-        dbm_sl.h libparse.h
-        gms.h pcv.h eigenval_ip.h
-        walk.h
-        omSingularConfig.h)
-
-add_executable(Singular-static
-  tesths.cc iparith.cc mpsr_Tok.cc claptmpl.cc ${static_sources})
-set_target_properties(Singular-static PROPERTIES
-  COMPILE_DEFINITIONS "${ADD_DEFS}")
-
-set_target_properties(Singular-static PROPERTIES COMPILE_DEFINIIONS "${ADD_DEFS}")
-target_link_libraries(Singular-static sing-main)
-target_link_libraries(Singular-static kernel)
-target_link_libraries(Singular-static singfac)
-target_link_libraries(Singular-static singcf)
-target_link_libraries(Singular-static ${NTL_LIBRARY})
-target_link_libraries(Singular-static omalloc)
-
-target_link_libraries(Singular-static gmp)
-target_link_libraries(Singular-static readline)
-target_link_libraries(Singular-static tinfo)
-
-#add_dependencies(Singular-static ${OMALLOC_TARGET})
-add_dependencies(Singular-static gen-omalloc-h)
-add_dependencies(Singular-static omalloc)
-### add_dependencies(Singular-static iparith_target)
-install(TARGETS Singular-static DESTINATION bin)
-
-# build libparse
-set(libparse_srcs ${LIBPARSE_CPP} utils.cc)
-add_executable(libparse ${libparse_srcs})
-set_target_properties(libparse PROPERTIES
-  COMPILE_DEFINITIONS "${ADD_DEFS};STANDALONE_PARSER${FLEXFLAGS}")
-target_link_libraries(libparse sg-fegetopt)
-target_link_libraries(libparse omalloc_ndebug)
-add_dependencies(libparse omalloc)
-install(TARGETS libparse DESTINATION bin)
-
-file(GLOB LIB_srcs LIB/*lib)
-install(FILES ${LIB_srcs} DESTINATION lib/LIB)
-
-#set(libsingular_srcs ${SCANNER_CPP} ${LIBPARSE_CPP} ${IPARITH_INC}  ${static_sources}
-set(libsingular_srcs iparith.cc tesths.cc  claptmpl.cc mpsr_Tok.cc )
-
-# mod2.h SINGULAR_VERSION_H
-#target_link_libraries(singular sing-main kernel singfac singcf ntl readline gmp omalloc htmlhelp)
-
-install(FILES libsingular.h DESTINATION include)
-
-##merge_libraries(singfac singcf ntl readline gmp omalloc)
-add_library(singular_ndebug ${libsingular_srcs})
-set_target_properties(singular_ndebug PROPERTIES
-  COMPILE_DEFINITIONS "${ADD_DEFS};LIBSINGULAR")
-##merge_libraries(SINGULARLIB_TARGET GEN_LIB_A singular_ndebug kernel singfac singcf omalloc_ndebug)
-##message(STATUS "Merge-Target: '${SINGULARLIB_TARGET}'")
-##add_dependencies(singular_ndebug ${SINGULARLIB_TARGET})
-##add_dependencies(${SINGULARLIB_TARGET} ${OMALLOC_TARGET} ${IPARITH_TARGET})
-##add_dependencies(${SINGULARLIB_TARGET} singular_main kernel singfac singcf  omalloc_ndebug)
-
-install(TARGETS ${GEN_TARGET} DESTINATION lib)
-#libparse.cc scanner.cc
-
-
-#add_library(Singularg STATIC
-#  ${IPARITH_INC}
-#  tesths.cc iparith.cc mpsr_Tok.cc claptmpl.cc)
-#set_target_properties(Singularg PROPERTIES COMPILE_FLAGS ${CMAKE_CXX_FLAGS_DEBUG})
-#target_link_libraries(Singular-static sing-main kernel_g gmp fac singcf ntl omalloc)
-
-#add_library(Singularp STATIC ${IPARITH_INC}
-#  tesths.cc iparith.cc mpsr_Tok.cc claptmpl.cc)
-#set_target_properties(Singularp PROPERTIES COMPILE_FLAGS ${CMAKE_CXX_FLAGS_PROFILE})
-#target_link_libraries(Singular-static sing-main kernel_p gmp fac singcf ntl omalloc_p)
-
-#add_dependencies(extra.o feopt_target)
-#set_source_files_properties(extra.cc PROPERTIES OBJECT_DEPENDS ${FEOPT_FILE_INC})
-set_source_files_properties(${FEOPT_FILE_INC} PROPERTIES GENERATED true)
-#set_source_files_properties(feopt.h PROPERTIES OBJECT_DEPENDS feopt_target)
-#cntrlc.cc
-#extra.cc
-#fehelp.cc
-#feOpt.cc
-#mpsr_sl.cc
-#tesths.cc
Index: ngular/LIB/CMakeLists.txt
===================================================================
--- Singular/LIB/CMakeLists.txt	(revision 23fb95c1e215ef122b642006b6c3130ee96b8329)
+++ 	(revision )
@@ -1,11 +1,0 @@
-# -*- mode: cmake; -*-
-
-include(SingularMacros)
-
-file(GLOB lib_srcs *.lib)
- 
-singular_copy_LIB(${lib_srcs})
-
-# currently we do NOT create the file all.lib.
-# for now it is part of the svn-repository
-# singular_mk_allLIB(gen-lib "all.lib" ${lib_srcs})
Index: ctory/CMakeLists.txt
===================================================================
--- factory/CMakeLists.txt	(revision 23fb95c1e215ef122b642006b6c3130ee96b8329)
+++ 	(revision )
@@ -1,332 +1,0 @@
-# -*- mode: cmake; -*-
-cmake_minimum_required(VERSION 2.6)
-cmake_policy(VERSION 2.6)
-if(POLICY CMP0011)
-  cmake_policy(SET CMP0011 NEW)
-endif(POLICY CMP0011)
-
-message(STATUS "Header fac: '${OMALLOC_H}'")
-project(factory)
-string(TOUPPER ${PROJECT_NAME} UPPER_PROJECT_NAME)
-
-# have the full monty in makefiles
-set(CMAKE_VERBOSE_MAKEFILE true)
-
-set(FACTORY_VERSION_MAJOR 3)
-set(FACTORY_VERSION_MINOR 1)
-set(FACTORY_VERSION_PATCH 0)
-set(FACTORYVERSION "${FACTORY_VERSION_MAJOR}.${FACTORY_VERSION_MINOR}.${FACTORY_VERSION_PATCH}")
-set(FACTORYCONFIGURATION "xxx")
-set(GFTABLEDIR "share/factory/gftables")
-
-OPTION(WITH_OMALLOC   "omalloc memory managment" ON)
-OPTION(WITH_GMP       "specify where to find gmp library" On)
-##OPTION(WITH_SINGULAR  "build for use with Singular" Off)
-OPTION(WITH_NTL       "build for use with NTL." Off)
-##OPTION(WITH_SINGULARERROR "use error reporting from Singular" Off)
-OPTION(WITH_NOSTREAMIO    "do not require iostream include nor library" Off)
-OPTION(WITH_STREAMIO    "build Factory without stream IO" Off)
-
-OPTION(ENABLE_CF_INLINE "build Factory with \"configurable inline methods\" enabled." Off)
-OPTION(ENABLE_MEMDEBUG  "switch on memory management debugging.  Meaningful
-                          with --DWITH_MEMMAN=new' only.  <level> may be either
-                          no (default), normal, or full" Off)
-OPTION(ENABLE_ASSERTIONS "build Factory with assertions activated" Off)
-OPTION(ENABLE_TIMING     "build Factory so it will print timing information" Off)
-OPTION(ENABLE_DEBUGOUTPUT "build Factory so it will print debugging information" Off)
-OPTION(ENABLE_GMP 
-  "together with --DWITH_SINGULAR means: installation in process, be graceful when there is no gmp.h" Off)
-
-set(HAVE_NTL 1)
-set(NOASSERT 1)
-set(SINGULAR 1)
-set(HAVE_OMALLOC 1)
-#set(NOSTREAMIO 1)
-
-include(BisonMacros)
-set(OMALLOC_TARGET gen-omalloc-h)
-#set(OMALLOC_TARGET omalloc)
-#set(ADD_DEFS "NOSTREAMIO;${_OSDEF};HAVE_CONFIG_H;SINGULAR")
-set(ADD_DEFS "${_OSDEF};HAVE_CONFIG_H;SINGULAR")
-
-###################################################################################################
-# No user settings below
-###################################################################################################
-check_headers(stdio.h stdlib.h string.h time.h math.h cstdio)
-if(ENABLE_STREAMIO)
-  check_headers(iostream.h strstream.h fstream.h iostream string fstream)
-endif(ENABLE_STREAMIO)
-check_headers(ctype.h)
-check_headers(stdarg.h signal.h errno.h unistd.h)
-# endif(ENABLE_STREAMIO)
-
-# if(ENABLE_TIMING)
-check_headers(sys/param.h sys/times.h)
-# endif(ENABLE_TIMING)
-
-check_headers(omalloc.h)
-message(STATUS "=== ${HAVE_STRING_H} ==")
-
-include(FactoryMacros)
-###################################################################################################
-if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
-  message(STATUS "Have compiler: '${CMAKE_CXX_COMPILER_ID}'")
-  if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-
-    #set(CMAKE_CXX_FLAGS "-W -Wall -Wextra -Winline -Wno-non-virtual-dtor")
-    set(CMAKE_CXX_FLAGS "-w -fno-rtti -pipe ")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-implicit-templates")
-    #add_definitions(-DNDEBUG -DOM_NDEBUG -Dx86_64_Linux -DHAVE_CONFIG_H)
-
-    set(CMAKE_CXX_FLAGS_RELEASE "-O3 -fomit-frame-pointer -DNDEBUG")
-
-    set(CMAKE_CXX_FLAGS_DEBUG "-Werror -O0 -g -ggdb -Wreturn-type -fno-omit-frame-pointer")
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wunused-variable -Wunused-parameter")
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wunused-function -Wunused")
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Woverloaded-virtual -Wno-system-headers")
-
-    # gprof and gcov support
-    set(CMAKE_CXX_FLAGS_PROFILE "-O0 -g -ggdb -Wreturn-type -Woverloaded-virtual")
-    set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_PROFILE} -Wno-system-headers -pg")
-    set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_PROFILE} -fprofile-arcs -ftest-coverage")
-  endif (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
-
-###########################################################
-# Where are the additional libraries installed? Note: provide includes
-# path here, subsequent checks will resolve everything else
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${CMAKE_BINARY_DIR})
-include_directories(${CMAKE_SOURCE_DIR})
-
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in.cmake
-  ${CMAKE_CURRENT_BINARY_DIR}/config.h)
-
-factory_header(FACTORYCONF_H factoryconf.template)
-factory_header(FACTORY_H factory.template)
-factory_gen_gmp_header(FACTORY_TARGET CF_GMP_H)
-set(FACTORY_TARGET ${FACTORY_TARGET} PARENT_SCOPE)
-
-#add_definitions(-DNDEBUG -DOM_NDEBUG -Dx86_64_Linux -DHAVE_CONFIG_H)
-# factory source files
-set_source_files_properties(${OMALLOC_H} PROPERTIES GENERATED true )
-set(basefactory_srcs
-  ${OMALLOC_H}
-  ${FACTORYCONF_H} ${FACTORY_H} ${CF_GMP_H}
-  canonicalform.cc 
-  cf_algorithm.cc 
-  cf_binom.cc 
-  cf_char.cc 
-  cf_chinese.cc 
-  cf_cyclo.cc
-  cf_eval.cc 
-  cf_factor.cc 
-  cf_factory.cc 
-  cf_gcd.cc 
-  cf_gcd_charp.cc 
-  cf_gcd_smallp.cc 
-  cf_generator.cc 
-  cf_globals.cc 
-  cf_hnf.cc
-  cf_inline.cc 
-  cf_irred.cc 
-  cf_iter.cc 
-  cf_iter_inline.cc 
-  cf_linsys.cc 
-  cf_map.cc 
-  cf_map_ext.cc 
-  cf_ops.cc 
-  cf_primes.cc 
-  cf_random.cc 
-  cf_resultant.cc 
-  cf_reval.cc 
-  cf_switches.cc 
-  cf_util.cc 
-  debug.cc 
-  DegreePattern.cc
-  ExtensionInfo.cc
-  fac_berlekamp.cc 
-  fac_cantzass.cc 
-  fac_distrib.cc 
-  fac_ezgcd.cc 
-  fac_iterfor.cc 
-  fac_multihensel.cc 
-  fac_multivar.cc 
-  fac_sqrfree.cc 
-  fac_univar.cc 
-  fac_util.cc 
-  facFqBivar.cc
-  facFqBivarUtil.cc
-  facFqFactorize.cc
-  facFqFactorizeUtil.cc
-  facFqSquarefree.cc
-  facHensel.cc
-  fieldGCD.cc 
-  ffops.cc 
-  gf_tabutil.cc 
-  gfops.cc 
-  imm.cc 
-  initgmp.cc 
-  int_cf.cc 
-  int_int.cc 
-  int_intdiv.cc 
-  int_poly.cc 
-  int_pp.cc 
-  int_rat.cc 
-  sm_sparsemod.cc 
-  sm_util.cc 
-  variable.cc 
-  NTLconvert.cc 
-  abs_fac.cc 
-  bifac.cc 
-  lgs.cc
-)
-set(singfactory_srcs singext.cc)
-#set_source_files_properties(${basefactory_srcs} PROPERTIES OBJECT_DEPENDS 
-#  ${FACTORYCONF_H} ${FACTORY_H} ${CF_GMP_H})
-set(FACTORYCONF_H ${FACTORYCONF_H} PARENT_SCOPE)
-
-add_grammar(READCF_TARGET READCF_CPP READCF_H ${CMAKE_CURRENT_SOURCE_DIR}/readcf.y)
-set(useiofactory_src parseutil.cc ${READCF_CPP})
-set(distfactory_src ${basefactory_srcs} ${singfactory_srcs} ${useiofactorysrc})
-
-set(doxy_src ${basefactory_srcs} parseutil.cc)
-
-# factory header files
-set(basefactory_hdrs
-                cf_assert.h
-                canonicalform.h 
-                cf_algorithm.h 
-                cf_binom.h 
-                cf_defs.h 
-                cf_eval.h 
-                cf_factory.h 
-                cf_generator.h 
-                cf_globals.h 
-                cf_irred.h 
-                cf_iter.h 
-                cf_map.h 
-                cf_primes.h 
-                cf_primetab.h 
-                cf_random.h 
-                cf_reval.h 
-                cf_switches.h 
-                cf_util.h 
-                debug.h 
-                fac_berlekamp.h 
-                fac_cantzass.h 
-                fac_distrib.h 
-                fac_iterfor.h 
-                fac_multivar.h 
-                fac_sqrfree.h 
-                fac_univar.h 
-                fac_util.h 
-                fieldGCD.h 
-                ffops.h 
-                ffreval.h 
-                ftmpl_array.h 
-                ftmpl_factor.h 
-                ftmpl_functions.h 
-                ftmpl_list.h 
-                ftmpl_matrix.h 
-                gf_tabutil.h 
-                gfops.h 
-                gmpext.h 
-                imm.h 
-                int_cf.h 
-                int_int.h 
-                int_poly.h 
-                int_pp.h 
-                int_rat.h 
-                sm_sparsemod.h 
-                sm_util.h 
-                timing.h 
-                variable.h 
-                NTLconvert.h 
-                bifac.h 
-                bifacConfig.h 
-                lgs.h 
-                algext.h
-)
-
-#SET_SOURCE_FILES_PROPERTIES(${basefactory_srcs} 
-#  OBJECT_DEPENDS ../omalloc/omalloc.h})
-
-set(singfactory_hdrs singext.h)
-set(useiofactory_hdrs parseutil.h)
-set(distfactory_hdrs ${basefactory_hdrs} ${singfactory_hdrs} ${useiofactory_hdrs})
-set(doxy_hdrs ${basefactory_hdrs} parseutil.h)
-
-# memory manager source files
-set(basememman_src newdelete.cc)
-set(newmemman_src 
-                mmalloc.c 
-                mmallocb.c 
-                mmallocs.c 
-                mmblock.c 
-                mmheap.c 
-                mminit.c 
-                mmspec.c 
-                mmutil.c
-)
-set(oldmemman_src memutil.c)
-set(distmemman_src ${basememmansrc} ${newmemmansrc} ${oldmemmansrc})
-
-# memory manager header files
-set(newmemman_hdrs mmprivate.h memman.h)
-set(oldmemman_hdrs memutil.h)
-set(distmemman_hdrs ${newmemman_hdrs} ${oldmemman_hdrs})
-
-# factory template files
-set(template_src
-  ftmpl_array.cc 
-  ftmpl_factor.cc 
-  ftmpl_functions.h 
-  ftmpl_list.cc 
-  ftmpl_matrix.cc
-)
-set_source_files_properties(${template_srcs} PROPERTIES OBJECT_DEPENDS 
-  ${FACTORYCONF_H} ${FACTORY_H} ${CF_GMP_H})
-set(template_hdrs
-                ftmpl_array.h 
-                ftmpl_factor.h 
-                ftmpl_list.h 
-                ftmpl_matrix.h
-)
-
-# header templates
-set(hdrtempl_src factoryconf.template  factory.template)
-##set(hdrtempl_dep $(hdrtemplsrc:.template=.d)
-
-# FTE source files
-set(ftest_src   ftest_io.cc ftest_util.cc ntl_util.cc)
-
-# FTE header files
-set(ftest_hdrs  ftest_io.h ftest_util.h ntl_util.h)
-
-# define libraries
-#add_library(cf ${FACTORYCONF_H} ${basefactory_srcs})
-add_library(cf ${basefactory_srcs} ${singfactory_srcs})
-set_target_properties(cf PROPERTIES COMPILE_DEFINITIONS "${ADD_DEFS}")
-add_dependencies(cf ${OMALLOC_TARGET})
-add_dependencies(cf ${NTL_TARGET})
-
-#
-# libraries for Singular
-if( WITH_SINGULAR )
-  # define libraries
-  message(STATUS "Compiling factory for Singular: creating libfactory.a")
-  add_library(singcf ${basefactory_srcs} ${singfactory_srcs})
-  set_target_properties(singcf PROPERTIES COMPILE_DEFINITIONS "${ADD_DEFS}")
-  add_dependencies(singcf ${OMALLOC_TARGET} ${NTL_TARGET})
-else( WITH_SINGULAR )
-  message(STATUS "Disabled creation of libfactory.a")
-endif( WITH_SINGULAR )
-
-
-add_library(mem-old ${oldmemman_src})
-set_target_properties(mem-old PROPERTIES COMPILE_DEFINITIONS "${ADD_DEFS}")
-
-add_library(mem-new ${newmemman_src})
-set_target_properties(mem-new PROPERTIES COMPILE_DEFINITIONS "${ADD_DEFS}")
Index: ctory/libfac/CMakeLists.txt
===================================================================
--- factory/libfac/CMakeLists.txt	(revision 23fb95c1e215ef122b642006b6c3130ee96b8329)
+++ 	(revision )
@@ -1,124 +1,0 @@
-# -*- mode: cmake; -*-
-cmake_minimum_required(VERSION 2.6)
-cmake_policy(VERSION 2.6)
-if(POLICY CMP0011)
-  cmake_policy(SET CMP0011 NEW)
-endif(POLICY CMP0011)
-
-project(libfac)
-string(TOUPPER ${PROJECT_NAME} UPPER_PROJECT_NAME)
-
-# have the full monty in makefiles
-set(CMAKE_VERBOSE_MAKEFILE true)
-
-set(LIBFAC_V_MAJOR 3)
-set(LIBFAC_V_MINOR 1)
-set(LIBFAC_V_PATCH 0)
-set(LIBFAC_NAME   "Factorization and characteristic sets library")
-set(LIBFAC_DATE   "Aug 2008")
-set(LIBFAC_AUTHOR "M. Messollen")
-
-#OPTION(WITH_SINGULAR "build for use with Singular" Off)
-#OPTION(WITH_SINGULARERROR "use error reporting from Singular" Off)
-OPTION(WITH_NOSTREAMIO    "do not require iostream include nor library" Off)
-set(ADD_DEFS "NOSTREAMIO;${_OSDEF};HAVE_CONFIG_H;SINGULAR")
-
-
-###################################################################################################
-# No user settings below
-###################################################################################################
-include(LibfacMacros)
-
-###################################################################################################
-if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
-  message(STATUS "Have compiler: '${CMAKE_CXX_COMPILER_ID}'")
-  if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-
-    #set(CMAKE_CXX_FLAGS "-W -Wall -Wextra -Winline -Wno-non-virtual-dtor")
-    set(CMAKE_CXX_FLAGS "-w -fno-rtti -pipe ")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-implicit-templates")
-    #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-
-    set(CMAKE_CXX_FLAGS_RELEASE "-O3 -fomit-frame-pointer -DNDEBUG")
-
-    set(CMAKE_CXX_FLAGS_DEBUG "-Werror -O0 -g -ggdb -Wreturn-type -fno-omit-frame-pointer")
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wunused-variable -Wunused-parameter")
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wunused-function -Wunused")
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Woverloaded-virtual -Wno-system-headers")
-
-    # gprof and gcov support
-    set(CMAKE_CXX_FLAGS_PROFILE "-O0 -g -ggdb -Wreturn-type -Woverloaded-virtual")
-    set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_PROFILE} -Wno-system-headers -pg")
-    set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_PROFILE} -fprofile-arcs -ftest-coverage")
-  endif (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
-
-###########################################################
-# Where are the additional libraries installed? Note: provide includes
-# path here, subsequent checks will resolve everything else
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/charset)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/factor)
-include_directories(${CMAKE_BINARY_DIR})
-include_directories(${CMAKE_SOURCE_DIR})
-include_directories(${CMAKE_BINARY_DIR}/factory)
-include_directories(${CMAKE_SOURCE_DIR}/factory)
-
-libfac_mk_version(LIBFAC_VERSION_H)
-
-
-##
-## src and objects
-##
-
-set(FACTORSRC1  factor/SqrFree.cc factor/Factor.cc 
-		factor/MVMultiHensel.cc factor/Truefactor.cc 
-		factor/helpstuff.cc  factor/version.cc 
-		factor/homogfactor.cc )
-set(FACTORSRC2 	factor/tmpl_inst.cc)
-set(FACTORSRC  	${FACTORSRC2} ${FACTORSRC1})
-
-
-set(FACTORINCL 	${LIBFAC_VERSION_H} 
-  factor/Factor.h factor/MVMultiHensel.h
-  factor/Truefactor.h factor/tmpl_inst.h factor/SqrFree.h
-  factor/helpstuff.h factor/debug.h factor/timing.h 
-  factor/homogfactor.h     factor/interrupt.h)
-set(CHARSETINCL charset/csutil.h charset/charset.h charset/reorder.h
-  charset/alg_factor.h charset/algfactor.h)
-
-set(charset_srcs  charset/csutil.cc charset/charset.cc
-  charset/reorder.cc charset/alg_factor.cc charset/algfactor.cc
-)
-
-# define libraries
-add_library(fac ${LIBFAC_VERSION_H} ${FACTORSRC} ${CHARSETSRC})
-set_source_files_properties(${FACTORSRC} PROPERTIES OBJECT_DEPENDS 
-  ${FACTORYCONF_H})
-#add_dependencies(fac ${FACTORY_TARGET})
-
-# debug library
-#add_library(fac_g ${LIBFAC_VERSION_H} ${FACTORSRC} ${CHARSETSRC})
-#set_target_properties(fac_g PROPERTIES COMPILE_FLAGS ${CMAKE_CXX_FLAGS_DEBUG})
-
-# profile library
-#add_library(fac_p ${LIBFAC_VERSION_H} ${FACTORSRC} ${CHARSETSRC})
-#set_target_properties(fac_p PROPERTIES COMPILE_FLAGS ${CMAKE_CXX_FLAGS_PROFILE})
-
-#
-# libraries for Singular
-if( WITH_SINGULAR )
-  message(STATUS "Compiling libfac for Singular: creating libsingfac.a")
-  add_library(singfac ${LIBFAC_VERSION_H} ${FACTORSRC1} ${charset_srcs})
-  set_target_properties(singfac PROPERTIES 
-    COMPILE_DEFINITION "${ADD_DEFS};SINGULAR")
-
-#  # debug library
-#  add_library(singfac_g ${LIBFAC_VERSION_H} ${FACTORSRC1} ${charset_srcs})
-#  set_target_properties(singfac_g PROPERTIES COMPILE_FLAGS "-DSINGULAR ${CMAKE_CXX_FLAGS_DEBUG}")
-
-#  # profile library
-#  add_library(singfac_p ${LIBFAC_VERSION_H} ${FACTORSRC1} ${charset_srcs})
-#  set_target_properties(singfac_p PROPERTIES COMPILE_FLAGS "-DSINGULAR ${CMAKE_CXX_FLAG_PROFILE}")
-endif( WITH_SINGULAR )
Index: rnel/CMakeLists.txt
===================================================================
--- kernel/CMakeLists.txt	(revision 23fb95c1e215ef122b642006b6c3130ee96b8329)
+++ 	(revision )
@@ -1,129 +1,0 @@
-# -*- mode: cmake; -*-
-#
-#
-
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mod2.h.cmake.in
-  ${CMAKE_CURRENT_BINARY_DIR}/mod2.h)
-
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${CMAKE_BINARY_DIR})
-include_directories(${CMAKE_SOURCE_DIR})
-include_directories(${CMAKE_SOURCE_DIR}/factory)
-include_directories(${CMAKE_SOURCE_DIR}/ntl/include)
-
-include(VersionMacros)
-include(KernelMacros)
-create_version(KVERSION)
-
-set(ADD_DEFS "NOSTREAMIO;${_OSDEF};HAVE_CONFIG_H;SINGULAR")
-mk_prcopy(PRCOPY ${CMAKE_CURRENT_SOURCE_DIR}/prCopy.pl)
-
-# C++ sources which are used if part of the kernel are dynamically linked
-#if(${DL_KERNEL})
-set(proc_dyn_srcs p_Procs_Generate.cc p_Procs_Impl.h mod2.h)
-add_executable(p_Procs_Dynamic ${proc_dyn_srcs})
-set_target_properties(p_Procs_Dynamic PROPERTIES
-  COMPILE_DEFINITIONS "p_Procs_Dynamic")
-mk_procs(DL_KERNEL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/p_Procs_Dynamic "Dynamic")
-#else(${DL_KERNEL})
-#  set(DL_KERNEL_SRCS "")
-#endif(${DL_KERNEL})
-
-# C++ sources which are used for dynamic libraries if part of the kernel is
-# dynamically linked
-set(proc_lib_srcs ${DL_KERNEL_SRCS} p_Procs_Generate.cc)
-add_executable(p_Procs_Lib ${proc_lib_srcs})
-set_target_properties(p_Procs_Dynamic PROPERTIES
-  COMPILE_DEFINITIONS "p_Procs_Lib")
-mk_procs(DL_LIB_SRCS ${CMAKE_CURRENT_BINARY_DIR}/p_Procs_Lib "Lib")
-
-# C++ sources which are used if no parts of the kernel are dynamically linked
-set(proc_static_srcs p_Procs_Generate.cc p_Procs_Impl.h mod2.h)
-add_executable(p_Procs_Static ${proc_static_srcs})
-set_target_properties(p_Procs_Static PROPERTIES
-  COMPILE_DEFINITIONS "p_Procs_Static")
-mk_procs(STATIC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/p_Procs_Static "Static")
-
-#
-set(kernel_dl_srcs     ${DL_LIB_SRCS} p_Procs_Dynamic.cc)
-set(dl_lib_srcs        ${DL_LIB_SRCS} p_Procs_Lib.cc)
-set(kernel_static_srcs ${STATIC_SRCS} p_Procs_Static.cc)
-
-#
-#
-#
-# normal C++ source files
-set(kernel_srcs
-  ${PRCOPY}
-  clapconv.cc
-  clapsing.cc
-    febase.cc feread.cc feResource.cc
-    ffields.cc hdegree.cc hilb.cc hutil.cc
-    sca.cc gring.cc gr_kstd2.cc summator.cc ncSAMult.cc ncSACache.cc ncSAFormula.cc
-    ideals.cc intvec.cc int64vec.cc
-    khstd.cc kstdfac.cc
-    kstd1.cc kstd2.cc kutil.cc
-    longalg.cc longrat.cc longrat0.cc
-    maps.cc matpol.cc misc.cc gnumpfl.cc gnumpc.cc
-    rmodulo2m.cc rmodulon.cc rintegers.cc
-    modulop.cc mpr_complex.cc sparsmat.cc fast_maps.cc
-    fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc fglmcomb.cc
-    numbers.cc polys.cc p_polys.cc polys0.cc polys1.cc polys-impl.cc
-    ring.cc shortfl.cc kspoly.cc
-    syz.cc syz0.cc syz1.cc syz2.cc syz3.cc
-    timer.cc weight.cc
-    GMPrat.cc multicnt.cc npolygon.cc semic.cc spectrum.cc splist.cc
-    mod_raw.cc walkProc.cc walkMain.cc walkSupport.cc
-    eigenval.cc units.cc kbuckets.cc sbuckets.cc
-    mpr_inout.cc mpr_base.cc mpr_numeric.cc
-    prCopy.cc p_Mult_q.cc
-    pDebug.cc pInline2.cc pInline1.cc pInline0.cc
-    pShallowCopyDelete.cc fast_mult.cc digitech.cc
-    tgb.cc tgbgauss.cc ringgb.cc f5data.cc f5lists.cc f5gb.cc
-    f5c.cc F5cLists.cc ratgring.cc shiftgb.cc gfan.cc linearAlgebra.cc
-    ${KVERSION}
-    weight0.c fegetopt.c fereadl.c dError.c mmstd.c
-)
-
-
-set(kernel_hdrs hutil.h stairc.h ideals.h
-        longalg.h structs.h intvec.h int64vec.h longrat.h
-        numbers.h stype.h clapconv.h maps.h
-        clapsing.h matpol.h polys.h p_polys.h syz.h
-        ring.h timer.h dError.h fast_maps.h
-        febase.h shortfl.h mpr_complex.h mpr_global.h
-        summator.h ncSAMult.h ncSACache.h sca.h gring.h ncSAFormula.h
-        walkProc.h walkMain.h walkSupport.h
-        ffields.h khstd.h sparsmat.h gnumpfl.h gnumpc.h
-        fglm.h kstd1.h
-        rmodulo2m.h rmodulon.h rintegers.h modulop.h sing_dbm.h weight.h
-        fglmgauss.h fglmvec.h
-        kstdfac.h kmatrix.h
-        kutil.h
-        dbm_sl.h polys-impl.h
-        GMPrat.h multicnt.h npolygon.h semic.h spectrum.h splist.h multicnt.h
-        eigenval.h units.h mod_raw.h kbuckets.h sbuckets.h
-        mpr_global.h mpr_inout.h mpr_base.h mpr_numeric.h
-        fegetopt.h distrib.h
-        ratgring.h shiftgb.h prCopy.h prCopyMacros.h
-        p_MemAdd.h p_MemCopy.h p_MemCmp.h p_Numbers.h
-        pInline2.h pInline1.h pInline0.h mmalloc.h
-        omSingularConfig.h pShallowCopyDelete.h
-        p_Procs_Dynamic.h p_Procs_Impl.h p_Procs_Set.h
-        p_Procs.h p_Procs_Static.h p_Mult_q.h gfan.h
-        )
-
-# define the libraries to be created
-add_library(kernel STATIC ${kernel_static_srcs} ${kernel_srcs})
-set_target_properties(kernel PROPERTIES COMPILE_DEFINITIONS "${ADD_DEFS}")
-
-if(${DL_KERNEL})
-  add_library(kernel_so SHARED ${kernel_dl_srcs} ${kernel_cxx_srcs} ${kernel_c_srcs})
-  set_target_properties(kernel_so PROPERTIES COMPILE_DEFINITIONS "${ADD_DEFS}")
-endif(${DL_KERNEL})
-
-add_library(kernel_mmalloc STATIC mmalloc.cc)
-set_target_properties(kernel_mmalloc PROPERTIES COMPILE_DEFINITIONS "${ADD_DEFS} ${CMAKE_CXX_FLAGS_DEBUG}")
-
-add_library(sg-fegetopt fegetopt.c)
Index: alloc/CMakeLists.txt
===================================================================
--- omalloc/CMakeLists.txt	(revision 23fb95c1e215ef122b642006b6c3130ee96b8329)
+++ 	(revision )
@@ -1,276 +1,0 @@
-# -*- mode: cmake; -*-
-project(omalloc)
-
-# have the full monty in makefiles
-set(CMAKE_VERBOSE_MAKEFILE true)
-
-set(V_MAJOR 1)
-set(V_MINOR 24)
-set(V_PATCH RC1)
-
-set(WITH_MALLOC "system")
-
-OPTION(WITH_EXTERNAL_CONFIG_H "use HEADER_FILE for external configuration")
-OPTION(WITH_EXTERNAL_config_c "use C_FILE for external implementations")
-OPTION(WITH_MALLOC "system|dlmalloc|gmalloc|pmalloc|external which malloc to use, default: malloc")
-OPTION(WITH_EXTERNAL_MALLOC_H "use HEADER_FILE for external malloc declaration")
-OPTION(WITH_EXTERNAL_MALLOC_C "use C_FILE for external malloc implementation")
-OPTION(WITH_VALLOC "mmap|system|emulate how to get page-aligned memory, default: use first possible")
-OPTION(WITH_PROVIDE_MALLOC "yes|debug|malloc provide normal|debug|underlying malloc ANSI-C conforming versions of malloc|calloc|realloc|free")
-OPTION(WITH_EMULATE_OMALLOC "provide only omallocs interface, but do not use its features")
-OPTION(WITH_ALIGN "8|sloppy|strict how memory is aligned, default: if possible sloppy, else strict")
-OPTION(WITH_DENSE_BINS "use dense bin distribution")
-OPTION(WITH_INLINE "do not inline")
-OPTION(WITH_DEBUG "disable all debugging facilities")
-OPTION(WITH_TRACK "disable debug tracking functionality")
-OPTION(WITH_TRACK_FL "track file and line numbers")
-OPTION(WITH_TRACK_RETURN "track return addresses")
-OPTION(WITH_TRACK_BACKTRACE "track stack backtraces")
-OPTION(WITH_TRACK_CUSTOM "track custom values")
-OPTION(WITH_INTERNAL_DEBUG "turn on internal debugging")
-
-set(EXTERNAL_CONFIG_SOURCE "")
-set(EXTERNAL_CONFIG_HEADER "")
-
-###########################################################
-# add a path where some libraries might be stored
-set(CMAKE_ADDITIONAL_PATH "$ENV{CMAKE_ADDITIONAL_PATH}"
-    CACHE PATH "Path where many locally installed libraries can be found")
-
-###########################################################
-# No user settings below
-###########################################################
-cmake_minimum_required(VERSION "2.6" FATAL_ERROR)
-
-# check if compiled standalone
-if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
-  set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
-  set(OM_HAVE_EXTERNAL_CONFIG_H 0)
-  set(OM_TRACK_CUSTOM 0)
-
-else(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
-
-  set(EXTERNAL_CONFIG_HEADER "${CMAKE_SOURCE_DIR}/Singular/omSingularConfig.h")
-  set(OM_HAVE_EXTERNAL_CONFIG_H 1)
-  set(OM_TRACK_CUSTOM 1)
-  message(STATUS "OM_HAVE_EXTERNAL_CONFIG_H='${OM_HAVE_EXTERNAL_CONFIG_H}'")
-endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
-
-#
-set(CMAKE_C_FLAGS "")
-set(CMAKE_CXX_FLAGS "")
-
-set(CMAKE_C_FLAGS_RELEASE "-g -O3 -DNDEBUG")
-set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 -DNDEBUG")
-
-set(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wreturn-type -fno-omit-frame-pointer")
-set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fno-inline-functions")
-set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -W -Wall -Wextra -Winline")
-set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wreturn-type -fno-omit-frame-pointer")
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-inline-functions")
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -W -Wall -Wextra -Winline")
-
-set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_DEBUG} -Werror -pedantic")
-set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_DEBUG} -Werror -pedantic")
-
-include(FindHeader)
-
-check_headers(limits.h)
-check_headers(unistd.h sys/mman.h fcntl.h malloc.h)
-set(HAVE_FCNTL_H 1)
-set(HAVE_SYS_MMAN_H 1)
-
-include(CheckFunctionExists)
-check_funcs(popen readlink getcwd getwd mmap sbrk random)
-
-include (CheckTypeSize)
-check_type_size(int SIZEOF_INT)
-check_type_size(long SIZEOF_LONG)
-check_type_size(void* SIZEOF_VOIDP)
-check_type_size(double SIZEOF_DOUBLE)
-check_type_size(size_t SIZEOF_SIZE_T)
-
-if(NOT ${SIZEOF_LONG} EQUAL ${SIZEOF_VOIDP})
-  message(FATAL_ERROR "need equal sizes for long and void*")
-endif(NOT ${SIZEOF_LONG} EQUAL ${SIZEOF_VOIDP})
-
-if(NOT ${SIZEOF_VOIDP} EQUAL 4)
-  if(NOT ${SIZEOF_VOIDP} EQUAL 8)
-    message(FATAL_ERROR "need void* to be 4 or 8 bytes long")
-  endif(NOT ${SIZEOF_VOIDP} EQUAL 8)
-endif(NOT ${SIZEOF_VOIDP} EQUAL 4)
-
-if(NOT ${SIZEOF_DOUBLE} EQUAL 4)
-  if(NOT ${SIZEOF_DOUBLE} EQUAL 8)
-    message(FATAL_ERROR "need double* to be 4 or 8 bytes long")
-  endif(NOT ${SIZEOF_DOUBLE} EQUAL 8)
-endif(NOT ${SIZEOF_DOUBLE} EQUAL 4)
-
-## which malloc to use
-## OPTION(WITH_MALLOC "system|dlmalloc|gmalloc|pmalloc|external default: malloc")
-include(CreateOmallocHeader)
-include(OMallocMacros)
-
-set(OM_INLINE_DECL "static inline")
-set(OM_INLINE_LOCAL "static inline")
-set(OM_INLINE_IMPL "static inline")
-set(OM_INLINE "static inline")
-set(OM_PROG_ADDR2LINE "addr2line")
-set(HAVE_WORKING_MMAP Yes)
-set(STDC_HEADERS Yes)
-set(OM_GET_RETURN_ADDR_WORKS Yes)
-set(OM_GET_BACKTRACE_WORKS 0)
-set(OM_HAVE_VALLOC_MMAP 1)
-set(OM_HAVE_VALLOC_MALLOC 0)
-set(OM_ALIGN_8 1)
-set(OM_TRACK_FILE_LINE 0)
-set(OM_HAVE_TRACK 1)
-set(OM_TRACK_RETURN 1)
-set(OM_TRACK_BACKTRACE 0)
-set(OM_INTERNAL_DEBUG 0)
-
-
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${CMAKE_BINARY_DIR})
-include_directories(${CMAKE_SOURCE_DIR})
-
-###
-omalloc_header(OM_MALLOC_HEADER OM_MALLOC_SOURCE
-               OM_HAVE_MALLOC_SOURCE OMALLOC_USES_MALLOC
-               ${WITH_MALLOC})
-message(STATUS "Malloc header        : '${OM_MALLOC_HEADER}'")
-message(STATUS "Malloc source        : '${OM_MALLOC_SOURCE}'")
-message(STATUS "OMALLOC_USES_MALLOC  : '${OMALLOC_USES_MALLOC}'")
-message(STATUS "OM_HAVE_MALLOC_SOURCE: '${OM_HAVE_MALLOC_SOURCE}'")
-
-###
-### configure files
-###
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/omConfig.h.cmake.in
-  ${CMAKE_CURRENT_BINARY_DIR}/omConfig.h)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/omlimits.h.cmake.in
-  ${CMAKE_CURRENT_BINARY_DIR}/omlimits.h)
-configure_file(${OM_MALLOC_HEADER}
-  ${CMAKE_CURRENT_BINARY_DIR}/omMalloc.h)
-
-if( NOT ${EXTERNAL_CONFIG_HEADER} STREQUAL "" )
-  message(STATUS "=============2")
-  configure_file(${EXTERNAL_CONFIG_HEADER}
-    ${CMAKE_CURRENT_BINARY_DIR}/omExternalConfig.h COPYONLY)
-endif( NOT ${EXTERNAL_CONFIG_HEADER} STREQUAL "" )
-
-###
-### compile and Create omTables
-###
-set(omTables_srcs omAllocPrivate.h
-  ${CMAKE_CURRENT_BINARY_DIR}/omConfig.h omTables.c
-  ${CMAKE_CURRENT_BINARY_DIR}/omlimits.h mylimits.h)
-add_executable(omTables ${omTables_srcs})
-set_target_properties(omTables PROPERTIES
-  COMPILE_DEFINIIONS "HAVE_CONFIG_H;OM_GENERATE_INC")
-
-omalloc_create_omtables_inc(OMTABLES_TARGET OMTABLES_INC
-  ${CMAKE_CURRENT_BINARY_DIR}/omTables omTables)
-
-omalloc_create_omtables_h(TARGET_OMTABLES OMTABLES_H
-  ${CMAKE_CURRENT_BINARY_DIR}/omTables omTables)
-
-## Hello Kai: we finally got rid of makeheader :) please adapt the line below
-set(OMALLOC_H "${CMAKE_CURRENT_BINARY_DIR}/omalloc.h")
-omalloc_create_omalloc_h(gen-omalloc-h ${OMALLOC_H}
-  ${CMAKE_CURRENT_SOURCE_DIR}/makeheader
-  ${CMAKE_CURRENT_SOURCE_DIR}/omalloc.h ${OMTABLES_H} ${TARGET_OMTABLES})
-set(OMALLOC_H ${OMALLOC_H} PARENT_SCOPE)
-
-message(STATUS "Header file omalloc: '${OMALLOC_H}'")
-set_source_files_properties(omalloc.c PROPERTIES OBJECT_DEPENDS ${OMALLOC_H})
-set_source_files_properties(omalloc_debug.c PROPERTIES OBJECT_DEPENDS ${OMALLOC_H})
-set_source_files_properties(omAllocFunc.c PROPERTIES OBJECT_DEPENDS ${OMALLOC_H})
-set_source_files_properties(omalloc_provide.c PROPERTIES OBJECT_DEPENDS ${OMALLOC_H})
-
-###########################################################
-# set variables with source files first
-set(omalloc_c_srcs
-  omBinPage.c omList.c omAllocEmulate.c
-  omDebug.c om_Alloc.c omDebugCheck.c omOpts.c omGetBackTrace.c
-  omAllocSystem.c omError.c omStats.c omRet2Info.c  omBin.c  omFindExec.c
-  omDebugTrack.c  omalloc_provide.c omAllocFunc.c
-  )
-
-set(omalloc_hdrs
-  ${CMAKE_CURRENT_BINARY_DIR}/omlimits.h
-  ${CMAKE_CURRENT_BINARY_DIR}/omConfig.h
-  mylimits.h omalloc.h omList.h omDerivedConfig.h omAllocDecl.h
-  omMemOps.h omDebug.h omOpts.h omInlineDecl.h omAllocPrivate.h
-  omError.h omPage.h omAllocSystem.h omFindExec.h omStats.h omBin.h
-  omDefaultConfig.h omStructs.h omBinPage.h omInline.h omGetBackTrace.h
-  omReturn.h omRet2Info.h omAllocFunc.h)
-
-set(omalloc_srcs ${omalloc_c_srcs} omGetPageSize.h omMallocSystem.h
-# omMmap.c omTables.c
-#gmalloc.c   pmalloc.h pmalloc.c omalloc.c omalloc_debug.c
-#omtTestAlloc.c
-  ${TESTSOURCES}  ${omalloc_hdrs})
-
-if( EXTERNAL_CONFIG_SOURCE)
-  set(GSOURCES ${GSOURCES} omExternalConfig.c)
-endif( EXTERNAL_CONFIG_SOURCE)
-
-if(${OM_MALLOC_SOURCE})
-  set(GSOURCES ${GSOURCES} omMalloc.c)
-endif(${OM_MALLOC_SOURCE})
-
-message(STATUS "omalloc_srcs='${omalloc_srcs}'")
-
-#set(_OMALLOC_TARGET "gen-omalloc")
-#add_custom_target(${_OMALLOC_TARGET} DEPENDS ${OMALLOC_H})
-#set(OMALLOC_TARGET ${_OMALLOC_TARGET} PARENT_SCOPE)
-#set_source_files_properties(${OMALLOC_H} GENERATED)
-
-#set_source_files_properties(${omalloc_c_srcs} PROPERTIES OBJECT_DEPENDS ${OMALLOC_H})
-
-###########################################################
-
-###########################################################
-
-###SET_SOURCE_FILES_PROPERTIES(omalloc.c OBJECT_DEPENDS ${OMALLOC_H})
-
-
-
-set(TESTSOURCES "")
-# gmalloc.c
-# dlmalloc.h dlmalloc.c
-
-# define libraries
-
-add_library(omalloc ${OMTABLES_INC} ${OMTABLES_H} ${omalloc_srcs})
-set_target_properties(omalloc PROPERTIES
-  COMPILE_DEFINITIONS HAVE_CONFIG_H)
-add_dependencies(omalloc ${TARGET_OMTABLES})
-add_dependencies(omalloc gen-omalloc-h)
-
-add_library(omalloc_ndebug ${OMALLOC_H} ${OMTABLES_INC} ${OMTABLES_H}
-  ${omalloc_srcs})
-set_target_properties(omalloc_ndebug PROPERTIES
-  COMPILE_DEFINITIONS "HAVE_CONFIG_H;OM_NDEBUG")
-
-add_library(omalloc-small ${OMALLOC_H} omalloc.c)
-set_target_properties(omalloc-small PROPERTIES
-  COMPILE_DEFINITIONS HAVE_CONFIG_H)
-
-add_library(omalloc-small_ndebug ${OMALLOC_H} omalloc.c)
-set_target_properties(omalloc-small_ndebug PROPERTIES
-  COMPILE_DEFINITIONS "HAVE_CONFIG_H;OM_NDEBUG")
-
-###########################################################
-## Install
-install(TARGETS omalloc omalloc_ndebug omalloc-small omalloc-small_ndebug
-  ARCHIVE DESTINATION lib
-)
-install(FILES ${OMALLOC_H} omalloc.c mylimits.h
-  DESTINATION include/Singular/omalloc
-)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/omlimits.h
-  DESTINATION include/Singular/omalloc
-)
Index: sts/CMakeLists.txt
===================================================================
--- tests/CMakeLists.txt	(revision 23fb95c1e215ef122b642006b6c3130ee96b8329)
+++ 	(revision )
@@ -1,30 +1,0 @@
-# -*- mode: cmake; -*-
-#
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${${PROJECT_NAME}_SOURCE_DIR})
-include_directories(${${PROJECT_NAME}_SOURCE_DIR}/kernel)
-include_directories(${${PROJECT_NAME}_SOURCE_DIR}/factory)
-
-# include directories should be solved
-#include_directories(${${PROJECT_NAME}_SOURCE_DIR}/Singular)
-include_directories(${${PROJECT_NAME}_SOURCE_DIR}/omalloc)
-include_directories(${${PROJECT_NAME}_SOURCE_DIR}/x86_64-Linux/include )
-
-
-add_subdirectory(Singular)
-add_subdirectory(kernel)
-
-set(test_srcs main.cpp
-#	Singleton.cpp
-  )
-
-add_executable(Singular_test_suite ${test_srcs})
-target_link_libraries(Singular_test_suite Singular-test)
-target_link_libraries(Singular_test_suite ${${PROJECT_NAME}_SOURCE_DIR}/omalloc/libomalloc.a)
-
-#target_link_libraries(Singular_test_suite Singular-test)
-
-# adding the tests
-add_test(Singular_test_suite ${CMAKE_CURRENT_BINARY_DIR}/Singular_test_suite)
-
Index: sts/Singular/CMakeLists.txt
===================================================================
--- tests/Singular/CMakeLists.txt	(revision 23fb95c1e215ef122b642006b6c3130ee96b8329)
+++ 	(revision )
@@ -1,37 +1,0 @@
-# -*- mode: cmake; -*-
-#
-
-## add the CPPUNIT stuff
-include_directories(${CPPUNIT_INCLUDE_DIRS})
-link_directories(${CPPUNIT_LIBRARY_DIRS})
-
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
-include_directories(${${PROJECT_NAME}_SOURCE_DIR})
-include_directories(${${PROJECT_NAME}_SOURCE_DIR}/kernel)
-include_directories(${${PROJECT_NAME}_SOURCE_DIR}/Singular)
-include_directories(${${PROJECT_NAME}_SOURCE_DIR}/omalloc)
-include_directories(${${PROJECT_NAME}_SOURCE_DIR}/factory)
-
-link_directories(${${PROJECT_NAME}_SOURCE_DIR}/x86_64-Linux/lib/)
-link_directories(${${PROJECT_NAME}_SOURCE_DIR}/kernel)
-link_directories(${${PROJECT_NAME}_SOURCE_DIR}/Singular)
-
-file(GLOB test_srcs "test_*.cpp" )
-file(GLOB test_hdrs "*.hpp")
-
-add_library(Singular-test ${test_hdrs} ${test_srcs} utils.cpp)
-target_link_libraries(Singular-test
-  cppunit
-  ${${PROJECT_NAME}_SOURCE_DIR}/Singular/libsingular.a
-  ${${PROJECT_NAME}_SOURCE_DIR}/Singular/libsingular-tesths.o
-  gmp readline
-  ${CPPUNIT_STATIC_LIBRARIES}
-  )
-
-#add_executable(Singular_test_suite ${CMAKE_CURRENT_SOURCE_DIR}/../main.cpp)
-#target_link_libraries(Singular_test_suite Singular-test)
-
-# adding the tests
-#add_test(Singular_test_suite ${CMAKE_CURRENT_BINARY_DIR}/Singular_test_suite)
Index: sts/kernel/CMakeLists.txt
===================================================================
--- tests/kernel/CMakeLists.txt	(revision 23fb95c1e215ef122b642006b6c3130ee96b8329)
+++ 	(revision )
@@ -1,3 +1,0 @@
-# -*- mode: cmake; -*-
-#
-
