-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lightgbm: restore patches for the Clang OpenMP support fix
- Loading branch information
Showing
5 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
recipes/lightgbm/all/patches/3.3.2-0001-fix-openmp-clang.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 109a252d..e5d46bce 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -415,7 +415,7 @@ if(USE_MPI) | ||
endif(USE_MPI) | ||
|
||
if(USE_OPENMP) | ||
- if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") | ||
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") | ||
TARGET_LINK_LIBRARIES(lightgbm OpenMP::OpenMP_CXX) | ||
TARGET_LINK_LIBRARIES(_lightgbm OpenMP::OpenMP_CXX) | ||
endif() |
13 changes: 13 additions & 0 deletions
13
recipes/lightgbm/all/patches/3.3.5-0001-fix-openmp-clang.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 95610d55..2b48507d 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -444,7 +444,7 @@ if(USE_MPI) | ||
endif(USE_MPI) | ||
|
||
if(USE_OPENMP) | ||
- if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") | ||
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") | ||
TARGET_LINK_LIBRARIES(lightgbm OpenMP::OpenMP_CXX) | ||
TARGET_LINK_LIBRARIES(_lightgbm OpenMP::OpenMP_CXX) | ||
endif() |
11 changes: 11 additions & 0 deletions
11
recipes/lightgbm/all/patches/4.1.0-0001-fix-openmp-clang.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -526,7 +526,7 @@ | ||
endif() | ||
|
||
if(USE_OPENMP) | ||
- if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") | ||
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang|AppleClang") | ||
target_link_libraries(lightgbm_objs PUBLIC OpenMP::OpenMP_CXX) | ||
# c_api headers also includes OpenMP headers, thus compiling | ||
# lightgbm_capi_objs needs include directory for OpenMP. |