test
diff --git a/CMakeLists.txt b/CMakeLists.txt
index de7f7ae..1c88066 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
+
+string(REPLACE "-O2" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+string(REPLACE "-O2" "" CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS})
+
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
message("${CMAKE_MODULE_PATH}")
@@ -39,7 +43,7 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer")
set(OPENSSL_NO_ASM "1")
set(LIBC++ ON)
-endif()
+endif(MSAN)
if (ASAN)
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
@@ -49,12 +53,12 @@
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer")
set(OPENSSL_NO_ASM "1")
-endif()
+endif(ASAN)
if (GCOV)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
+endif(GCOV)
if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} )
message( FATAL_ERROR "In-source builds not allowed. Please make a new directory (usually called build) and run CMake from there. You may need to remove CMakeCache.txt." )
@@ -95,6 +99,7 @@
#Openssl
hunter_add_package(OpenSSL)
find_package(OpenSSL REQUIRED)
+include_directories(${OPENSSL_INCLUDE_DIR})
#g3 logging
# G3logger does some unfortunate compile options, so cheat a little bit and copy/paste
@@ -141,9 +146,7 @@
#Zlib
hunter_add_package(ZLIB)
find_package(ZLIB REQUIRED)
-
-# C++ GSL (Guideline support libraries)
-include_directories(gsl-lite/include)
+include_directories(${ZLIB_INCLUDE_DIRS})
set(WEBSERVER_MAIN src/webserver_main.cpp)
@@ -216,15 +219,12 @@
add_executable(unittest ${HDR_FILES} ${SRC_FILES} ${UT_FILES})
target_link_libraries(unittest gmock gtest)
target_link_libraries(unittest pthread)
- if (${HUNTER_ENABLED})
- target_link_libraries(unittest OpenSSL::SSL OpenSSL::Crypto)
- else()
- target_link_libraries(unittest ssl crypto)
- endif (${HUNTER_ENABLED})
- target_link_libraries(unittest ssl crypto)
target_link_libraries(unittest g3logger)
+
+ target_link_libraries(unittest ${OPENSSL_LIBRARIES})
target_link_libraries(unittest ${ZLIB_LIBRARIES})
add_dependencies(unittest packagestaticcpp)
+
endif(${BUILD_UT})
# web static assets
@@ -233,15 +233,11 @@
# bmcweb
add_executable(bmcweb ${WEBSERVER_MAIN} ${HDR_FILES} ${SRC_FILES})
target_link_libraries(bmcweb pthread)
-if (${HUNTER_ENABLED})
- target_link_libraries(bmcweb OpenSSL::SSL OpenSSL::Crypto)
-else()
- target_link_libraries(bmcweb ssl crypto)
-endif (${HUNTER_ENABLED})
target_link_libraries(bmcweb g3logger)
+target_link_libraries(bmcweb ${OPENSSL_LIBRARIES})
target_link_libraries(bmcweb ${ZLIB_LIBRARIES})
-add_dependencies(bmcweb packagestaticcpp)
target_link_libraries(bmcweb ${DBUS_LIBRARIES})
+add_dependencies(bmcweb packagestaticcpp)
install (TARGETS bmcweb DESTINATION bin)
# dbus
diff --git a/crow/include/crow/http_connection.h b/crow/include/crow/http_connection.h
index 34d31a0..d13f26e 100644
--- a/crow/include/crow/http_connection.h
+++ b/crow/include/crow/http_connection.h
@@ -441,6 +441,7 @@
CROW_LOG_DEBUG << "Foo1";
error_while_reading = false;
}
+ CROW_LOG_DEBUG << "FooA";
}
CROW_LOG_DEBUG << "Foo3";
if (error_while_reading) {
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index 027c926..bda58d0 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -148,7 +148,7 @@
methods = read_dbus_xml_names(xml_data);
}
- fprintf(stdout, "Found %ld sensors \n", methods.size());
+ fprintf(stdout, "Found %zd sensors \n", methods.size());
for (auto& method : methods) {
// TODO(Ed) make sure sensor exposes SensorValue interface
@@ -313,7 +313,7 @@
LOG(DEBUG) << "Building SSL context";
auto ssl_context = ensuressl::get_ssl_context(ssl_pem_file);
int port = 18080;
-
+
LOG(DEBUG) << "Starting webserver on port " << port;
app.port(port)
//.ssl(std::move(ssl_context))