How to use CMake to build multiple platforms from one master CMake project without cache problems
问题 I have two projects called A and B that have complete working CMakeLists.txt projects, and each project can be built completely without errors. I would like to have a master project defined in CMake that will build both A and B (and maybe a hundred other things eventually). My top level CMakeLists.txt project looks like add_subdirectory(A build-A) add_subdirectory(B build-B) and CMake can parse all the files and make can start building just fine. The problem is that project A is for one