SET(CMAKE_C_FLAGS_DEBUG "-D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_RELEASE "-DDBUG_OFF -DNDEBUG")
SET(CMAKE_CXX_FLAGS_RELEASE "-DDBUG_OFF -DNDEBUG")

ADD_DEFINITIONS(-D_WINDOWS -D__WIN__)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_LIBRARY(regex debug.c regcomp.c regerror.c regexec.c regfree.c reginit.c split.c)