[CMake] Creating two libraries from the same set of source code, but with different compiler options

Tom Kacvinsky tom.kacvinsky at vectorcast.com
Fri Jun 19 13:17:02 EDT 2015


I have need to build two libraries, each based on the same base code, but
each library is built with different compiler options.  I know how to force
the compilation options to be what I want, the problem I am having is
envisioning how to do this within one CMakeLists.txt file.  What I am hung
up on is this:  if I change the file properties, I am afraid the properties
will apply to both libraries.  Is there a way of instruction cmake to apply
those file properties to only one target, or will I have to split the
building of the libraries into two CMakeLists.txt files?

Thanks,

Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150619/1e3e7394/attachment.html>


More information about the CMake mailing list