summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Frust <tobiasfrust@gmail.com>2016-06-29 14:49:55 +0200
committerTobias Frust <tobiasfrust@gmail.com>2016-06-29 14:49:55 +0200
commit16e83c0afcec0cea8af82189d4e98cd232bdf154 (patch)
treef855a9c7fde72fa1466dc8093ca4aa3ccc06fab1 /src
parent13783f932576a285b08cf518a6b0d679aac3c897 (diff)
downloadods-16e83c0afcec0cea8af82189d4e98cd232bdf154.tar.gz
ods-16e83c0afcec0cea8af82189d4e98cd232bdf154.tar.bz2
ods-16e83c0afcec0cea8af82189d4e98cd232bdf154.tar.xz
ods-16e83c0afcec0cea8af82189d4e98cd232bdf154.zip
created project structure
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt40
-rw-r--r--src/CMakeLists.txt~38
-rw-r--r--src/DetectorModule/DetectorModule.cpp0
-rw-r--r--src/DetectorModule/DetectorModule.h0
-rw-r--r--src/cmake/FindLibConfig.cmake73
-rw-r--r--src/main.cpp0
6 files changed, 151 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..4c09b2e
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,40 @@
+cmake_minimum_required(VERSION 3.5)
+project(OnlineDetectorSimulator)
+
+#define some speciel output paths for libraries and executables
+set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+
+#use c++11
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+set(Boost_USE_MULTITHREADED ON)
+SET(BOOST_MIN_VERSION "1.58.0")
+add_definitions(-DBOOST_LOG_DYN_LINK=1)
+
+#find required packages
+find_package(LibConfig REQUIRED)
+find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS log filesystem)
+find_package(OpenMP)
+
+#add openmp
+if(OPENMP_FOUND)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
+endif()
+
+include_directories(
+ ${LIBCONFIGPP_INCLUDE_DIR}
+ ${BOOST_INCLUDE_DIRS}
+)
+
+file(GLOB SOURCES
+ "*.cpp"
+)
+
+add_executable(onlineDetectorSimulator ${SOURCES})
+
+
diff --git a/src/CMakeLists.txt~ b/src/CMakeLists.txt~
new file mode 100644
index 0000000..36ea910
--- /dev/null
+++ b/src/CMakeLists.txt~
@@ -0,0 +1,38 @@
+cmake_minimum_required(VERSION 3.5)
+project(OnlineDetectorSimulator)
+
+#define some speciel output paths for libraries and executables
+set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+
+#use c++11
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+set(Boost_USE_MULTITHREADED ON)
+SET(BOOST_MIN_VERSION "1.58.0")
+add_definitions(-DBOOST_LOG_DYN_LINK=1)
+
+#find required packages
+find_package(LibConfig REQUIRED)
+find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS log filesystem)
+find_package(OpenMP)
+
+#add openmp
+if(OPENMP_FOUND)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
+endif()
+
+include_directories(
+ ${LIBCONFIGPP_INCLUDE_DIR}
+ ${BOOST_INCLUDE_DIRS}
+)
+
+file(GLOB SOURCES
+ "*.cpp"
+)
+
+
diff --git a/src/DetectorModule/DetectorModule.cpp b/src/DetectorModule/DetectorModule.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/DetectorModule/DetectorModule.cpp
diff --git a/src/DetectorModule/DetectorModule.h b/src/DetectorModule/DetectorModule.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/DetectorModule/DetectorModule.h
diff --git a/src/cmake/FindLibConfig.cmake b/src/cmake/FindLibConfig.cmake
new file mode 100644
index 0000000..436d2a5
--- /dev/null
+++ b/src/cmake/FindLibConfig.cmake
@@ -0,0 +1,73 @@
+# Find the CUnit includes and library
+#
+# This module defines
+# LIBCONFIG_INCLUDE_DIR, where to find cppunit include files, etc.
+# LIBCONFIG_LIBRARIES, the libraries to link against to use CppUnit.
+# LIBCONFIG_STATIC_LIBRARIY_PATH
+# LIBCONFIG_FOUND, If false, do not try to use CppUnit.
+
+# also defined, but not for general use are
+# LIBCONFIG_LIBRARY, where to find the CUnit library.
+
+#MESSAGE("Searching for libconfig library")
+
+FIND_PATH(LIBCONFIG_INCLUDE_DIR libconfig.h
+ /usr/local/include
+ /usr/include
+)
+
+FIND_PATH(LIBCONFIGPP_INCLUDE_DIR libconfig.h++
+ /usr/local/include
+ /usr/include
+)
+
+FIND_LIBRARY(LIBCONFIG_LIBRARY config
+ /usr/local/lib
+ /usr/lib
+)
+
+FIND_LIBRARY(LIBCONFIGPP_LIBRARY config++
+ /usr/local/lib
+ /usr/lib
+)
+
+FIND_LIBRARY(LIBCONFIG_STATIC_LIBRARY "libconfig${CMAKE_STATIC_LIBRARY_SUFFIX}"
+ /usr/local/lib
+ /usr/lib
+)
+
+FIND_LIBRARY(LIBCONFIGPP_STATIC_LIBRARY "libconfig++${CMAKE_STATIC_LIBRARY_SUFFIX}"
+ /usr/local/lib
+ /usr/lib
+)
+
+
+IF(LIBCONFIG_INCLUDE_DIR)
+ IF(LIBCONFIG_LIBRARY)
+ SET(LIBCONFIG_FOUND TRUE)
+ SET(LIBCONFIG_LIBRARIES ${LIBCONFIG_LIBRARY})
+ SET(LIBCONFIG_STATIC_LIBRARY_PATH ${LIBCONFIG_STATIC_LIBRARY})
+ ENDIF(LIBCONFIG_LIBRARY)
+ENDIF(LIBCONFIG_INCLUDE_DIR)
+
+IF(LIBCONFIGPP_INCLUDE_DIR)
+ IF(LIBCONFIGPP_LIBRARY)
+ SET(LIBCONFIGPP_FOUND TRUE)
+ SET(LIBCONFIGPP_LIBRARIES ${LIBCONFIGPP_LIBRARY})
+ SET(LIBCONFIGPP_STATIC_LIBRARY_PATH ${LIBCONFIGPP_STATIC_LIBRARY})
+ ENDIF(LIBCONFIGPP_LIBRARY)
+ENDIF(LIBCONFIGPP_INCLUDE_DIR)
+
+IF (LIBCONFIG_FOUND)
+ IF (NOT LibConfig_FIND_QUIETLY)
+ MESSAGE(STATUS "Found LibConfig++: ${LIBCONFIGPP_LIBRARIES}" )
+ MESSAGE(STATUS "Found LibConfig: ${LIBCONFIG_LIBRARIES}")
+ MESSAGE(STATUS "static LibConfig path: ${LIBCONFIG_STATIC_LIBRARY_PATH}")
+ ENDIF (NOT LibConfig_FIND_QUIETLY)
+ELSE (LIBCONFIG_FOUND)
+ IF (LibConfig_FIND_REQUIRED)
+ MESSAGE(SEND_ERROR "Could NOT find LibConfig")
+ ENDIF (LibConfig_FIND_REQUIRED)
+ENDIF (LIBCONFIG_FOUND)
+
+MARK_AS_ADVANCED(LIBCONFIG_INCLUDE_DIR LIBCONFIG_LIBRARIES)
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/main.cpp