Skip to content

Commit 38a4a04

Browse files
committed
Update CMakeLists.txt
1 parent 44da856 commit 38a4a04

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

CMakeLists.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ enable_language(ASM_NASM)
88
set(CMAKE_C_COMPILER i686-linux-gnu-gcc)
99
set(CMAKE_ASM_NASM_COMPILER nasm)
1010

11-
# Compilation flags
11+
# Compilation flags for C files only
1212
add_compile_options(
13-
-ffreestanding
14-
-O2
15-
-Wall
16-
-Wextra
17-
-m32
18-
-fno-pie
19-
-fno-PIC
20-
-fno-stack-protector
21-
-nostdlib
22-
-nostdinc
23-
-msse
24-
-msse2
13+
$<$<COMPILE_LANGUAGE:C>:-ffreestanding>
14+
$<$<COMPILE_LANGUAGE:C>:-O2>
15+
$<$<COMPILE_LANGUAGE:C>:-Wall>
16+
$<$<COMPILE_LANGUAGE:C>:-Wextra>
17+
$<$<COMPILE_LANGUAGE:C>:-m32>
18+
$<$<COMPILE_LANGUAGE:C>:-fno-pie>
19+
$<$<COMPILE_LANGUAGE:C>:-fno-PIC>
20+
$<$<COMPILE_LANGUAGE:C>:-fno-stack-protector>
21+
$<$<COMPILE_LANGUAGE:C>:-nostdlib>
22+
$<$<COMPILE_LANGUAGE:C>:-nostdinc>
23+
$<$<COMPILE_LANGUAGE:C>:-msse>
24+
$<$<COMPILE_LANGUAGE:C>:-msse2>
2525
)
2626

2727
include_directories(include)

0 commit comments

Comments
 (0)