title: How to tell CMake to use Windows paths, not Cygwin ones?
body: <p>I am on Cygwin and I would like to call a compiler installed on Windows. I have an issue with the paths format. </p>
  
  <p>With this very simple <code>CMakeLists.txt</code>:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.6)
  
  set(CMAKE_SYSTEM_NAME Generic)
  set(CMAKE_SYSTEM_PROCESSOR Cortex-M4)
  
  set(CMAKE_C_COMPILER iccarm.exe)
  set(CMAKE_CXX_COMPILER iccarm.exe)
  set(CMAKE_ASM_COMPILER iasmarm.exe)
  
  project("test" C)
  
  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
  set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
  
  if(NOT EXISTS main.c)
      file(WRITE main.c "int main(void){return 0;}\n")
  endif()
  
  add_executable(
      test
      main.c
  )
  </code></pre>
  
  <p>I get an issue when CMake checks for the compiler: </p>
  
  <pre><code>-- The C compiler identification is IAR
  -- Check for working C compiler: /cygdrive/c/Program Files (x86)/IAR Systems/Embedded Workbench 8.0/arm/bin/iccarm.exe
  -- Check for working C compiler: /cygdrive/c/Program Files (x86)/IAR Systems/Embedded Workbench 8.0/arm/bin/iccarm.exe -- broken
  CMake Error at /usr/share/cmake-3.6.2/Modules/CMakeTestCCompiler.cmake:61 (message):
    The C compiler "/cygdrive/c/Program Files (x86)/IAR Systems/Embedded
    Workbench 8.0/arm/bin/iccarm.exe" is not able to compile a simple test
    program.
  
    It fails with the following output:
  
     Change Dir: /cygdrive/c/Users/nobody/home/sandbox/cmakeiar/CMakeFiles/CMakeTmp
  </code></pre>
  
  <p>It is because CMake doesn't know, or perhaps it should know, that <code>iccarm.exe</code> is a Windows program that is expecting windows paths. </p>
  
  <p>Is there a solution to give CMake this information?</p>
  
  <p>I imaging something like: </p>
  
  <pre><code>if(PLATFORM_IS_CYGWIN)
      set(CMAKE_IS_WINDOWS_EXECUTABLE iccarm.exe)
  endif()
  </code></pre>