From 7211f79e05194e3d8afcf681e74bb564e461dcf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Widera?= Date: Wed, 3 Jun 2015 15:01:48 +0200 Subject: [PATCH] add `OpenMP` support add `find_package(OpenMP)` to `CMakeLists.txt` --- src/picongpu/CMakeLists.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/picongpu/CMakeLists.txt b/src/picongpu/CMakeLists.txt index 34d8755208..3353071c40 100644 --- a/src/picongpu/CMakeLists.txt +++ b/src/picongpu/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2013-2014 Axel Huebl, Benjamin Schneider, Felix Schmitt, Heiko Burau, Rene Widera +# Copyright 2013-2015 Axel Huebl, Benjamin Schneider, Felix Schmitt, Heiko Burau, Rene Widera # # This file is part of PIConGPU. # @@ -268,6 +268,18 @@ if( (Boost_VERSION EQUAL 105500) AND "${CUDA_NVCC_FLAGS} \"-DBOOST_NOINLINE=__attribute__((noinline))\" ") endif() +################################################################################ +# OPENMP +############################################################################## + +FIND_PACKAGE(OpenMP) +IF(NOT OPENMP_FOUND) + MESSAGE(STATUS "Disable OpenMP: Can't find library") + +ELSE() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") +ENDIF() + ################################################################################ # PMacc options