Skip to content

Commit

Permalink
Try adding compiler flag in conanfile
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoskela committed Dec 14, 2022
1 parent 9174fb7 commit f5b1d36
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SoptConan(ConanFile):
license = "GPL-2.0"
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."


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

if self.options.docs == 'on':
self.requires("doxygen/1.9.2")

def generate(self):
tc = CMakeToolchain(self)

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

tc.variables['CMAKE_VERBOSE_MAKEFILE:BOOL'] = "ON"
tc.variables['CMAKE_VERBOSE_MAKEFILE:BOOL'] = "ON"

if (self.settings.compiler == "apple-clang"):
tools.build:cxxflags=["-fvisibility=default"]

tc.generate()

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def package(self):
cmake = CMake(self)
cmake.configure()
Expand Down

0 comments on commit f5b1d36

Please sign in to comment.