Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
10e543b9
authored
8 years ago
by
Michael Schmid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added cxx_flags
parent
03adc123
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
CMakeCommon/SetCompilerFlags.cmake
+9
-4
No files found.
CMakeCommon/SetCompilerFlags.cmake
View file @
10e543b9
...
...
@@ -26,17 +26,22 @@
#
function
(
SetGNUCompilerFlags compiler_libs
)
if
(
CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX
)
if
(
DEFINED
CMAKE_SYSTEM_PROCESSOR
)
if
(
DEFINED
__TriCore__
)
set
(
compiler_libs PARENT_SCOPE
)
set
(
common_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_c_flags
"-fno-common -Os -std=c99"
)
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"
)
if
(
WARNINGS_ARE_ERRORS STREQUAL ON
)
set
(
warning_flags
"
${
warning_flags
}
-Werror"
)
endif
()
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
)
endif
()
if
(
CMAKE_COMPILER_IS_GNUCXX
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
common_cxx_flags
}
${
warning_flags
}
${
target_flags
}
"
PARENT_SCOPE
)
endif
()
else
()
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment