Thanks, this pointed me in the right direction.
I ended up moving main() to it's own file so nothing depends on it,
using a static add_library (project sources minus the main.cpp) and
depend on that target from gtest exe project. Works like a charm.
I missed the discourse announcement, I'll
Hi,
I have recently encountered what I believe might be a bug, where
INTERFACE_LINK_OPTIONS are not carried over static libraries.
Following is the simplest CMakeLists.txt that demonstrates the
problem:
cmake_minimum_required(VERSION 3.16)
project(LinkOptionsNotTransitive)
add_library(A SHARED A.
Thanks, this is exactly what I need.
Unfortunately constructing the path expansion involves some gymnastics.
If Find* exposes a list of directories it's just a simple list join (->
boost) but if it does not it is more involved..
list(JOIN Boost_LIBRARY_DIRS ";" BOOST_PATH)
set(ZLIB_PATH "")