Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Remove TARGET prefix for Freescale #5

Merged
merged 1 commit into from
Mar 16, 2020

Conversation

bulislaw
Copy link
Collaborator

We don't need magic names anymore. Thoughts?

@0xc0170 @ithinuel

@0xc0170
Copy link
Owner

0xc0170 commented Mar 16, 2020

I was just thinking about this and made a prototype how to select properly directory without any prefix:

# LABEL- label to be matched
# DIRECTORY_PATH - directory to be added
function(mbed_add_cmake_directory_if_target_label LABEL DIRECTORY_PATH)
    foreach(key ${MBED_OS_TARGET_LABELS})
        if(${key} STREQUAL ${LABEL})
            add_subdirectory(${DIRECTORY_PATH})
        endif()
    endforeach()
endfunction()

In targets/Freescale/CMakeLists.txt:

mbed_add_target_cmake_directory(K20XX TARGET_K20XX)
mbed_add_target_cmake_directory(KLXX TARGET_KLXX)
mbed_add_target_cmake_directory(MCUXpresso_MCUS TARGET_MCUXpresso_MCUS)

Based on the target lists coming from a target, it would select properly the target folders.

@ithinuel
Copy link
Collaborator

+1 though for consistency I'd rather like our story around "targets" to be 100% in sync with the other teams (CF our recent offline discussion and the minute of last tool team's demo)

@0xc0170
Copy link
Owner

0xc0170 commented Mar 16, 2020

I was considering a use case for not matching tree (labels != folder names) in my earlier comment.

This looks fine to me to remove TARGET_ prefixes - auto matching the dir name based on labels.

(CF our recent offline discussion and the minute of last tool team's demo)

What is this, can you elaborate ?

@0xc0170 0xc0170 merged commit 982bb29 into 0xc0170:dev_cmake Mar 16, 2020
0xc0170 pushed a commit that referenced this pull request Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants