Hi,
Is it possible to have two List.txt files , i,e, CMakeLists1.txt and CMakeLists2.txt in a single directory and while compiling is it possible to inform cmake to consider CMakeLists2.txt for further process ? If yes what is flag should be used ?
In situations where I want to automatically choose the Generator (say Ninja vs. Make) or other things that I can or cannot do within CMakeLists.txt, I use ctest -S script.cmake scripts. An example .cmake script I use across many projects is https://github.com/geospace-code/h5fortran/blob/master/setup.cmake.
looks for new-enough Ninja first, with Make fallback
allows user to type single command to build and test
control compiler preference order
run tests in parallel
These are all doable by other means, but this is a single command that new users don’t have to be concerned with the details if it works.