Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jvde-github authored Nov 16, 2024
1 parent 2479311 commit c83b9d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ option(ZMQ "Include ZMQ support" ON)
option(PSQL "Include PSQL support" ON)
option(OPENSSL "Include OPENSSL support" ON)
option(NMEA2000 "Include NMEA2000 support" ON)
option(ARMV6 "Compile for Raspberry Pi Zero" OFF)

set(NMEA2000_PATH "." CACHE PATH "Path to NMEA2000 library")

Expand All @@ -33,6 +34,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options("-Wno-psabi")
add_compile_options("-Wno-sign-compare")
set(OPTIMIZATION_FLAGS "-Ofast")

if(ARMV6)
message(STATUS "Compiling for ARMv6 (Raspberry Pi Zero)")
set(OPTIMIZATION_FLAGS "${OPTIMIZATION_FLAGS} -march=armv6 -mfpu=vfp -mfloat-abi=hard")
endif()
elseif(MSVC)
set(OPTIMIZATION_FLAGS "-DWIN32_LEAN_AND_MEAN /EHsc /Oi /Ot /fp:fast")
endif()
Expand Down

0 comments on commit c83b9d1

Please sign in to comment.