summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt40
1 files changed, 40 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})
+
+