From 3478becf9e3093792fcb4431a05061c071b2a3b6 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Sat, 16 Nov 2013 12:00:16 +0100 Subject: [PATCH 1/2] add BUILD_DOCUMENTATION option --- CMakeLists.txt | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e925136..9b4693b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -941,20 +941,27 @@ ENDIF() ############################################################################## # Documentation -FIND_PACKAGE(Doxygen) +OPTION( + VMIME_BUILD_DOCUMENTATION + "Build documentation" + ON +) -IF(DOXYGEN_FOUND) - CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile @ONLY) +IF(VMIME_BUILD_DOCUMENTATION) + FIND_PACKAGE(Doxygen) - # Make a target so that documentation can be generated by running "make doc" - ADD_CUSTOM_TARGET( - doc - ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMENT "Generating API documentation with Doxygen" VERBATIM - ) -ENDIF(DOXYGEN_FOUND) + IF(DOXYGEN_FOUND) + CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile @ONLY) + # Make a target so that documentation can be generated by running "make doc" + ADD_CUSTOM_TARGET( + doc + ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen" VERBATIM + ) + ENDIF(DOXYGEN_FOUND) +ENDIF(VMIME_BUILD_DOCUMENTATION) ############################################################################## # Sanity checks From eff0db4cc99d57574db50d5ae87b3904ab578718 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 21 Nov 2013 20:41:31 +0100 Subject: [PATCH 2/2] Removed BDAT-related code from SMTP test unrelated to BDAT. --- tests/net/smtp/SMTPTransportTestUtils.hpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/tests/net/smtp/SMTPTransportTestUtils.hpp b/tests/net/smtp/SMTPTransportTestUtils.hpp index b74f9783..bc9a9ec5 100644 --- a/tests/net/smtp/SMTPTransportTestUtils.hpp +++ b/tests/net/smtp/SMTPTransportTestUtils.hpp @@ -456,13 +456,11 @@ public: bigMessageSMTPTestSocket() { m_state = STATE_NOT_CONNECTED; - m_bdatChunkCount = 0; m_ehloSent = m_mailSent = m_rcptSent = m_quitSent = false; } ~bigMessageSMTPTestSocket() { - VASSERT_EQ("BDAT chunk count", 3, m_bdatChunkCount); VASSERT("Client must send the QUIT command", m_quitSent); } @@ -476,22 +474,6 @@ public: void onDataReceived() { - if (m_state == STATE_DATA) - { - if (m_bdatChunkReceived != m_bdatChunkSize) - { - const size_type remaining = m_bdatChunkSize - m_bdatChunkReceived; - const size_type received = localReceiveRaw(NULL, remaining); - - m_bdatChunkReceived += received; - } - - if (m_bdatChunkReceived == m_bdatChunkSize) - { - m_state = STATE_COMMAND; - } - } - processCommand(); } @@ -584,8 +566,6 @@ private: }; int m_state; - int m_bdatChunkCount; - int m_bdatChunkSize, m_bdatChunkReceived; bool m_ehloSent, m_mailSent, m_rcptSent, m_quitSent; };