Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C make list #144

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(src)
10 changes: 5 additions & 5 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" = ""
Expand All @@ -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" = ""
Expand Down
2 changes: 2 additions & 0 deletions src/Application/DecoderConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include <Communication/AsioService_fwd.h>
#include <Application/DecoderConfiguration.h>

#include "boost/asio.hpp"

namespace QuickFAST{
namespace Application{
/// @brief Support a single source of FAST encoded data.
Expand Down
46 changes: 46 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion src/Communication/AsioService.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
47 changes: 47 additions & 0 deletions src/Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion src/Examples/Examples/MessageInterpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#endif
#ifndef MESSAGEINTERPRETER_H
#define MESSAGEINTERPRETER_H
#include <Codecs/MessageConsumer.h>
#include "Codecs/MessageConsumer.h"
#include <Messages/MessageFormatter.h>

namespace QuickFAST{
Expand Down