<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello list, <br>
    <br>
    I have a couple of questions whose answers I couldn't find. So first
    thing's first - I have the following function which I intend to use
    to add a number of library targets: <br>
    <br>
    <font face="Comic Sans MS, sans-serif" size="2">
      <div>function(build_mps_m3_lib LIBRARY_NAME C_SOURCE ASM_SOURCE
        CPU_TYPE)</div>
      <div>&nbsp;&nbsp;&nbsp; set_property(SOURCE ${${C_SOURCE}} PROPERTY COMPILE_FLAGS
        "-g --cpu=${CPU_TYPE} -O0")</div>
      <div>&nbsp;&nbsp;&nbsp; set_property(SOURCE ${${ASM_SOURCE}} PROPERTY
        COMPILE_FLAGS "-g --cpu=${CPU_TYPE} --apcs=interwork")</div>
      <div>&nbsp;&nbsp;&nbsp; add_library(${LIBRARY_NAME}&nbsp; ${${SOURCE}}
        ${${ASM_SOURCE}})</div>
      <div>&nbsp;&nbsp;&nbsp; set(TARGET_DIR "mps-m3")</div>
      <div>&nbsp;&nbsp;&nbsp; set(ASM_COMPILE_FLAGS "-g --cpu=${CPU_TYPE}
        --apcs=interwork")</div>
      <div>&nbsp;&nbsp;&nbsp; #custom armasm command line</div>
      <div>&nbsp;&nbsp;&nbsp; set(CMAKE_ASM_COMPILE_OBJECT "&lt;CMAKE_ASM_COMPILER&gt;
        ${ASM_COMPILE_FLAGS} &lt;SOURCE&gt; -o &lt;OBJECT&gt;")</div>
      <div>&nbsp;&nbsp;&nbsp; #set_target_properties(${LIBRARY_NAME} PROPERTIES
        C_COMPILE_FLAGS "-g --cpu=${CPU_TYPE} -O0")</div>
      <div>&nbsp;</div>
      <div>endfunction(build_mps_m3_lib)<br>
        <br>
        <font size="2"></font><br>
      </div>
    </font><tt>What I want to achieve is to have clear separation
      between the ASM compiler flags and the C compiler flags. Since I'm
      not using the GNU (ergo GCC) toolchain </tt>I cannot simply set
    the properties on the resulting library target to set the
    COMPILE_FLAGS. Essentially what I want to achieve is being able to
    set arbitrary compile options for the C and ASM compiler WITHOUT
    both of those interfering. <br>
    <br>
    My second questions: The way I pass the lists of sources is kind of
    ugly - e.g. I'm, in-essence, doing double indirection the ${${blah}}
    thingy. What would be the correct way. I tried with ${blah-list} but
    this skewed the arguments order<br>
    <br>
    <br>
    Regards<br>
  </body>
</html>