From 4a29def3505c72b484afb831cf5323db09cc92d9 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Wed, 6 Oct 2021 15:00:49 -0500 Subject: [PATCH] Fix typo where fPIC option is not templated, so it is always enabled --- conan/tools/cmake/toolchain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conan/tools/cmake/toolchain.py b/conan/tools/cmake/toolchain.py index 60248a5a962..fa04525912a 100644 --- a/conan/tools/cmake/toolchain.py +++ b/conan/tools/cmake/toolchain.py @@ -134,8 +134,8 @@ def context(self): class FPicBlock(Block): template = textwrap.dedent(""" - message(STATUS "Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)") - set(CMAKE_POSITION_INDEPENDENT_CODE ON) + message(STATUS "Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE={{ fpic }} (options.fPIC)") + set(CMAKE_POSITION_INDEPENDENT_CODE {{ fpic }}) """) def context(self):