lustrec-tests / regression_tests / lustre_files / success / kind_fmcad08 / large / SAFE / CMakeLists.txt @ b8dc00eb
History | View | Annotate | Download (1.82 KB)
1 |
cmake_minimum_required(VERSION 2.8.4) |
---|---|
2 |
|
3 |
|
4 |
|
5 |
if(ZUSTRE_COMPILER) |
6 |
message(STATUS "Found zustre: ${ZUSTRE_COMPILER} ") |
7 |
else(ZUSTRE_COMPILER) |
8 |
message(FATAL_ERROR "zustre not found") |
9 |
endif(ZUSTRE_COMPILER) |
10 |
|
11 |
#take all lustre files |
12 |
set(GLOBAL_LUSTRE_FILES "") |
13 |
LUSTREFILES(LFILES ${CMAKE_CURRENT_SOURCE_DIR} ) |
14 |
list(APPEND GLOBAL_LUSTRE_FILES ${LFILES}) |
15 |
FOREACH(lfile ${LFILES}) |
16 |
get_filename_component(L ${lfile} NAME_WE) |
17 |
set(LUSTRE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${L}") |
18 |
file(COPY ${lfile} DESTINATION ${LUSTRE_OUTPUT_DIR}) |
19 |
ENDFOREACH() |
20 |
|
21 |
|
22 |
#first combination :no option |
23 |
set(ZUSTRE_OPTIONS_OPT "--timeout" "60" "--xml" ) |
24 |
|
25 |
FOREACH(lus_file ${GLOBAL_LUSTRE_FILES}) |
26 |
get_filename_component(L ${lus_file} NAME_WE) |
27 |
set(ZUSTRE_NODE_OPT "top") |
28 |
|
29 |
Lustre_Compile(LUS_FILE ${lus_file} |
30 |
NODE "" |
31 |
OPTS "-horn") |
32 |
|
33 |
set(LUS_OPTS_CUT ${LUSTRE_OPTS_POSTFIX_${L}}) |
34 |
add_test(NAME Kind_fmcad08_large_SAFE_COMPIL_LUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT} |
35 |
COMMAND ${LUSTRE_COMPILER} ${LUSTREC_ARGS_${L}_${LUSTRE_NODE_OPT}_${LUS_OPTS_CUT}} |
36 |
) |
37 |
|
38 |
Zustre_Compile(LUS_FILE ${lus_file} |
39 |
NODE ${ZUSTRE_NODE_OPT} |
40 |
OPTS ${ZUSTRE_OPTIONS_OPT}) |
41 |
set(ZUS_OPTS_CUT ${ZUSTRE_OPTS_POSTFIX_${L}}) |
42 |
|
43 |
|
44 |
add_test(NAME Kind_fmcad08_large_SAFE_COMPIL_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT} |
45 |
COMMAND ${ZUSTRE_COMPILER} ${ZUSTRE_ARGS_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}} |
46 |
WORKING_DIRECTORY ${ZUSTRE_OUTPUT_DIR_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}} |
47 |
) |
48 |
SET_TESTS_PROPERTIES ( Kind_fmcad08_large_SAFE_COMPIL_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT} |
49 |
PROPERTIES PASS_REGULAR_EXPRESSION "<Answer>SAFE</Answer>" |
50 |
DEPENDS Kind_fmcad08_large_SAFE_COMPIL_LUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}) |
51 |
|
52 |
|
53 |
ENDFOREACH() |
54 |
|
55 |
add_custom_target(Kind_fmcad08_large_SAFE COMMAND ${CMAKE_CTEST_COMMAND} -R Kind_fmcad08_large_SAFE) |
56 |
|