Skip to content
Snippets Groups Projects
Commit f895c492 authored by Martin Beseda's avatar Martin Beseda
Browse files

[ENH] Added OpenMP support for compilation.

parent b7ca31db
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@ MESSAGE(STATUS "Using CMake ${CMAKE_VERSION}")
# Compile for profiling with GProf
# - binaries need to be run to create gmon.out file and
# 'gprof' command is run subsequently!
#TODO create 'profiling' user parameter
#ADD_COMPILE_OPTIONS(-pg)
#ADD_LINK_OPTIONS(-pg)
......@@ -153,6 +154,15 @@ ELSEIF("${DEPENDENCIES_LINK_TYPE}" STREQUAL "shared")
SET(LIB_SUFFIX "so")
ENDIF()
#-------------#
# Find OpenMP #
#-------------#
MESSAGE("Looking for OpenMP support...")
FIND_PACKAGE(OpenMP)
IF(OpenMP_FOUND)
ADD_COMPILE_OPTIONS(${OpenMP_CXX_FLAGS})
ENDIF()
#-------------------------#
# Find external libraries #
#-------------------------#
......
......@@ -145,6 +145,7 @@ IF("${BUILD_LIB}" STREQUAL "yes")
${BLAS_LIBRARIES}
${LAPACK_LIBRARIES}
${GFORT}
${OpenMP_CXX_LIBRARIES}
)
TARGET_INCLUDE_DIRECTORIES(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment