Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove option.fPIC for shared in conan new templates #13066

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion conan/internal/api/new/autotools_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ class {{package_name}}Conan(ConanFile):

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.rm_safe("fPIC")

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def layout(self):
basic_layout(self)
Expand Down
6 changes: 5 additions & 1 deletion conan/internal/api/new/bazel_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class {{package_name}}Recipe(ConanFile):

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.rm_safe("fPIC")

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def layout(self):
bazel_layout(self)
Expand Down
6 changes: 5 additions & 1 deletion conan/internal/api/new/cmake_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ class {{package_name}}Recipe(ConanFile):

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.rm_safe("fPIC")

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def layout(self):
cmake_layout(self)
Expand Down
6 changes: 5 additions & 1 deletion conan/internal/api/new/meson_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ class {{package_name}}Conan(ConanFile):

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.rm_safe("fPIC")

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def layout(self):
basic_layout(self)
Expand Down
6 changes: 5 additions & 1 deletion conans/test/assets/pkg_cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ class Pkg(ConanFile):

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.rm_safe("fPIC")

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def layout(self):
cmake_layout(self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ class App(ConanFile):

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.rm_safe("fPIC")

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def build(self):
env_build = Autotools(self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ class MyLibConan(ConanFile):

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.rm_safe("fPIC")

def layout(self):
basic_layout(self)
Expand Down
6 changes: 5 additions & 1 deletion conans/test/functional/toolchains/meson/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ class App(ConanFile):

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.rm_safe("fPIC")

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def layout(self):
self.folders.build = "build"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ def layout(self):

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.rm_safe("fPIC")

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def generate(self):
tc = MesonToolchain(self)
Expand Down
6 changes: 5 additions & 1 deletion conans/test/functional/toolchains/meson/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ class App(ConanFile):

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.rm_safe("fPIC")

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def layout(self):
self.folders.build = "build"
Expand Down
6 changes: 5 additions & 1 deletion conans/test/functional/toolchains/meson/test_meson.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ class App(ConanFile):

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.rm_safe("fPIC")

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def layout(self):
self.folders.generators = 'build/gen_folder'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ def layout(self):

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.rm_safe("fPIC")

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def generate(self):
tc = MesonToolchain(self)
Expand Down