cmake: Fix build with OpenMP (issue #2462)

Builds with gcc wrongly used /openmp instead of -fopenmp.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-06-25 13:20:52 +02:00
parent 676b18834c
commit 7093727da1

View File

@ -127,10 +127,10 @@ if (WIN32)
endif()
if (OPENMP_BUILD)
if (CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
else(MSVC)
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
endif()
endif()