Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / CMakeLists.txt @ 952e86fa

History | View | Annotate | Download (2.72 KB)

1
cmake_minimum_required(VERSION 2.8.4)
2
project (lustrec-tests)
3
include( CTest )
4
include(FindJava)
5

    
6

    
7
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/modules)
8
include(./modules/Lustre_compile.cmake)
9
include(./modules/Zustre_compile.cmake)
10
include(./modules/helpful_functions.cmake)
11
include(./modules/strategies.cmake)
12

    
13
if(LUSTRE_COMPILER)
14
  message(STATUS "lustrec: ${LUSTRE_COMPILER} ")
15
else(LUSTRE_COMPILER)
16
  message(FATAL_ERROR "lustrec not found")
17
endif(LUSTRE_COMPILER)
18

    
19

    
20
if(ZUSTRE_COMPILER)
21
  message(STATUS "Found zustre: ${ZUSTRE_COMPILER} ")
22
else(ZUSTRE_COMPILER)
23
  message(STATUS "Zustre not found")
24
endif(ZUSTRE_COMPILER)
25

    
26

    
27
if(JAVA_COMPILE AND EXISTS ${PROJECT_SOURCE_DIR}/modules/XPathParser_lusi.java)
28
	file(COPY ${PROJECT_SOURCE_DIR}/modules/XPathParser_lusi.java ${PROJECT_SOURCE_DIR}/modules/javax.xml-1.3.4.jar  DESTINATION  ${CMAKE_BINARY_DIR}/modules)
29
	execute_process(			COMMAND ${JAVA_COMPILE} -classpath "'.;javax.xml-1.3.4.jar;'" XPathParser_lusi.java 
30
						WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/modules 
31
						)
32
	#add_custom_target (XPathParser_lusi ALL
33
	#	DEPENDS ${CMAKE_BINARY_DIR}/modules/XPathParser_lusi.class)
34
else()
35
	message("javac not found")
36
endif()
37

    
38
if(JAVA_COMPILE AND EXISTS ${PROJECT_SOURCE_DIR}/modules/Generate_inputs_lusi.java)
39
	file(COPY ${PROJECT_SOURCE_DIR}/modules/Generate_inputs_lusi.java   DESTINATION  ${CMAKE_BINARY_DIR}/modules)
40
	execute_process(#OUTPUT  ${CMAKE_BINARY_DIR}/modules/Generate_inputs_lusi.class 
41
						COMMAND ${JAVA_COMPILE}  Generate_inputs_lusi.java 
42
						WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/modules 
43
						)
44
	#add_custom_target (Generate_inputs_lusi ALL
45
	#	DEPENDS ${CMAKE_BINARY_DIR}/modules/Generate_inputs_lusi.class)
46
else()
47
	message("javac not found")
48
endif()
49

    
50

    
51
if(JAVA_COMPILE AND EXISTS ${PROJECT_SOURCE_DIR}/modules/compare_lustrec_outputs.java)
52
	file(COPY ${PROJECT_SOURCE_DIR}/modules/compare_lustrec_outputs.java   DESTINATION  ${CMAKE_BINARY_DIR}/modules)
53
	execute_process(
54
			COMMAND ${JAVA_COMPILE}  compare_lustrec_outputs.java
55
			WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/modules 
56
			)
57
else()
58
	message("javac not found")
59
endif()
60

    
61

    
62
add_subdirectory(lustre_files)
63

    
64
    
65
if(NOT EXISTS ${ZUSTRE_COMPILER})
66
message(WARNING "Zustre is not available and associated tests will not be performed!")  
67
endif()
68

    
69

    
70
if(SUBPROJ)
71
  if(NOT ${SUBPROJ} MATCHES "master")
72
    message(STATUS "Specific project: ${SUBPROJ}, commit to lustrec-unstable")
73
    set(SUBPROJ unstable)
74
  else()
75
    message(STATUS "Main project: commit to lustrec-master")
76
  endif()
77
else()
78
  message(STATUS "No specific project specified: commit to lustrec-master")
79
  set(SUBPROJ master)
80
endif()
81

    
82
# set(SUBPROJ "master")
83
message("subproj: ${SUBPROJ}")
84
set(BUILDNAME "${LUSTRE_COMPILER_VERSION}" CACHE STRING "Compiled with
85
${LUSTRE_COMPILER_VERSION} ")
86

    
87

    
88