Skip to content

Commit f07c0cd

Browse files
Fix variable name conflict with toolchain file
1 parent 423e8b0 commit f07c0cd

File tree

3 files changed

+30
-30
lines changed

3 files changed

+30
-30
lines changed

tools/cmake/profiles/debug.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,33 @@ function(mbed_set_profile_options target mbed_toolchain)
66
set(profile_link_options "")
77

88
if(${mbed_toolchain} STREQUAL "GCC_ARM")
9-
list(APPEND c_compile_options
9+
list(APPEND profile_c_compile_options
1010
"-c"
1111
"-Og"
1212
)
1313
target_compile_options(${target}
1414
INTERFACE
15-
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
15+
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}>
1616
)
1717

18-
list(APPEND cxx_compile_options
18+
list(APPEND profile_cxx_compile_options
1919
"-c"
2020
"-fno-rtti"
2121
"-Wvla"
2222
"-Og"
2323
)
2424
target_compile_options(${target}
2525
INTERFACE
26-
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
26+
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
2727
)
2828

29-
list(APPEND asm_compile_options
29+
list(APPEND profile_asm_compile_options
3030
"-c"
3131
"-x" "assembler-with-cpp"
3232
)
3333
target_compile_options(${target}
3434
INTERFACE
35-
$<$<COMPILE_LANGUAGE:ASM>:${asm_compile_options}>
35+
$<$<COMPILE_LANGUAGE:ASM>:${profile_asm_compile_options}>
3636
)
3737

3838
list(APPEND profile_link_options
@@ -48,22 +48,22 @@ function(mbed_set_profile_options target mbed_toolchain)
4848
"-Wl,-n"
4949
)
5050
elseif(${mbed_toolchain} STREQUAL "ARM")
51-
list(APPEND c_compile_options
51+
list(APPEND profile_c_compile_options
5252
"-O1"
5353
)
5454
target_compile_options(${target}
5555
INTERFACE
56-
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
56+
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}>
5757
)
5858

59-
list(APPEND cxx_compile_options
59+
list(APPEND profile_cxx_compile_options
6060
"-fno-rtti"
6161
"-fno-c++-static-destructors"
6262
"-O1"
6363
)
6464
target_compile_options(${target}
6565
INTERFACE
66-
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
66+
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
6767
)
6868

6969
list(APPEND link_options

tools/cmake/profiles/develop.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@ function(mbed_set_profile_options target mbed_toolchain)
66
set(profile_link_options "")
77

88
if(${mbed_toolchain} STREQUAL "GCC_ARM")
9-
list(APPEND c_compile_options
9+
list(APPEND profile_c_compile_options
1010
"-c"
1111
"-Os"
1212
)
1313
target_compile_options(${target}
1414
INTERFACE
15-
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
15+
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}>
1616
)
1717

18-
list(APPEND cxx_compile_options
18+
list(APPEND profile_cxx_compile_options
1919
"-fno-rtti"
2020
"-Wvla"
2121
"-Os"
2222
)
2323
target_compile_options(${target}
2424
INTERFACE
25-
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
25+
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
2626
)
2727

28-
list(APPEND asm_compile_options
28+
list(APPEND profile_asm_compile_options
2929
"-x" "assembler-with-cpp"
3030
)
3131
target_compile_options(${target}
3232
INTERFACE
33-
$<$<COMPILE_LANGUAGE:ASM>:${asm_compile_options}>
33+
$<$<COMPILE_LANGUAGE:ASM>:${profile_asm_compile_options}>
3434
)
3535

3636
list(APPEND profile_link_options
@@ -46,22 +46,22 @@ function(mbed_set_profile_options target mbed_toolchain)
4646
"-Wl,-n"
4747
)
4848
elseif(${mbed_toolchain} STREQUAL "ARM")
49-
list(APPEND c_compile_options
49+
list(APPEND profile_c_compile_options
5050
"-Os"
5151
)
5252
target_compile_options(${target}
5353
INTERFACE
54-
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
54+
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}>
5555
)
5656

57-
list(APPEND cxx_compile_options
57+
list(APPEND profile_cxx_compile_options
5858
"-fno-rtti"
5959
"-fno-c++-static-destructors"
6060
"-Os"
6161
)
6262
target_compile_options(${target}
6363
INTERFACE
64-
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
64+
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
6565
)
6666

6767
list(APPEND profile_link_options

tools/cmake/profiles/release.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,33 @@ function(mbed_set_profile_options target mbed_toolchain)
66
set(profile_link_options "")
77

88
if(${mbed_toolchain} STREQUAL "GCC_ARM")
9-
list(APPEND c_compile_options
9+
list(APPEND profile_c_compile_options
1010
"-c"
1111
"-Os"
1212
)
1313
target_compile_options(${target}
1414
INTERFACE
15-
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
15+
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}>
1616
)
1717

18-
list(APPEND cxx_compile_options
18+
list(APPEND profile_cxx_compile_options
1919
"-c"
2020
"-fno-rtti"
2121
"-Wvla"
2222
"-Os"
2323
)
2424
target_compile_options(${target}
2525
INTERFACE
26-
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
26+
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
2727
)
2828

29-
list(APPEND asm_compile_options
29+
list(APPEND profile_asm_compile_options
3030
"-c"
3131
"-x" "assembler-with-cpp"
3232
)
3333
target_compile_options(${target}
3434
INTERFACE
35-
$<$<COMPILE_LANGUAGE:ASM>:${asm_compile_options}>
35+
$<$<COMPILE_LANGUAGE:ASM>:${profile_asm_compile_options}>
3636
)
3737

3838
list(APPEND profile_link_options
@@ -48,22 +48,22 @@ function(mbed_set_profile_options target mbed_toolchain)
4848
"-Wl,-n"
4949
)
5050
elseif(${mbed_toolchain} STREQUAL "ARM")
51-
list(APPEND c_compile_options
51+
list(APPEND profile_c_compile_options
5252
"-Oz"
5353
)
5454
target_compile_options(${target}
5555
INTERFACE
56-
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
56+
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}>
5757
)
5858

59-
list(APPEND cxx_compile_options
59+
list(APPEND profile_cxx_compile_options
6060
"-fno-rtti"
6161
"-fno-c++-static-destructors"
6262
"-Oz"
6363
)
6464
target_compile_options(${target}
6565
INTERFACE
66-
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
66+
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
6767
)
6868

6969
list(APPEND profile_link_options

0 commit comments

Comments
 (0)