I need to compile a few subprojects (each is a subfolder with one
library and a corresponding CMakeLists.txt) with the Intel compiler
while the rest of the libraries (organized the same way), including
the executable, using the system compiler (GNU on linux, VC on
Windows). I tried two solutions
You should use ExternalProject, and possibly wrapper scripts to set
environment variables for the projects that need to use the different
compiler. (CC, CXX, FC env vars should be set during the configure stage, or
you can pass them in as -D args to cmake)
CMake does not support changing the