testsuite: fix unittest cross-language flags
Unit tests may include C++ code, so ensure the compiler flags are consistent to avoid link errors. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
c2b567f79e
commit
9024669a67
|
@ -45,8 +45,10 @@ else()
|
|||
|
||||
if(M64_MODE)
|
||||
set (CMAKE_C_FLAGS "-m64")
|
||||
set (CMAKE_CXX_FLAGS "-m64")
|
||||
else()
|
||||
set (CMAKE_C_FLAGS "-m32") #deprecated on macOS
|
||||
set (CMAKE_CXX_FLAGS "-m32") #deprecated on macOS
|
||||
endif(M64_MODE)
|
||||
|
||||
endif()
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Work around apparent inconsistency in C and C++ object machine configuration
|
||||
string(PREPEND CMAKE_C_FLAGS "-m32 ")
|
||||
string(PREPEND CMAKE_CXX_FLAGS "-m32 ")
|
||||
|
||||
project(util)
|
||||
set(SOURCES main.c maincxx.cxx ../../../lib/os/dec.c)
|
||||
find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
|
|
Loading…
Reference in a new issue