Commit 72a47401 by Michael Schmid

new compiler version and changes to flags

parent 2fdf534c
...@@ -26,19 +26,24 @@ ...@@ -26,19 +26,24 @@
# #
function(SetGNUCompilerFlags compiler_libs) function(SetGNUCompilerFlags compiler_libs)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
if(DEFINED CMAKE_SYSTEM_PROCESSOR) if(DEFINED __TriCore__)
set(compiler_libs PARENT_SCOPE) set(compiler_libs PARENT_SCOPE)
set(common_flags "-fno-common -Os -std=c99") set(common_c_flags "-fno-common -Os -std=c99")
set(warning_flags "-W -Wall -Wextra -Wdiv-by-zero -Warray-bounds -Wcast-align -Wignored-qualifiers -Wformat -Wformat-security") set(common_cxx_flags "-fno-common -std=c++0x")
set(warning_flags "-W -Wall -Wextra")
set(target_flags "-DAPPKIT_TC277TFT -DEMBB_DEBUG -fshort-double -mcpu=tc27xx -mversion-info") set(target_flags "-DAPPKIT_TC277TFT -DEMBB_DEBUG -fshort-double -mcpu=tc27xx -mversion-info")
if (WARNINGS_ARE_ERRORS STREQUAL ON) if (WARNINGS_ARE_ERRORS STREQUAL ON)
set(warning_flags "${warning_flags} -Werror") set(warning_flags "${warning_flags} -Werror")
endif() endif()
if(CMAKE_COMPILER_IS_GNUCC) if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${common_flags} ${warning_flags} ${target_flags}" set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${common_c_flags} ${warning_flags} ${target_flags}"
PARENT_SCOPE) PARENT_SCOPE)
endif() endif()
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${common_cxx_flags} ${warning_flags} ${target_flags}"
PARENT_SCOPE)
endif()
else() else()
set(compiler_libs pthread rt PARENT_SCOPE) set(compiler_libs pthread rt PARENT_SCOPE)
# -Wall -> All warnings # -Wall -> All warnings
......
...@@ -10,8 +10,8 @@ set(__TriCore__ 1) ...@@ -10,8 +10,8 @@ set(__TriCore__ 1)
set(EMBB_OS_FREERTOS 1) set(EMBB_OS_FREERTOS 1)
# specify the cross compiler # specify the cross compiler
SET(CMAKE_C_COMPILER C:/HighTec/toolchains/tricore/v4.6.6.0-infineon-1.1/bin/tricore-gcc.exe) SET(CMAKE_C_COMPILER C:/HighTec/toolchains/tricore/v4.9.1.0-infineon-1.1/bin/tricore-gcc.exe)
SET(CMAKE_CXX_COMPILER C:/HighTec/toolchains/tricore/v4.6.6.0-infineon-1.1/bin/tricore-g++.exe) SET(CMAKE_CXX_COMPILER C:/HighTec/toolchains/tricore/v4.9.1.0-infineon-1.1/bin/tricore-c++.exe)
# target environment # target environment
SET(CMAKE_FIND_ROOT_PATH C:/HighTec/toolchains/tricore/v4.6.6.0-infineon-1.1) SET(CMAKE_FIND_ROOT_PATH C:/HighTec/toolchains/tricore/v4.6.6.0-infineon-1.1)
......
...@@ -74,9 +74,6 @@ endif() ...@@ -74,9 +74,6 @@ endif()
if(DEFINED EMBB_OS_FREERTOS) if(DEFINED EMBB_OS_FREERTOS)
#set(CMAKE_CXX_STANDARD_LIBRARIES ${FREE_RTOS_LIB_PATH}/iRom/libFreeRTOS_Lib.a)
#set(CMAKE_C_STANDARD_LIBRARIES ${FREE_RTOS_LIB_PATH}/iRom/libFreeRTOS_Lib.a)
#set(CMAKE_INSTALL_RPATH ${FREE_RTOS_LIB_PATH})
file(GLOB_RECURSE FREE_RTOS_HEADERS "${FREE_RTOS_LIB_PATH}/*.h") file(GLOB_RECURSE FREE_RTOS_HEADERS "${FREE_RTOS_LIB_PATH}/*.h")
endif() endif()
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment