From 7093727da1e25e2e5202169d2ab210e617db93b2 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 25 Jun 2019 13:20:52 +0200 Subject: [PATCH] cmake: Fix build with OpenMP (issue #2462) Builds with gcc wrongly used /openmp instead of -fopenmp. Signed-off-by: Stefan Weil --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc6d0391d9..255752ca62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()