We’re using cmake/anaconda, including the anaconda-delivered gcc7 compilers. As delivered by anaconda, I believe those compilers don’t search include paths like /usr/include and library paths like /lib64 /usr/lib64. When I try to add those paths (e.g. /usr/include to cmake's target_include_directories) it appears to me that cmake filters them out (i.e. doesn’t put them in the list). I can get other paths to show up without a problem. I’m guessing cmake is assuming that the compiler will add those paths automatically. If my understanding is correct, is there a way I can disable this filtering?
I have a workaround where I can modify environment variables like CFLAGS/CXXFLAGS/LDFLAGS before running cmake, but that felt somewhat ugly.