From f07c0cd7e669fdc7744b2802ee6032a65f9d1314 Mon Sep 17 00:00:00 2001 From: Jamie Smith Date: Thu, 3 Dec 2020 10:51:43 -0800 Subject: [PATCH] Fix variable name conflict with toolchain file --- tools/cmake/profiles/debug.cmake | 20 ++++++++++---------- tools/cmake/profiles/develop.cmake | 20 ++++++++++---------- tools/cmake/profiles/release.cmake | 20 ++++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/tools/cmake/profiles/debug.cmake b/tools/cmake/profiles/debug.cmake index 8eef47bef4..0c1d918108 100644 --- a/tools/cmake/profiles/debug.cmake +++ b/tools/cmake/profiles/debug.cmake @@ -6,16 +6,16 @@ function(mbed_set_profile_options target mbed_toolchain) set(profile_link_options "") if(${mbed_toolchain} STREQUAL "GCC_ARM") - list(APPEND c_compile_options + list(APPEND profile_c_compile_options "-c" "-Og" ) target_compile_options(${target} INTERFACE - $<$:${c_compile_options}> + $<$:${profile_c_compile_options}> ) - list(APPEND cxx_compile_options + list(APPEND profile_cxx_compile_options "-c" "-fno-rtti" "-Wvla" @@ -23,16 +23,16 @@ function(mbed_set_profile_options target mbed_toolchain) ) target_compile_options(${target} INTERFACE - $<$:${cxx_compile_options}> + $<$:${profile_cxx_compile_options}> ) - list(APPEND asm_compile_options + list(APPEND profile_asm_compile_options "-c" "-x" "assembler-with-cpp" ) target_compile_options(${target} INTERFACE - $<$:${asm_compile_options}> + $<$:${profile_asm_compile_options}> ) list(APPEND profile_link_options @@ -48,22 +48,22 @@ function(mbed_set_profile_options target mbed_toolchain) "-Wl,-n" ) elseif(${mbed_toolchain} STREQUAL "ARM") - list(APPEND c_compile_options + list(APPEND profile_c_compile_options "-O1" ) target_compile_options(${target} INTERFACE - $<$:${c_compile_options}> + $<$:${profile_c_compile_options}> ) - list(APPEND cxx_compile_options + list(APPEND profile_cxx_compile_options "-fno-rtti" "-fno-c++-static-destructors" "-O1" ) target_compile_options(${target} INTERFACE - $<$:${cxx_compile_options}> + $<$:${profile_cxx_compile_options}> ) list(APPEND link_options diff --git a/tools/cmake/profiles/develop.cmake b/tools/cmake/profiles/develop.cmake index 58130dd3be..331fa185bc 100644 --- a/tools/cmake/profiles/develop.cmake +++ b/tools/cmake/profiles/develop.cmake @@ -6,31 +6,31 @@ function(mbed_set_profile_options target mbed_toolchain) set(profile_link_options "") if(${mbed_toolchain} STREQUAL "GCC_ARM") - list(APPEND c_compile_options + list(APPEND profile_c_compile_options "-c" "-Os" ) target_compile_options(${target} INTERFACE - $<$:${c_compile_options}> + $<$:${profile_c_compile_options}> ) - list(APPEND cxx_compile_options + list(APPEND profile_cxx_compile_options "-fno-rtti" "-Wvla" "-Os" ) target_compile_options(${target} INTERFACE - $<$:${cxx_compile_options}> + $<$:${profile_cxx_compile_options}> ) - list(APPEND asm_compile_options + list(APPEND profile_asm_compile_options "-x" "assembler-with-cpp" ) target_compile_options(${target} INTERFACE - $<$:${asm_compile_options}> + $<$:${profile_asm_compile_options}> ) list(APPEND profile_link_options @@ -46,22 +46,22 @@ function(mbed_set_profile_options target mbed_toolchain) "-Wl,-n" ) elseif(${mbed_toolchain} STREQUAL "ARM") - list(APPEND c_compile_options + list(APPEND profile_c_compile_options "-Os" ) target_compile_options(${target} INTERFACE - $<$:${c_compile_options}> + $<$:${profile_c_compile_options}> ) - list(APPEND cxx_compile_options + list(APPEND profile_cxx_compile_options "-fno-rtti" "-fno-c++-static-destructors" "-Os" ) target_compile_options(${target} INTERFACE - $<$:${cxx_compile_options}> + $<$:${profile_cxx_compile_options}> ) list(APPEND profile_link_options diff --git a/tools/cmake/profiles/release.cmake b/tools/cmake/profiles/release.cmake index 5fdcd91d1f..877dd18607 100644 --- a/tools/cmake/profiles/release.cmake +++ b/tools/cmake/profiles/release.cmake @@ -6,16 +6,16 @@ function(mbed_set_profile_options target mbed_toolchain) set(profile_link_options "") if(${mbed_toolchain} STREQUAL "GCC_ARM") - list(APPEND c_compile_options + list(APPEND profile_c_compile_options "-c" "-Os" ) target_compile_options(${target} INTERFACE - $<$:${c_compile_options}> + $<$:${profile_c_compile_options}> ) - list(APPEND cxx_compile_options + list(APPEND profile_cxx_compile_options "-c" "-fno-rtti" "-Wvla" @@ -23,16 +23,16 @@ function(mbed_set_profile_options target mbed_toolchain) ) target_compile_options(${target} INTERFACE - $<$:${cxx_compile_options}> + $<$:${profile_cxx_compile_options}> ) - list(APPEND asm_compile_options + list(APPEND profile_asm_compile_options "-c" "-x" "assembler-with-cpp" ) target_compile_options(${target} INTERFACE - $<$:${asm_compile_options}> + $<$:${profile_asm_compile_options}> ) list(APPEND profile_link_options @@ -48,22 +48,22 @@ function(mbed_set_profile_options target mbed_toolchain) "-Wl,-n" ) elseif(${mbed_toolchain} STREQUAL "ARM") - list(APPEND c_compile_options + list(APPEND profile_c_compile_options "-Oz" ) target_compile_options(${target} INTERFACE - $<$:${c_compile_options}> + $<$:${profile_c_compile_options}> ) - list(APPEND cxx_compile_options + list(APPEND profile_cxx_compile_options "-fno-rtti" "-fno-c++-static-destructors" "-Oz" ) target_compile_options(${target} INTERFACE - $<$:${cxx_compile_options}> + $<$:${profile_cxx_compile_options}> ) list(APPEND profile_link_options