I was very excited to see that CMake 3.12rc1 now has support for linking
object libraries, making usage requirements propagate to top level targets
that use these libraries. However, I'm having trouble putting the concept
into practice to build a DLL on Windows 10 using Visual Studio 2017's
compil
Hi,
I am getting a race condition when I do a parallel build.
Having an OBJECT library in one directory:
ADD_LIBRARY(symdiff_objects OBJECT ${CXX_SRCS} ${MC_SRCS})
set_property(TARGET symdiff_objects PROPERTY POSITION_INDEPENDENT_CODE ON)
And then having that object library being used in anothe
Fine.
I am surprised because both commands expects the same thing: a CMake list.
The only touchy point is to ensure that the list separator is correctly
passed to the command without early evaluation. For that purpose ensure
that the generator expression is passed to the command inside quotes:
targ
Ah, brilliant - I thought I'd tried that, but just gave it another go
following your advice and it worked a charm.
Incidentally, do you know what the rules are around the
BUILD_INTERFACE generator expression and line breaks / list items?
It seems to work fine in target_sources when enclosing multip
Hi,
What happens if you call FindBoost once for python 2 and once for python
3? Between invocations you could copy the boost variables to python
specific variants.
FindBoost( . . . .)
SET(Boost_LIBRARY_DIRS_PYTHON2 ${Boost_LIBRARY_DIRS})
FindBoost( . . . .)
SET(Boost_LIBRARY_DIRS_PYTHON3 ${B
You can manage different paths (one for build export and one for install
export) by using '$' and '$'.
'$' accepts absolute paths and
'$ expects paths relative to the install prefix
(CMAKE_INSTALL_PREFIX variable).
.
Le lun. 25 juin 2018 à 16:23, Rich T a écrit :
> Hi everyone, I've a question
Hi everyone, I've a question about interface sources.
If you create an interface target A, add some sources via
add_library(A INTERFACE)
target_sources(A INTERFACE some/relative/path)
then link to another library B:
add_library(B)
target_link_libraries(B PRIVATE A)
B will search for those sour