problem in merging "modern" and "non-modern" CMake code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

problem in merging "modern" and "non-modern" CMake code

I have a project, consisting of a library and a program, that is built
using CMake, with CMake files written using "modern" CMake.  For
adding functionality, I have to use another library from my library.
This additional library has to be included as source code in my
project, and I put it into a sub-directory of my library source code
directory.  It is also built using CMake, but its CMake files are
written using "non-modern" CMake.  If I just do:
from CMakeLists.txt in my library directory, it seems that it could
work, but the problem is that this additional library is using
add_definitions(), changing CMAKE_C_FLAGS, and doing other nasty
stuff, that is later affecting build of my library.  Thus, my
questions is: is there any way to sanitize behavior of "non-modern"
CMake code in alike situation, and use this additional library as I


Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: