From 7e7b6ec4d6ffe24c8008e7108f728104b89802c2 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Mon, 9 Sep 2019 12:06:29 +0200 Subject: [PATCH] Fix connect RESTSDK support. Remove debug output, remove overriding of the Windows C runtime flags(linker warning) do not add code that depends on restsdk if library is not going to be linked. freaking Connect --- storage/connect/CMakeLists.txt | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index 7fc73bce59e..a1234179311 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -73,10 +73,6 @@ ELSE(NOT UNIX) tabwmi.cpp tabwmi.h tabmac.cpp tabmac.h macutil.cpp macutil.h) # Add exception handling to the CONNECT project) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") - SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD") SET(IPHLPAPI_LIBRARY iphlpapi.lib) IF(MSVC AND (CMAKE_CXX_COMPILER_ID MATCHES Clang)) # Connect does not work with clang-cl @@ -322,20 +318,20 @@ ENDIF(CONNECT_WITH_MONGO) OPTION(CONNECT_WITH_REST "Compile CONNECT storage engine with REST support" ON) IF(CONNECT_WITH_REST) - MESSAGE(STATUS "=====> REST support is ON") - FIND_PACKAGE(cpprestsdk) + FIND_PACKAGE(cpprestsdk QUIET) IF (cpprestsdk_FOUND) - MESSAGE(STATUS "=====> cpprestsdk found") IF(UNIX) # INCLUDE_DIRECTORIES(${CPPRESTSDK_INCLUDE_DIR}) # If needed edit next line to set the path to libcpprest.so SET(REST_LIBRARY -lcpprest) - MESSAGE (STATUS ${REST_LIBRARY}) +# MESSAGE (STATUS ${REST_LIBRARY}) ENDIF(UNIX) - SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabrest.cpp restget.cpp tabrest.h) - add_definitions(-DREST_SUPPORT) + IF(REST_LIBRARY) + SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabrest.cpp restget.cpp tabrest.h) + add_definitions(-DREST_SUPPORT) + ENDIF() ELSE(NOT cpprestsdk_FOUND) - MESSAGE(STATUS "=====> cpprestsdk package not found") +# MESSAGE(STATUS "=====> cpprestsdk package not found") ENDIF (cpprestsdk_FOUND) ENDIF(CONNECT_WITH_REST)