Skip to content

Commit

Permalink
cmake: Fix build with OpenMP (issue #2462)
Browse files Browse the repository at this point in the history
Builds with gcc wrongly used /openmp instead of -fopenmp.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Jun 25, 2019
1 parent 676b188 commit 7093727
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Expand Up @@ -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()

Expand Down

0 comments on commit 7093727

Please sign in to comment.