source: git/modules/LibfacMacros.cmake @ fec53d

fieker-DuValspielwiese
Last change on this file since fec53d was 8cc501, checked in by Kai Krüger <krueger@…>, 14 years ago
Added files to compile with cmake. Still experimental. Might not work git-svn-id: file:///usr/local/Singular/svn/trunk@13240 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 663 bytes
Line 
1# -*- mode: cmake; -*-
2#
3#
4#
5
6function(libfac_mk_version GEN_H_FILE)
7  set(_GEN_H_FILE ${CMAKE_CURRENT_BINARY_DIR}/version.h)
8  set(_version "${LIBFAC_V_MAJOR}.${LIBFAC_V_MINOR}.${LIBFAC_V_PATCH}")
9
10  file(WRITE  ${_GEN_H_FILE} "/* generated by cmake */\n")
11  file(APPEND ${_GEN_H_FILE} "/**\n")
12  file(APPEND ${_GEN_H_FILE} "   ${LIBFAC_NAME}\n")
13  file(APPEND ${_GEN_H_FILE} "  @author ${LIBFAC_AUTHOR}\n")
14  file(APPEND ${_GEN_H_FILE} "*/\n")
15
16
17  file(APPEND ${_GEN_H_FILE} "#define LIBFAC_VERSION \"${_version}\"\n")
18  file(APPEND ${_GEN_H_FILE} "#define LIBFAC_DATE    \"${LIBFAC_DATE}\"\n")
19
20  set(${GEN_H_FILE} ${${GEN_H_FILE}} PARENT_SCOPE)
21endfunction()
Note: See TracBrowser for help on using the repository browser.