cmake_minimum_required(VERSION 2.8.9)
project(email_gateway)
set(RUN_UNIT_TEST "yes")
IF (DEFINED RUN_UNIT_TEST)
    set(CMAKE_BUILD_TYPE Debug)
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage -fprofile-arcs -ftest-coverage")
    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage -lgcov")
ENDIF(DEFINED RUN_UNIT_TEST)
add_subdirectory(lib_util lib_util/build)
add_subdirectory(lib_email lib_email/build)
add_subdirectory(unit_test unit_test/build)

cmake_minimum_required(VERSION 2.8.9)
project(email_gateway)
set(RUN_UNIT_TEST "yes")
IF (DEFINED RUN_UNIT_TEST)
    set(CMAKE_BUILD_TYPE Debug)
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage -fprofile-arcs -ftest-coverage -fsanitize=address")
    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage -lgcov")
ENDIF(DEFINED RUN_UNIT_TEST)
add_subdirectory(lib_util lib_util/build)
add_subdirectory(lib_email lib_email/build)
add_subdirectory(unit_test unit_test/build)

Use address sanitizer for unit_test
Use address sanitizer for unit_test
