0

I have a c++ project, it has 2 modules, each as a target. target A need compile with g++4.8, target B need compile with g++7, how should i compose the CMakeLists.txt for this purpose? i tried many effects but still cannot succeed, thanks in advance!

Thanks & Regards, Martin.

sepp2k
  • 363,768
  • 54
  • 674
  • 675
  • "target A need compile with g++4.8, target B need compile with g++7" - This cannot be done in a single CMake project. See duplicate questions and their answers for more details. – Tsyvarev Jun 20 '20 at 11:27
  • Thanks Tsyvarev! seems i worked it around by using create a few subfolders and use add_subdirectory(...), then i can use diff compiler for each subfolder modules. – Martin Tian Jun 28 '20 at 14:55

0 Answers0