From a84e873bb156080ea76ab182171b1f3b4d5395f6 Mon Sep 17 00:00:00 2001 From: Freddie Mendoza Date: Fri, 30 Nov 2018 14:04:45 -0800 Subject: [PATCH] Put back linker flag for OpenMP to prevent build break on ppc64le (#14569) Summary: See #14539 Pull Request resolved: https://github.com/pytorch/pytorch/pull/14569 Differential Revision: D13282161 Pulled By: ezyang fbshipit-source-id: 13a1131b26fa300b037f66d1919b97d14033f9e5 --- torch/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/torch/CMakeLists.txt b/torch/CMakeLists.txt index f137309..5927ca2 100644 --- a/torch/CMakeLists.txt +++ b/torch/CMakeLists.txt @@ -334,6 +334,7 @@ if(OPENMP_FOUND) message(STATUS "Compiling with OpenMP") endif() target_compile_options(torch INTERFACE ${OpenMP_CXX_FLAGS}) + target_link_libraries(torch -fopenmp) #cmake only check for separate OpenMP library on AppleClang 7+ #https://github.com/Kitware/CMake/blob/42212f7539040139ecec092547b7d58ef12a4d72/Modules/FindOpenMP.cmake#L252 if (CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") -- 2.7.4