I have a small C++ project for which the source code is distributed in a small directory hierarchy. I have a "master" CMakeLists.txt file at the project root as well as one for each source subdirectory. How would I configure the CMakeLists.txt files so that the build produces a single library file that comprises the entire hierarchy? I am using CMake 3.2.2 that came bundled with JetBrains CLion 1.0.4. The software is being developed on CentOS 6.6.
I have tried to find out how this might be done by looking at various links on the CMake wiki and in the cmake documentation, but haven't had any luck getting something to work. The files I have currently build a library file at each directory, which is not what I want. I saw an option to the add_library() command where you could define the library as an "object" library. This sounds like what I would need, but when I added the OBJECT token to the call, CMake complained: Error:Target llxcc has dependency information when it shouldn't. Your cache is probably stale. Please remove the entry llxcc_LIB_DEPENDS from the cache. I'm not sure what this means. I looked in the cache view and found the entry referred to, but it had no value. Any suggestions on how to do this would be appreciated. Thanks, Joseph Gagnon Engineer II Group 53 - Secure Resilient Systems and Technology MIT Lincoln Laboratory Lexington, MA
smime.p7s
Description: S/MIME cryptographic signature
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake