add_executable(e2etest
               e2etest.cc
               e2espec.cc
               ${GETTIMEOFDAY_VS})
target_link_libraries(e2etest forestdb)


# add test target
# add_test(e2etest e2etest)
ADD_CUSTOM_TARGET(e2etests
    COMMAND ctest
)

add_executable(e2etest
               e2etest.cc
               e2espec.cc
               ${GETTIMEOFDAY_VS})
target_link_libraries(e2etest forestdb)


# add test target
IF (_ENABLE_E2E_TEST EQUAL 1)
    add_test(e2etest e2etest)
    ADD_CUSTOM_TARGET(e2etests
        COMMAND ctest
    )
ENDIF()

Define _ENABLE_E2E_TEST to enable e2e test optionally.
Define _ENABLE_E2E_TEST to enable e2e test optionally.

% cmake -DCMAKE_BUILD_TYPE=Debug -D_ENABLE_E2E_TEST=1 ../

Change-Id: I4678e125909b6e3377e5599027884c523072bb9b
