source: git/modules/TestMacros.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: 1.3 KB
Line 
1# -*- mode: cmake; -*-
2#
3#
4#
5
6function(singular_create_test GEN_TARGET GEN_FILE CMD INFILE) 
7
8  message("create testsuite...")
9#  set(${GEN_FILE} ${INFILE} PARENT_SCOPE)
10  string(REGEX REPLACE "/" "-" _NAME ${INFILE})
11  set(_GEN_TARGET "${_NAME}-gen")
12  set(_GEN_FILE   "${CMAKE_CURRENT_BINARY_DIR}/${_NAME}")
13  set(_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/regress.cmd")
14  set(_TESTFILE "${CMAKE_CURRENT_SOURCE_DIR}/${INFILE}")
15#  add_custom_command(OUTPUT ${_GEN_FILE}
16#    COMMAND ${PERL_CMD} ${_SCRIPT} -r -s ${CMD} ${_TESTFILE}
17#    COMMAND touch ${_GEN_FILE}
18#
19#    DEPENDS ${INFILE} ${CMD} ${_SCRIPT}
20#    COMMENT "Running testsuite '${INFILE}'..."
21#    )
22  add_custom_target(${_GEN_TARGET} ALL
23    COMMAND ${PERL_CMD} ${_SCRIPT} -r -s ${CMD} ${_TESTFILE}
24    DEPENDS ${INFILE} ${CMD} ${_SCRIPT}
25    COMMENT "Running testsuite '${INFILE}'..."
26    )
27
28#  add_custom_target(${_GEN_TARGET} DEPENDS ${_GEN_FILE} )
29
30#add_custom_target(Name [ALL] [command1 [args1...]]
31#                    [COMMAND command2 [args2...] ...]
32#                    [DEPENDS depend depend depend ... ]
33#                    [WORKING_DIRECTORY dir]
34#                    [COMMENT comment] [VERBATIM]
35#                    [SOURCES src1 [src2...]])
36  set(${GEN_FILE}   ${_GEN_FILE}   PARENT_SCOPE)
37  set(${GEN_TARGET} ${_GEN_TARGET} PARENT_SCOPE)
38
39endfunction()
Note: See TracBrowser for help on using the repository browser.