Skip to content

Commit f5b1d36

Browse files
committed
Try adding compiler flag in conanfile
1 parent 9174fb7 commit f5b1d36

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

conanfile.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class SoptConan(ConanFile):
1010
license = "GPL-2.0"
1111
description = "SOPT is an open-source C++ package available under the license below. It performs Sparse OPTimisation using state-of-the-art convex optimisation algorithms. It solves a variety of sparse regularisation problems, including the Sparsity Averaging Reweighted Analysis (SARA) algorithm."
1212

13-
13+
1414
settings = "os", "compiler", "build_type", "arch"
1515
requires = ["eigen/3.3.7","catch2/2.13.7","benchmark/1.6.0", "libtiff/4.3.0",]
1616
generators = "CMakeDeps"
@@ -43,7 +43,7 @@ def requirements(self):
4343

4444
if self.options.docs == 'on':
4545
self.requires("doxygen/1.9.2")
46-
46+
4747
def generate(self):
4848
tc = CMakeToolchain(self)
4949

@@ -61,14 +61,18 @@ def generate(self):
6161
tc.variables['CMAKE_C_COMPILER_LAUNCHER'] = "ccache"
6262
tc.variables['CMAKE_CXX_COMPILER_LAUNCHER'] = "ccache"
6363

64-
tc.variables['CMAKE_VERBOSE_MAKEFILE:BOOL'] = "ON"
64+
tc.variables['CMAKE_VERBOSE_MAKEFILE:BOOL'] = "ON"
65+
66+
if (self.settings.compiler == "apple-clang"):
67+
tools.build:cxxflags=["-fvisibility=default"]
68+
6569
tc.generate()
66-
70+
6771
def build(self):
6872
cmake = CMake(self)
6973
cmake.configure()
7074
cmake.build()
71-
75+
7276
def package(self):
7377
cmake = CMake(self)
7478
cmake.configure()

0 commit comments

Comments
 (0)