PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
998B

  1. option(BUILDER_ENABLE_PROFILING OFF)
  2. macro(setup_builder)
  3. enable_testing()
  4. set(ROOT_SOURCE_DIR ${PROJECT_SOURCE_DIR} CACHE INTERNAL "Repository root directory")
  5. set(ROOT_BINARY_DIR "${ROOT_SOURCE_DIR}/build")
  6. include_directories(${ROOT_SOURCE_DIR})
  7. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
  8. -Wall \
  9. -W \
  10. -Wshadow \
  11. -Wunused-variable \
  12. -Wunused-parameter \
  13. -Wunused-function \
  14. -Wunused \
  15. -Wno-system-headers \
  16. -Wno-deprecated \
  17. -Woverloaded-virtual \
  18. ")
  19. if (BUILDER_ENABLE_PROFILING)
  20. set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
  21. set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} --coverage")
  22. endif()
  23. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  24. endmacro()
  25. macro(increase_warning_level)
  26. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion -Wsign-conversion")
  27. endmacro()