Skip to content

Commit

Permalink
fPIC for all unix platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechnobear committed Mar 9, 2018
1 parent a476cfc commit 92842fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ message(STATUS "Processor: ${CMAKE_SYSTEM_PROCESSOR}")
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST")
elseif (UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
if (BELA)
message(STATUS "BELA optimized")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize --fast-math")
else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard")
endif (BELA)
else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST")
Expand Down

0 comments on commit 92842fa

Please sign in to comment.