diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..130b119d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(src) \ No newline at end of file diff --git a/setup.sh b/setup.sh index 10a365b1..e4769423 100755 --- a/setup.sh +++ b/setup.sh @@ -9,12 +9,12 @@ export QUICKFAST_ROOT=`readlink -f $SOURCE_DIR` if test "$MPC_ROOT" = "" then - export MPC_ROOT=$ACE_ROOT/MPC + export MPC_ROOT=/usr/lib/ace/MPC fi if test "$BOOST_ROOT" = "" then - export BOOST_ROOT=~/boost/boost_1_38_0 + export BOOST_ROOT=/usr/include/boost fi if test "$BOOST_ROOT_LIB" = "" @@ -24,17 +24,17 @@ fi if test "$BOOST_VERSION" = "" then - export BOOST_VERSION=boost-1_38 + export BOOST_VERSION=boost-1_74 fi if test "$XERCES_ROOT" = "" then - export XERCES_ROOT=~/xerces/xerces-c-3.0.1 + export XERCES_ROOT=/usr/include/xercesc fi if test "$XERCES_LIBPATH" = "" then - export XERCES_LIBPATH=$XERCES_ROOT/src/.libs + export XERCES_LIBPATH=/usr/lib/x86_64-linux-gnu fi if test "$XERCES_LIBNAME" = "" diff --git a/src/Application/DecoderConnection.h b/src/Application/DecoderConnection.h index 99ed938c..c83e55a2 100644 --- a/src/Application/DecoderConnection.h +++ b/src/Application/DecoderConnection.h @@ -19,6 +19,8 @@ #include #include +#include "boost/asio.hpp" + namespace QuickFAST{ namespace Application{ /// @brief Support a single source of FAST encoded data. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 00000000..b5a5b399 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,46 @@ +add_library(QuickFAST STATIC) + +find_package(Boost REQUIRED) + +#Function to Glob all files by extension +function(GET_FILES NAME DIR EXTENSION) + file(GLOB_RECURSE FILES + ${CMAKE_CURRENT_SOURCE_DIR}/${DIR}/*${EXTENSION} + ) + set(${NAME} ${FILES} PARENT_SCOPE) +endfunction() + +#CPP Source Files +GET_FILES(Application_CPP Application .cpp) +GET_FILES(Codecs_CPP Codecs .cpp) +GET_FILES(Common_CPP Common .cpp) +GET_FILES(Communication_CPP Communication .cpp) +GET_FILES(Messages_CPP Messages .cpp) + +#Header Directory +target_include_directories(QuickFAST PRIVATE .) + +target_sources(QuickFAST + PRIVATE + ${Application_CPP} + ${Codecs_CPP} + ${Common_CPP} + ${Communication_CPP} + ${Messages_CPP} + ) + +target_compile_definitions(QuickFAST + PUBLIC + BOOST_BIND_GLOBAL_PLACEHOLDERS + ASIOSERVICE_FWD_H) + +find_package(Boost COMPONENTS date_time filesystem system thread ...) +find_package(XercesC COMPONENTS sax ...) + +target_link_libraries(QuickFAST + PUBLIC + ${Boost_LIBRARIES} + ${XercesC_LIBRARIES} + ) + +add_subdirectory(Examples) \ No newline at end of file diff --git a/src/Communication/AsioService.h b/src/Communication/AsioService.h index 4f619156..b5fa821a 100644 --- a/src/Communication/AsioService.h +++ b/src/Communication/AsioService.h @@ -24,7 +24,7 @@ namespace QuickFAST /// Normal case is for all classes derived from AsioService to share /// the same boost::io_service. The alternate constructor gives the /// application more control if it is needed. - class QuickFAST_Export AsioService + class QuickFAST_Export AsioService : public boost::asio::io_service { public: /// @brief Construct using the internal, common io service diff --git a/src/Examples/CMakeLists.txt b/src/Examples/CMakeLists.txt new file mode 100644 index 00000000..9bed07ac --- /dev/null +++ b/src/Examples/CMakeLists.txt @@ -0,0 +1,47 @@ +GET_FILES(Examples_CPP Examples .cpp) + +#TutorialApplication +add_executable(TutorialApplication) +target_include_directories(TutorialApplication + PRIVATE + . + ${CMAKE_SOURCE_DIR}/quickfast/src) + +target_sources(TutorialApplication + PRIVATE + ${Examples_CPP} + TutorialApplication/main.cpp + TutorialApplication/TutorialApplication.cpp) + +target_compile_definitions(TutorialApplication + PUBLIC + BOOST_BIND_GLOBAL_PLACEHOLDERS + ASIOSERVICE_FWD_H) + +target_link_libraries(TutorialApplication + PUBLIC + QuickFAST) + +#PerformanceTest +add_executable(PerformanceTest) +target_include_directories(PerformanceTest + PRIVATE + . + ${CMAKE_SOURCE_DIR}/quickfast/src) + +target_sources(PerformanceTest + PRIVATE + ${Examples_CPP} + PerformanceTest/main.cpp + PerformanceTest/MessageCounter.cpp + PerformanceTest/NullMessage.cpp + PerformanceTest/PerformanceTest.cpp) + +target_compile_definitions(PerformanceTest + PUBLIC + BOOST_BIND_GLOBAL_PLACEHOLDERS + ASIOSERVICE_FWD_H) + +target_link_libraries(PerformanceTest + PUBLIC + QuickFAST) \ No newline at end of file diff --git a/src/Examples/Examples/MessageInterpreter.h b/src/Examples/Examples/MessageInterpreter.h index f0599331..807d720e 100644 --- a/src/Examples/Examples/MessageInterpreter.h +++ b/src/Examples/Examples/MessageInterpreter.h @@ -6,7 +6,7 @@ #endif #ifndef MESSAGEINTERPRETER_H #define MESSAGEINTERPRETER_H -#include +#include "Codecs/MessageConsumer.h" #include namespace QuickFAST{