title: CMake errors in target creation
body: <p>I am using cmake-3.4.0 on Windows.
  I have basic understanding of cmake.
  I have trying to build two target executables in a folder called <code>util\</code>.
  I intend to cross compile two source files <code>util\celtenc.c</code> and <code>util\celtdec.c</code>, and link the two object files created (celtenc.c.obj and celtdec.c.obj) 
  against static lib: <code>libcelt-0.0.0-sb-None-hexagon.a</code>
  and create two targets <code>celt_Enc</code> and <code>celt_Dec</code>.</p>
  
  <p>Below is my <code>util\CMakeLists.txt</code>. I tried different things but it fails to build the two targets.</p>
  
  <p>Case 1] When I disable the line <code>SET( CMAKE_C_FLAGS  "" CACHE INTERNAL "")</code>
  It takes my <code>CMAKE_C_FLAGS</code> set in a top level CMakeLists.txt and gives error:     <code>linker option neglected</code> and no executable is built, although the corresponding two *.c.obj files are built.</p>
  
  <p>Case 2] So to disable/unset my previous <code>CMAKE_C_FLAGS</code> I add a statement as below:</p>
  
  <pre><code>SET( CMAKE_C_FLAGS  "" CACHE INTERNAL "")
  </code></pre>
  
  <p>then it complains and gives error about invalid <code>namespec -l libcelt-0.0.0-sb-None-hexagon.a</code></p>
  
  <p>What am I missing? How can I modify this CMakeLists.txt to compile the above two source *.c files and link them to obtain the two executable targets? </p>
  
  <pre><code>if ("${TARGET_ARCH}" MATCHES "hexagon") 
  
       add_executable ( celt_Enc celtenc.c  )
       target_link_libraries(celt_Enc libcelt-0.0.0-sb-None-hexagon.a  )
  
       add_executable ( celt_Dec celtdec.c )
       target_link_libraries(celt_Dec libcelt-0.0.0-sb-None-hexagon.a   )  
       SET_TARGET_PROPERTIES( celt_Dec  PROPERTIES CMAKE_EXE_LINKER_FLAGS "-v  -L ..\ -llibcelt-0.0.0-sb-None-hexagon.a -lhexagon")
  
      SET( CMAKE_C_FLAGS  "" CACHE INTERNAL "")
  
      #SET( CMAKE_EXE_LINKER_FLAGS  "-mv66 -O3 -v " CACHE INTERNAL "")
  
  else()
      message( STATUS "Setting Non-Hexagon target link libraries." )
      target_link_libraries ( celt_Enc ${CELT_SHARED_LIB_NAME} )
  endif()                                                                                                          
  
  if(WIN32)
    set_target_properties( celt_Enc PROPERTIES LINK_FLAGS "/INCREMENTAL:NO" )
    set_target_properties( celt_Dec PROPERTIES LINK_FLAGS "/INCREMENTAL:NO" )
  endif()
  </code></pre>