Commit 8df0cc3a authored by Manish's avatar Manish Committed by Robert Schmidt

Compile time flag added for native architecture compilation

Signed-off-by: default avatarManish <Manish1.Kumar@amd.com>
parent ee9ec777
...@@ -59,6 +59,8 @@ BUILD_ECLIPSE=0 ...@@ -59,6 +59,8 @@ BUILD_ECLIPSE=0
NR="False" NR="False"
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope" OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope"
RU=0 RU=0
CMAKE_C_FLAGS=()
CMAKE_CXX_FLAGS=()
function print_help() { function print_help() {
echo_info " echo_info "
...@@ -182,6 +184,10 @@ function main() { ...@@ -182,6 +184,10 @@ function main() {
until [ -z "$1" ] until [ -z "$1" ]
do do
case "$1" in case "$1" in
--archnative)
CMAKE_C_FLAGS+=("-march=native")
CMAKE_CXX_FLAGS+=("-march=native")
shift;;
-c | --clean) -c | --clean)
CLEAN=1 CLEAN=1
shift;; shift;;
...@@ -609,6 +615,8 @@ function main() { ...@@ -609,6 +615,8 @@ function main() {
mkdir -p $DIR/$BUILD_DIR/build mkdir -p $DIR/$BUILD_DIR/build
cd $DIR/$BUILD_DIR/build cd $DIR/$BUILD_DIR/build
if [[ ${#CMAKE_C_FLAGS[@]} > 0 ]]; then CMAKE_CMD="$CMAKE_CMD -DCMAKE_C_FLAGS=\"${CMAKE_C_FLAGS[*]}\""; fi
if [[ ${#CMAKE_CXX_FLAGS[@]} > 0 ]]; then CMAKE_CMD="$CMAKE_CMD -DCMAKE_CXX_FLAGS=\"${CMAKE_CXX_FLAGS[*]}\""; fi
echo_info "running $CMAKE_CMD" echo_info "running $CMAKE_CMD"
eval $CMAKE_CMD ../.. eval $CMAKE_CMD ../..
......
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 to comment