CHECK_INCLUDE_FILE("strings.h" HAVE_STRINGS_H)
CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H)
CHECK_INCLUDE_FILE("ucontext.h" HAVE_UCONTEXT_H)
+CHECK_INCLUDE_FILE("stdio.h" HAVE_STDIO_H)
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
CHECK_FUNCTION_EXISTS(usleep HAVE_USLEEP)
set(HAVE_LUA 0)
SET(HAVE_JAVA 0)
SET(HAVE_TRACING 0)
+SET(HAVE_LATENCY_BOUND_TRACKING 0)
if(enable_tracing)
SET(HAVE_TRACING 1)
endif(enable_tracing)
+if(enable_latency_bound_tracking)
+ SET(HAVE_LATENCY_BOUND_TRACKING 1)
+endif(enable_latency_bound_tracking)
+
if(enable_model-checking AND HAVE_MMAP)
SET(HAVE_MC 1)
SET(MMALLOC_WANT_OVERIDE_LEGACY 1)
if(HAVE_CGRAPH_LIB AND HAVE_CGRAPH_H)
string(REGEX REPLACE "/libcgraph.*" "" lib_cgraph ${HAVE_CGRAPH_LIB})
string(REPLACE "/cgraph.h" "" file_cgraph_h ${HAVE_CGRAPH_H})
-
string(REGEX MATCH "-I${file_cgraph_h} " operation "${CMAKE_C_FLAGS}")
if(NOT operation)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${file_cgraph_h} ")
endif(NOT operation)
+ string(REGEX MATCH "-L${lib_cgraph} " operation "${CMAKE_C_FLAGS}")
+ if(NOT operation)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${lib_cgraph} ")
+ endif(NOT operation)
endif(HAVE_CGRAPH_LIB AND HAVE_CGRAPH_H)
+#--------------------------------------------------------------------------------------------------
+### Initialize of pcre
+find_library(PATH_PCRE_LIB pcre "/usr/lib/")
+
+if(PATH_PCRE_LIB)
+ string(REGEX REPLACE "/libpcre.*[.]so$" "" PATHLIBPCRE "${PATH_PCRE_LIB}")
+ string(REGEX MATCH "-L${PATHLIBPCRE} " operation "${CMAKE_C_FLAGS}")
+ if(NOT operation)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${PATHLIBPCRE} ")
+ endif(NOT operation)
+ set(HAVE_PCRE_LIB 1)
+else(PATH_PCRE_LIB)
+ message(FATAL_ERROR "You must have libpcre installed (please install the libpcre3-dev package or equivalent)")
+endif(PATH_PCRE_LIB)
+
#--------------------------------------------------------------------------------------------------
### Initialize of CONTEXT THREADS
"__builtin_va_copy((d),(s))"
"do { (d) = (s)\; } while (0)"
"do { *(d) = *(s)\; } while (0)"
-"memcpy((void *)&(d), (void *)&(s)), sizeof((s))"
-"memcpy((void *)(d), (void *)(s)), sizeof(*(s))"
+"memcpy((void *)&(d), (void *)&(s), sizeof(s))"
+"memcpy((void *)(d), (void *)(s), sizeof(*(s)))"
)
foreach(fct ${diff_va})
set(__VA_COPY_USE_ASP "do { *(d) = *(s); } while (0)")
endif(${fctbis} STREQUAL "do { *(d) = *(s) } while (0)")
- if(${fctbis} STREQUAL "memcpy((void *)&(d), (void *)&(s)), sizeof((s))")
+ if(${fctbis} STREQUAL "memcpy((void *)&(d), (void *)&(s), sizeof(s))")
set(ac_cv_va_copy "CPS")
- set(__VA_COPY_USE_CPS "memcpy((void *)&(d), (void *)&(s)), sizeof((s))")
- endif(${fctbis} STREQUAL "memcpy((void *)&(d), (void *)&(s)), sizeof((s))")
+ set(__VA_COPY_USE_CPS "memcpy((void *)&(d), (void *)&(s), sizeof(s))")
+ endif(${fctbis} STREQUAL "memcpy((void *)&(d), (void *)&(s), sizeof(s))")
- if(${fctbis} STREQUAL "memcpy((void *)(d), (void *)(s)), sizeof(*(s))")
+ if(${fctbis} STREQUAL "memcpy((void *)(d), (void *)(s), sizeof(*(s)))")
set(ac_cv_va_copy "CPP")
- set(__VA_COPY_USE_CPP "memcpy((void *)(d), (void *)(s)), sizeof(*(s))")
- endif(${fctbis} STREQUAL "memcpy((void *)(d), (void *)(s)), sizeof(*(s))")
+ set(__VA_COPY_USE_CPP "memcpy((void *)(d), (void *)(s), sizeof(*(s)))")
+ endif(${fctbis} STREQUAL "memcpy((void *)(d), (void *)(s), sizeof(*(s)))")
if(NOT STATUS_OK)
set(__VA_COPY_USE "__VA_COPY_USE_${ac_cv_va_copy}(d, s)")
endforeach(fct ${diff_va})
#--------------------------------------------------------------------------------------------------
-### Try execut getline command
-try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR
+### check for getline
+try_compile(COMPILE_RESULT_VAR
${PROJECT_DIRECTORY}
${PROJECT_DIRECTORY}/buildtools/Cmake/test_prog/prog_getline.c
- OUTPUT_VARIABLE GETLINE_OUTPUT
)
if(NOT COMPILE_RESULT_VAR)