Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Check all default paths existence before setting them #232

Open
robamu opened this issue Jul 15, 2021 · 0 comments · May be fixed by #246
Open

Check all default paths existence before setting them #232

robamu opened this issue Jul 15, 2021 · 0 comments · May be fixed by #246

Comments

@robamu
Copy link
Contributor

robamu commented Jul 15, 2021

If no configuration is provided via environment/argument/upper CMakeList.txt, default paths will be set. However, it is not checked whether these paths/directories actually exist. It would be a good idea to do this everywhere this is done.

Example which might be merged in FindFreeRTOS.cmake soon (#227) :

if(NOT FREERTOS_PATH)
    set(FREERTOS_PATH $ENV{FREERTOS_PATH} CACHE PATH "Path to FreeRTOS")
endif()

if(NOT FREERTOS_PATH)
    set(DEFAULT_FREERTOS_PATH "/opt/FreeRTOS")
    if(EXISTS ${DEFAULT_FREERTOS_PATH})
        set(FREERTOS_PATH ${DEFAULT_FREERTOS_PATH} CACHE PATH "Path to FreeRTOS")
        message(STATUS "No FREERTOS_PATH specified using default: ${DEFAULT_FREERTOS_PATH}")
    else()
        message(STATUS
            "No FreeRTOS folder found at default location ${DEFAULT_FREERTOS_PATH}. "
            "Leaving empty
        )
    endif()
endif()
@atsju atsju changed the title Check all default paths Check all default paths existence before setting them Jul 15, 2021
@BenArtes BenArtes linked a pull request Jul 23, 2021 that will close this issue
8 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant