title: CMake cross-compile with specific linker doesn't pass arguments to armlink
body: <p>I am trying to cross-compile a project for embedded ARM Cortex builds, but I am unable to get the linker working. I want to use armlink, but no files are passed to armlink and hence no .elf file is produced.</p>
  
  <p>My CMakeLists.txt is pretty simple and given below. The failure is shown after that which shows that armlink was invoked by the makefile without any arguments.</p>
  
  <p>Any pointers will help - I searched and read many posts, but they all seem to have more involved requirements.</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.8)
  
  project(test_arm)
  enable_language(C ASM)
  
  # Cross-compilation for ARM
  SET(CMAKE_C_COMPILER armcc)
  SET(CMAKE_LINKER armlink)
  SET(CMAKE_C_LINK_EXECUTABLE armlink)
  
  SET(CMAKE_C_FLAGS "--cpu=Cortex-M3")
  SET(LINK_FLAGS "--map --ro-base=0x0 --rw-base=0x0008000 --first='boot.o(RESET)' --datacompressor=off")
  SET(CMAKE_EXE_LINKER_FLAGS "--map --ro-base=0x0 --rw-base=0x0008000 --first='boot.o(RESET)' --datacompressor=off")
  
  include_directories(../include)
  
  add_executable(blinky blinky.c)
  set_target_properties(blinky PROPERTIES LINKER_LANGUAGE C)
  </code></pre>
  
  <p>The failure is as follows, but I guess it would be obvious to someone given that I have some stupid issue in my CMakeLists:</p>
  
  <pre><code>$ make VERBOSE=1
  [100%] Building C object CMakeFiles/blinky.dir/blinky.c.o
  /usr/bin/cmake -E cmake_link_script CMakeFiles/blinky.dir/link.txt --verbose=1
  armlink
  Linking C executable blinky
  Product: DS-5 Professional 5.21.0 [5210017]
  Component: ARM Compiler 5.05 update 1 (build 106)
  Tool: armlink [4d0efa]
  For support see http://www.arm.com/support/
  Software supplied by: ARM Limited
  Usage: armlink option-list input-file-list
  where
  ....
  </code></pre>
  
  <p>I was expecting the CMake generated Makefile to invoke armlink with something like:</p>
  
  <pre><code>armlink --map --ro-base=0x0 --rw-base=0x0008000 \
    --first='boot.o(RESET)' --datacompressor=off \
    CMakeFiles/blinky.dir/blinky.c.o -o blinky.elf
  </code></pre>