Skip to content

Commit 7211f79

Browse files
add OpenMP support
add `find_package(OpenMP)` to `CMakeLists.txt`
1 parent f0ba515 commit 7211f79

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Diff for: src/picongpu/CMakeLists.txt

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2013-2014 Axel Huebl, Benjamin Schneider, Felix Schmitt, Heiko Burau, Rene Widera
2+
# Copyright 2013-2015 Axel Huebl, Benjamin Schneider, Felix Schmitt, Heiko Burau, Rene Widera
33
#
44
# This file is part of PIConGPU.
55
#
@@ -268,6 +268,18 @@ if( (Boost_VERSION EQUAL 105500) AND
268268
"${CUDA_NVCC_FLAGS} \"-DBOOST_NOINLINE=__attribute__((noinline))\" ")
269269
endif()
270270

271+
################################################################################
272+
# OPENMP
273+
##############################################################################
274+
275+
FIND_PACKAGE(OpenMP)
276+
IF(NOT OPENMP_FOUND)
277+
MESSAGE(STATUS "Disable OpenMP: Can't find library")
278+
279+
ELSE()
280+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
281+
ENDIF()
282+
271283

272284
################################################################################
273285
# PMacc options

0 commit comments

Comments
 (0)