Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / kind_fmcad08 / CMakeLists.txt @ 7a4e6825

History | View | Annotate | Download (1.96 KB)

1
cmake_minimum_required(VERSION 2.8.4)
2

    
3

    
4

    
5
set(ZUSTRE_OPTIONS_OPT "--timeout" "60" "--xml" )
6
set(LUSTRE_OPTIONS_OPT "" )
7
set(NODE_NAME  "top")
8
set(MAX_INPUT_VALUE 100)
9

    
10

    
11
#proceed all subdirectories
12
SUBDIRLIST(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR}  "")
13
FOREACH(subdir ${SUBDIRS})
14
  LUSTREFILES(LFILES ${subdir} )
15
  set(TESTS_PREFIX "kind_fmcad08_${subdir}")
16
  set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${subdir}")
17
  set(DST_DIR "${CMAKE_CURRENT_BINARY_DIR}/${subdir}")
18
  FOREACH(lus_file ${LFILES})
19
	get_filename_component(L ${lus_file} NAME_WE)
20
	Copy_or_generate_lusi_input_and_output_values_for_reference(
21
		LUS_FILE ${lus_file}
22
		NODE ${NODE_NAME}
23
		OPTS ${LUSTRE_OPTIONS_OPT}
24
		MAX ${MAX_INPUT_VALUE}  	#maximum value for input values.
25
		SRC_DIR ${SRC_DIR}
26
		DST_DIR ${DST_DIR}
27
	)
28
        if(EXISTS ${ZUSTRE_COMPILER})
29
	Copy_or_generate_zustre_output_xml_for_reference(
30
		LUS_FILE ${lus_file}
31
		NODE ${NODE_NAME}
32
		OPTS ${ZUSTRE_OPTIONS_OPT}
33
		SRC_DIR ${SRC_DIR}
34
		DST_DIR ${DST_DIR}
35
	)
36
	
37
	Zustre_compile_and_compare_to_reference(
38
		LUS_FILE ${lus_file}
39
		NODE ${NODE_NAME}
40
		TESTS_PREFIX ${TESTS_PREFIX}
41
		OPTS ${ZUSTRE_OPTIONS_OPT}
42
		CALL_ID "1"
43
		SRC_DIR ${SRC_DIR}
44
		DST_DIR ${DST_DIR}
45
	)
46
	if(EXISTS ${CMAKE_BINARY_DIR}/modules/XPathParser_lusi.class 
47
		AND ${ZUSTRE_ANSWER_${L}_${NODE_NAME}} STREQUAL "CEX" 
48
		AND EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${L}/${L}.lusi)
49
		Compare_Zustre_and_Lustrec_outputs(
50
			LUS_FILE ${lus_file}
51
			NODE ${NODE_NAME}
52
			TESTS_PREFIX ${TESTS_PREFIX}
53
			OPTS ${ZUSTRE_OPTIONS_OPT}
54
			CALL_ID "2"
55
			SRC_DIR ${SRC_DIR}
56
			DST_DIR ${DST_DIR}
57
		)
58
	endif()
59
      endif()
60
      Lustre_compile_and_compare_to_reference(
61
		LUS_FILE ${lus_file}
62
		NODE ${NODE_NAME}
63
		TESTS_PREFIX ${TESTS_PREFIX}
64
		OPTS ${LUSTRE_OPTIONS_OPT}
65
		CALL_ID "3"
66
		SRC_DIR ${SRC_DIR}
67
		DST_DIR ${DST_DIR}
68
	)
69
	
70
  ENDFOREACH()
71
  add_custom_target(${TESTS_PREFIX} COMMAND ${CMAKE_CTEST_COMMAND} -R ${TESTS_PREFIX})
72
ENDFOREACH()
73

    
74
add_custom_target(kind_fmcad08 COMMAND ${CMAKE_CTEST_COMMAND} -R kind_fmcad08)