Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Commit

Permalink
- handle -fPIC according to conan.io recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
SSE4 committed Mar 4, 2018
1 parent cd7ba09 commit 5596785
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class LibnameConan(ConanFile):
)

def configure(self):
if self.settings.compiler == 'Visual Studio':
if self.settings.os == 'Windows':
del self.options.fPIC

def source(self):
Expand All @@ -55,7 +55,7 @@ def source(self):
def build(self):
cmake = CMake(self)
cmake.definitions["BUILD_TESTS"] = False # example
if self.settings.compiler != 'Visual Studio':
if self.settings.os != 'Windows':
cmake.definitions['CMAKE_POSITION_INDEPENDENT_CODE'] = self.options.fPIC
cmake.configure(build_folder=self.build_subfolder)
cmake.build()
Expand Down

0 comments on commit 5596785

Please sign in to comment.