Project

General

Profile

Revision 7d3c8bd3 regression_tests/lustre_files/success/kind_fmcad08/large/src/CEX/CMakeLists.txt

View differences:

regression_tests/lustre_files/success/kind_fmcad08/large/src/CEX/CMakeLists.txt
8 8
  message(FATAL_ERROR "zustre not found")
9 9
endif(ZUSTRE_COMPILER)
10 10

  
11

  
12

  
13

  
14
#first combination :no option
15
set(ZUSTRE_OPTIONS_OPT "--timeout" "60" "--xml" )
11 16
#take all lustre files
12 17
  set(GLOBAL_LUSTRE_FILES "")
13 18
  LUSTREFILES(LFILES ${CMAKE_CURRENT_SOURCE_DIR} )
......
16 21
	  get_filename_component(L ${lfile} NAME_WE)
17 22
	  set(LUSTRE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${L}")
18 23
	  file(COPY ${lfile}   DESTINATION  ${LUSTRE_OUTPUT_DIR})
24
	if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${L}.xml)
25
		file(COPY ${L}.xml   DESTINATION  ${LUSTRE_OUTPUT_DIR})
26
	else()
27
		message("generate ${L}.xml for reference\n")
28
		Zustre_Compile(LUS_FILE ${lfile}
29
					NODE "top"
30
					OPTS ${ZUSTRE_OPTIONS_OPT})
31
		set(ZUS_OPTS_CUT ${ZUSTRE_OPTS_POSTFIX_${L}})
32
		execute_process(RESULT_VARIABLE res 
33
					OUTPUT_VARIABLE ${L}_output
34
					COMMAND  ${ZUSTRE_COMPILER} ${ZUSTRE_ARGS_${L}_top_${ZUS_OPTS_CUT}} 
35
					WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
36
		if(${res} STREQUAL "0")
37
			if( ${${L}_output} MATCHES "<Answer>CEX</Answer>")
38
				message("${L} CEX")
39
				file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/${L}.xml ${${L}_output})
40
				file(COPY ${L}.xml   DESTINATION  ${LUSTRE_OUTPUT_DIR})
41
			else()
42
				message("${L} is not CEX\n ${${L}_output}")
43
			endif()
44
		else()
45
			message("${L} Error")
46
		endif()
47
	endif()
48
	  
19 49
  ENDFOREACH()
20 50

  
21 51

  
22
#first combination :no option
23
set(ZUSTRE_OPTIONS_OPT "--timeout" "60" "--xml" )
52

  
24 53

  
25 54
FOREACH(lus_file ${GLOBAL_LUSTRE_FILES})
26 55
	get_filename_component(L ${lus_file} NAME_WE)
......
40 69
					OPTS ${ZUSTRE_OPTIONS_OPT})
41 70
	set(ZUS_OPTS_CUT ${ZUSTRE_OPTS_POSTFIX_${L}})
42 71
	
43
	
72

  
44 73
	add_test(NAME Kind_fmcad08_large_CEX_COMPIL_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}
45 74
			COMMAND  ${ZUSTRE_COMPILER} ${ZUSTRE_ARGS_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}} 
46 75
			WORKING_DIRECTORY ${ZUSTRE_OUTPUT_DIR_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}}

Also available in: Unified diff