esp-idf/components/esp32/project_include.cmake
Angus Gratton 56694fb4b6 cmake: Fix psram workaround compiler flag application
Previously, this compiler flag was not being applied
regardless of CONFIG_SPIRAM_CACHE_WORKAROUND setting.

Explanation: add_compile_options() only applies to
source files added after the function is run, or in
subdirectories added after the function is run. In
this case, no new source files were being added after
this function was run.
2019-02-27 16:38:29 +11:00

9 lines
405 B
CMake

if(CONFIG_SPIRAM_CACHE_WORKAROUND)
# We do this here as well as in CMakeLists.txt, because targets that
# are not part of the ESP-IDF build system (for cases where a generic
# non-IDF CMakeLists.txt file is imported into a component) don't depend
# on the esp32 component so don't get the extra flag. This handles that case.
add_compile_options(-mfix-esp32-psram-cache-issue)
endif()