cmake - How to use different tool chains -
in project targets build , run on build platform , other targets build cross platform; options have, when using cmake? currently use cmake_build_type define tool chain, build type , platform (for example -d cmake_build_type=arm_debug ). in 1 place in build, switch tools (compilers, linke etc.), command line flags, libraries etc. according value of cmake_build_type. every build type, create build directory. this approach has it's drawbacks: multiple build directories , no easy way depend 1 target 1 build type on target in other build type (some kind of precompiler needed on build platform build cross platform example). as every build targets has single tool chain used love associate target target platform / tools set. implies libraries have build more 1 target platform different tool sets. the ' one build type , platform per cmake run ' limitation fundamental , advise against trying work around it. the proper solution here seems me split build several s...