Skip to content

Commit

Permalink
stella-cv-fbow: add better support for apple-clang
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed May 7, 2024
1 parent 15f1e44 commit 65d2b3f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions recipes/stella-cv-fbow/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ patches:
- patch_file: "patches/001-avoid-opencv-overlinking.patch"
patch_description: "Avoid overlinking of OpenCV libraries"
patch_type: "conan"
- patch_file: "patches/002-support-apple-clang.patch"
patch_description: "Add support for apple-clang"
patch_type: "portability"
2 changes: 1 addition & 1 deletion recipes/stella-cv-fbow/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def export_sources(self):
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
if self.settings.arch not in ["x86", "x86_64"]:
if self.settings.arch not in ["x86", "x86_64"] or self.settings.compiler not in ["gcc", "clang", "apple-clang"]:
del self.options.avx
del self.options.mmx
del self.options.sse
Expand Down
11 changes: 11 additions & 0 deletions recipes/stella-cv-fbow/all/patches/002-support-apple-clang.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -130,7 +130,7 @@
set(EXTRA_EXE_LINKER_FLAGS_RELEASE "")
set(EXTRA_EXE_LINKER_FLAGS_DEBUG "")

-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR MINGW)
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR MINGW OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
# profiling option
set(ENABLE_PROFILING OFF CACHE BOOL "Enable profiling in the GCC/Clang compiler (Add flags: -g -pg)")
# option for omitting frame pointer

0 comments on commit 65d2b3f

Please sign in to comment.