title: cross compiling with cmake picking up host rather than target definitions
body: <p>I'm having problems cross compiling with cmake under linux.</p>
  <p>cmake is generating a makefile with -isystem /usr... clauses when of course /usr is the host system so it's picking up all the wrong definitions. Particularly annoying is that cmake knows it is wrong because the compile command spews out lots of errors/warnings like ...</p>
  <p>aarch64-linux-c++: WARNING: unsafe header/library path used in cross-compilation: '-isystem' '/usr/local/include'</p>
  <p>Now, I'm no expert on cmake, but I know I have to specify a find path in a toolchain file something like ...</p>
  <pre><code>set(CMAKE_SYSTEM_NAME Linux)
  set(BR_PATH &quot;/home/mike/work/v3&quot;)
  set(CMAKE_SYSTEM_PROCESSOR aarch64)
  set(CMAKE_CROSSCOMPILING 1)
  
  # which compilers to use for C and C++
  set(CMAKE_C_COMPILER ${BR_PATH}/output/host/bin/aarch64-buildroot-linux-gnu-gcc.br_real)
  set(CMAKE_CXX_COMPILER ${BR_PATH}/output/host/bin/aarch64-linux-c++)
  
  set(CMAKE_FIND_ROOT_PATH &quot;${BR_PATH}/output/host/lib; ${BR_PATH}/output/host/aarch64-buildroot-linux-gnu/sysroot&quot;)
  
  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
  </code></pre>
  <p>Now, it is clearly picking up this toolchain file OK, because it is using the correct compiler. I don't understand why it is ignoring my CMAKE_FIND_ROOT_PATH.</p>
  <p>I tried forcing its' hand by doing set(CMAKE_IGNORE_PATH /usr), but it still included &quot;-isystem /usr/include&quot; in the generated makefile.</p>
  <p>What am I doing wrong ?</p>