Cmake compile __asm assembly inline code
<p>I am trying to compile <code>quake2</code> code which uses the <code>__asm</code> keyword like so:</p>

<pre><code>__declspec( naked ) int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, 
    struct cplane_s *p)
{
    static int bops_initialized;
    static int Ljmptab[8];

    __asm {

        push ebx

        cmp bops_initialized, 1
        je  initialized
        mov bops_initialized, 1
        // more code...
</code></pre>

<p>I am using Clion which uses Cmake internally to compile. The thing is that in the code above I get the following errors</p>

<pre><code>C:\Users\Shiro\ClionProjects\quake2\src\game\q_shared.c: In function 
'BoxOnPlaneSide':
C:\Users\Shiro\ClionProjects\quake2\src\game\q_shared.c:423:8: error: 
expected '(' before '{' token
__asm {
      ^
</code></pre>

<p>and the errors go on from there. So, how can I make this compile ? any changes to my CMakeLists.txt perhaps ? Here is part of what I have now</p>

<pre><code>set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Traditional -std=gnu89")
</code></pre>