Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Unity
提交
185fb493
T
Third Party Unity
项目概览
OpenHarmony
/
Third Party Unity
1 年多 前同步成功
通知
36
Star
144
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Unity
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
185fb493
编写于
1月 18, 2017
作者:
J
jsalling
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cleanup example Makefiles, update test runners
Delete clang flags that were disabled with -Wno-*
上级
d460a89a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
28 addition
and
41 deletion
+28
-41
examples/example_1/makefile
examples/example_1/makefile
+12
-11
examples/example_1/test/test_runners/TestProductionCode2_Runner.c
.../example_1/test/test_runners/TestProductionCode2_Runner.c
+1
-1
examples/example_1/test/test_runners/TestProductionCode_Runner.c
...s/example_1/test/test_runners/TestProductionCode_Runner.c
+1
-1
examples/example_2/makefile
examples/example_2/makefile
+14
-16
test/targets/clang_file.yml
test/targets/clang_file.yml
+0
-6
test/targets/clang_strict.yml
test/targets/clang_strict.yml
+0
-6
未找到文件。
examples/example_1/makefile
浏览文件 @
185fb493
...
...
@@ -5,17 +5,14 @@
# ==========================================
#We try to detect the OS we are running on, and adjust commands as needed
ifeq
($(OSTYPE),cygwin)
CLEANUP
=
rm
-f
MKDIR
=
mkdir
-p
TARGET_EXTENSION
=
.out
else
ifeq
($(OSTYPE),msys)
CLEANUP
=
rm
-f
MKDIR
=
mkdir
-p
TARGET_EXTENSION
=
.exe
else
ifeq
($(OS),Windows_NT)
ifeq
($(OS),Windows_NT)
ifeq
($(shell uname -s),)
# not in a bash-like shell
CLEANUP
=
del /F /Q
MKDIR
=
mkdir
else
# in a bash-like shell, like msys
CLEANUP
=
rm
-f
MKDIR
=
mkdir
-p
endif
TARGET_EXTENSION
=
.exe
else
CLEANUP
=
rm
-f
...
...
@@ -23,8 +20,12 @@ else
TARGET_EXTENSION
=
.out
endif
UNITY_ROOT
=
../..
C_COMPILER
=
gcc
ifeq
($(shell uname -s), Darwin)
C_COMPILER
=
clang
endif
UNITY_ROOT
=
../..
CFLAGS
=
-std
=
c89
CFLAGS
+=
-Wall
...
...
@@ -48,7 +49,7 @@ TARGET2 = $(TARGET_BASE2)$(TARGET_EXTENSION)
SRC_FILES1
=
$(UNITY_ROOT)
/src/unity.c src/ProductionCode.c
test
/TestProductionCode.c
test
/test_runners/TestProductionCode_Runner.c
SRC_FILES2
=
$(UNITY_ROOT)
/src/unity.c src/ProductionCode2.c
test
/TestProductionCode2.c
test
/test_runners/TestProductionCode2_Runner.c
INC_DIRS
=
-Isrc
-I
$(UNITY_ROOT)
/src
SYMBOLS
=
-DTEST
SYMBOLS
=
all
:
clean default
...
...
examples/example_1/test/test_runners/TestProductionCode2_Runner.c
浏览文件 @
185fb493
...
...
@@ -11,7 +11,7 @@
setUp(); \
TestFunc(); \
} \
if (TEST_PROTECT()
&& !TEST_IS_IGNORED
) \
if (TEST_PROTECT()) \
{ \
tearDown(); \
} \
...
...
examples/example_1/test/test_runners/TestProductionCode_Runner.c
浏览文件 @
185fb493
...
...
@@ -11,7 +11,7 @@
setUp(); \
TestFunc(); \
} \
if (TEST_PROTECT()
&& !TEST_IS_IGNORED
) \
if (TEST_PROTECT()) \
{ \
tearDown(); \
} \
...
...
examples/example_2/makefile
浏览文件 @
185fb493
...
...
@@ -5,17 +5,14 @@
# ==========================================
#We try to detect the OS we are running on, and adjust commands as needed
ifeq
($(OSTYPE),cygwin)
CLEANUP
=
rm
-f
MKDIR
=
mkdir
-p
TARGET_EXTENSION
=
.out
else
ifeq
($(OSTYPE),msys)
CLEANUP
=
rm
-f
MKDIR
=
mkdir
-p
TARGET_EXTENSION
=
.exe
else
ifeq
($(OS),Windows_NT)
ifeq
($(OS),Windows_NT)
ifeq
($(shell uname -s),)
# not in a bash-like shell
CLEANUP
=
del /F /Q
MKDIR
=
mkdir
else
# in a bash-like shell, like msys
CLEANUP
=
rm
-f
MKDIR
=
mkdir
-p
endif
TARGET_EXTENSION
=
.exe
else
CLEANUP
=
rm
-f
...
...
@@ -23,13 +20,16 @@ else
TARGET_EXTENSION
=
.out
endif
UNITY_ROOT
=
../..
C_COMPILER
=
gcc
ifeq
($(shell uname -s), Darwin)
C_COMPILER
=
clang
endif
UNITY_ROOT
=
../..
CFLAGS
=
-std
=
c99
CFLAGS
=
-std
=
c99
CFLAGS
+=
-Wall
CFLAGS
+=
-Wextra
CFLAGS
+=
-Werror
CFLAGS
+=
-Wpointer-arith
CFLAGS
+=
-Wcast-align
CFLAGS
+=
-Wwrite-strings
...
...
@@ -41,8 +41,6 @@ CFLAGS += -Wno-unknown-pragmas
CFLAGS
+=
-Wstrict-prototypes
CFLAGS
+=
-Wundef
CFLAGS
+=
-Wold-style-definition
CFLAGS
+=
-Wmissing-prototypes
CFLAGS
+=
-Wmissing-declarations
TARGET_BASE1
=
all_tests
TARGET1
=
$(TARGET_BASE1)$(TARGET_EXTENSION)
...
...
@@ -63,8 +61,8 @@ all: clean default
default
:
$(C_COMPILER)
$(CFLAGS)
$(INC_DIRS)
$(SYMBOLS)
$(SRC_FILES1)
-o
$(TARGET1)
./
$(TARGET1)
-v
-
./
$(TARGET1)
-v
clean
:
$(CLEANUP)
$(CLEANUP)
$(TARGET1)
test/targets/clang_file.yml
浏览文件 @
185fb493
...
...
@@ -16,13 +16,10 @@ compiler:
-
'
-Winit-self'
-
'
-Winline'
-
'
-Winvalid-pch'
-
'
-Wmissing-declarations'
-
'
-Wmissing-include-dirs'
-
'
-Wmissing-prototypes'
-
'
-Wnonnull'
-
'
-Wpacked'
-
'
-Wpointer-arith'
-
'
-Wredundant-decls'
-
'
-Wswitch-default'
-
'
-Wstrict-aliasing'
-
'
-Wstrict-overflow=5'
...
...
@@ -33,10 +30,7 @@ compiler:
-
'
-Wshadow'
-
'
-Wundef'
-
'
-Wwrite-strings'
-
'
-Wno-missing-declarations'
-
'
-Wno-missing-prototypes'
-
'
-Wno-nested-externs'
-
'
-Wno-redundant-decls'
-
'
-Wno-unused-parameter'
-
'
-Wno-variadic-macros'
-
'
-Wbad-function-cast'
...
...
test/targets/clang_strict.yml
浏览文件 @
185fb493
...
...
@@ -16,13 +16,10 @@ compiler:
-
'
-Winit-self'
-
'
-Winline'
-
'
-Winvalid-pch'
-
'
-Wmissing-declarations'
-
'
-Wmissing-include-dirs'
-
'
-Wmissing-prototypes'
-
'
-Wnonnull'
-
'
-Wpacked'
-
'
-Wpointer-arith'
-
'
-Wredundant-decls'
-
'
-Wswitch-default'
-
'
-Wstrict-aliasing'
-
'
-Wstrict-overflow=5'
...
...
@@ -33,10 +30,7 @@ compiler:
-
'
-Wshadow'
-
'
-Wundef'
-
'
-Wwrite-strings'
-
'
-Wno-missing-declarations'
-
'
-Wno-missing-prototypes'
-
'
-Wno-nested-externs'
-
'
-Wno-redundant-decls'
-
'
-Wno-unused-parameter'
-
'
-Wno-variadic-macros'
-
'
-Wbad-function-cast'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录