diff --git a/conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_and_linker_flags.py b/conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_and_linker_flags.py index 07b6f86d98f..073f0058659 100644 --- a/conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_and_linker_flags.py +++ b/conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_and_linker_flags.py @@ -16,36 +16,36 @@ def test_shared_link_flags(): Issue: https://github.com/conan-io/conan/issues/9936 """ conanfile = textwrap.dedent(""" -from conans import ConanFile -from conan.tools.cmake import CMake -from conan.tools.layout import cmake_layout - - -class HelloConan(ConanFile): - name = "hello" - version = "1.0" - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False]} - default_options = {"shared": False} - exports_sources = "CMakeLists.txt", "src/*" - generators = "CMakeDeps", "CMakeToolchain" - - def layout(self): - cmake_layout(self) - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - cmake = CMake(self) - cmake.install() - - def package_info(self): - self.cpp_info.libs = ["hello"] - self.cpp_info.sharedlinkflags = ["-z now", "-z relro"] - self.cpp_info.exelinkflags = ["-z now", "-z relro"] + from conans import ConanFile + from conan.tools.cmake import CMake + from conan.tools.layout import cmake_layout + + + class HelloConan(ConanFile): + name = "hello" + version = "1.0" + settings = "os", "compiler", "build_type", "arch" + options = {"shared": [True, False]} + default_options = {"shared": False} + exports_sources = "CMakeLists.txt", "src/*" + generators = "CMakeDeps", "CMakeToolchain" + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["hello"] + self.cpp_info.sharedlinkflags = ["-z now", "-z relro"] + self.cpp_info.exelinkflags = ["-z now", "-z relro"] """) client = TestClient()