From 1d5156380ea04a778a3edcc49245ace35d10e2ae Mon Sep 17 00:00:00 2001 From: Artur Harasimiuk Date: Thu, 18 Jun 2020 10:58:36 +0200 Subject: [PATCH] cmake: refactor BRANCH_TYPE evaluation Change-Id: Idc811e231dd993e9ff82c6080a7da69149b6da77 Signed-off-by: Artur Harasimiuk --- .branch | 0 CMakeLists.txt | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .branch diff --git a/.branch b/.branch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 8713afc6d6..a963dc1fc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,8 @@ set(GLOBAL PROPERTY NEO_OCL_COMPONENTS_LIST "") define_property(GLOBAL PROPERTY NEO_L0_COMPONENTS_LIST BRIEF_DOCS "List of components" FULL_DOCS "List of components to create packages") set(GLOBAL PROPERTY NEO_L0_COMPONENTS_LIST "") -set(BRANCH_TYPE "") +file(READ ".branch" BRANCH_TYPE) +string(STRIP "${BRANCH_TYPE}" BRANCH_TYPE) set(BRANCH_DIR_SUFFIX "/${BRANCH_TYPE}") list(APPEND BRANCH_DIR_LIST "/") if(NOT "${BRANCH_TYPE}" STREQUAL "")