From 30ba1a28dc305aa31411695832a47e24c5a864b3 Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Mon, 14 Dec 2020 16:30:26 -0700 Subject: zephyr: put project(...) after find_package(Zephyr) When including the Zephyr source, this will change the values of CMAKE_C_COMPILER and CMAKE_CXX_COMPILER, causing cmake to execute again having forgotten about some of the command (since these are cached variables). BUG=b:175248887 BRANCH=none TEST=zmake testall, no "cached variables have changed" from cmake Signed-off-by: Jack Rosenthal Change-Id: I7eb1004060b0ba51d8c336dfe507ad747abe80ee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2591627 Reviewed-by: Simon Glass --- zephyr/test/base32/CMakeLists.txt | 2 +- zephyr/test/crc/CMakeLists.txt | 2 +- zephyr/test/hooks/CMakeLists.txt | 2 +- zephyr/test/i2c/CMakeLists.txt | 2 +- zephyr/test/tasks/CMakeLists.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/zephyr/test/base32/CMakeLists.txt b/zephyr/test/base32/CMakeLists.txt index e6172218d6..6ae6f232a9 100644 --- a/zephyr/test/base32/CMakeLists.txt +++ b/zephyr/test/base32/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.13.1) set(BOARD native_posix) -project(base32) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(base32) # Need to ensure that we are including only zephyr definitions in include files # We cannot set these via kconfig, since this unit test does not bring in the diff --git a/zephyr/test/crc/CMakeLists.txt b/zephyr/test/crc/CMakeLists.txt index d8b4d9fadc..8c1a38b56a 100644 --- a/zephyr/test/crc/CMakeLists.txt +++ b/zephyr/test/crc/CMakeLists.txt @@ -5,8 +5,8 @@ cmake_minimum_required(VERSION 3.13.1) set(BOARD native_posix) -project(tasks) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(tasks) # We need to include the EC include directory and this local test directory # for the task defines diff --git a/zephyr/test/hooks/CMakeLists.txt b/zephyr/test/hooks/CMakeLists.txt index 1347a8f75f..e44ebfe674 100644 --- a/zephyr/test/hooks/CMakeLists.txt +++ b/zephyr/test/hooks/CMakeLists.txt @@ -4,8 +4,8 @@ cmake_minimum_required(VERSION 3.13.1) set(BOARD native_posix) -project(hooks) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(hooks) # Need to ensure that we are including only zephyr definitions in include files # We cannot set these via kconfig, since this unit test does not bring in the diff --git a/zephyr/test/i2c/CMakeLists.txt b/zephyr/test/i2c/CMakeLists.txt index 29b3f1e65d..94c5deb8cc 100644 --- a/zephyr/test/i2c/CMakeLists.txt +++ b/zephyr/test/i2c/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.13.1) set(BOARD native_posix) -project(base32) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(base32) # Need to ensure that we are including only zephyr definitions in include files # We cannot set these via kconfig, since this unit test does not bring in the diff --git a/zephyr/test/tasks/CMakeLists.txt b/zephyr/test/tasks/CMakeLists.txt index 714fde1d9a..174d3b6428 100644 --- a/zephyr/test/tasks/CMakeLists.txt +++ b/zephyr/test/tasks/CMakeLists.txt @@ -5,8 +5,8 @@ cmake_minimum_required(VERSION 3.13.1) set(BOARD native_posix) -project(tasks) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(tasks) # Need to ensure that we are including only zephyr definitions in include files # We cannot set these via kconfig, since this unit test does not bring in the -- cgit v1.2.1