Skip to content

Commit d8824f9

Browse files
committed
CI: Clarify purpose of example_null, Changelog
1 parent ac5ffff commit d8824f9

File tree

4 files changed

+27
-18
lines changed

4 files changed

+27
-18
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
4444
# Not using matrix here because it would inflate job count too much. Check out and setup is done for every job and that makes build times way too long.
4545
- name: Build example_null (extra warnings, mingw 64-bit)
46-
run: mingw32-make -C examples/example_null EXTRA_WARNINGS=1
46+
run: mingw32-make -C examples/example_null WITH_EXTRA_WARNINGS=1
4747

4848
- name: Build example_null (extra warnings, msvc 64-bit)
4949
shell: cmd
@@ -171,22 +171,22 @@ jobs:
171171
- name: Build example_null (extra warnings, gcc 32-bit)
172172
run: |
173173
make -C examples/example_null clean
174-
CXXFLAGS="$CXXFLAGS -m32 -Werror" make -C examples/example_null EXTRA_WARNINGS=1
174+
CXXFLAGS="$CXXFLAGS -m32 -Werror" make -C examples/example_null WITH_EXTRA_WARNINGS=1
175175
176176
- name: Build example_null (extra warnings, gcc 64-bit)
177177
run: |
178178
make -C examples/example_null clean
179-
CXXFLAGS="$CXXFLAGS -m64 -Werror" make -C examples/example_null EXTRA_WARNINGS=1
179+
CXXFLAGS="$CXXFLAGS -m64 -Werror" make -C examples/example_null WITH_EXTRA_WARNINGS=1
180180
181181
- name: Build example_null (extra warnings, clang 32-bit)
182182
run: |
183183
make -C examples/example_null clean
184-
CXXFLAGS="$CXXFLAGS -m32 -Werror" CXX=clang++ make -C examples/example_null EXTRA_WARNINGS=1
184+
CXXFLAGS="$CXXFLAGS -m32 -Werror" CXX=clang++ make -C examples/example_null WITH_EXTRA_WARNINGS=1
185185
186186
- name: Build example_null (extra warnings, clang 64-bit)
187187
run: |
188188
make -C examples/example_null clean
189-
CXXFLAGS="$CXXFLAGS -m64 -Werror" CXX=clang++ make -C examples/example_null EXTRA_WARNINGS=1
189+
CXXFLAGS="$CXXFLAGS -m64 -Werror" CXX=clang++ make -C examples/example_null WITH_EXTRA_WARNINGS=1
190190
191191
- name: Build example_null (freetype)
192192
run: |
@@ -260,7 +260,7 @@ jobs:
260260
brew install sdl2
261261
262262
- name: Build example_null (extra warnings, clang 64-bit)
263-
run: make -C examples/example_null EXTRA_WARNINGS=1
263+
run: make -C examples/example_null WITH_EXTRA_WARNINGS=1
264264

265265
- name: Build example_null (single file build)
266266
run: |
@@ -358,6 +358,6 @@ jobs:
358358
exit 0
359359
fi
360360
cd examples/example_null
361-
pvs-studio-analyzer trace -- make EXTRA_WARNINGS=1
361+
pvs-studio-analyzer trace -- make WITH_EXTRA_WARNINGS=1
362362
pvs-studio-analyzer analyze -e ../../imstb_rectpack.h -e ../../imstb_textedit.h -e ../../imstb_truetype.h -l ../../pvs-studio.lic -o pvs-studio.log
363363
plog-converter -a 'GA:1,2;OP:1' -t errorfile -w pvs-studio.log

docs/CHANGELOG.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ Other Changes:
6161
in imgui_freetype.cpp (matching support in the regular code path). (#3062) [@DonKult]
6262
- Demo: Added black and white and color gradients to Demo>Examples>Custom Rendering.
6363
- CI: Added more tests on the continuous-integration server: extra warnings for Clang/GCC, building
64-
SDL+Metal example, and more compile-time imconfig.h settings: disabling obsolete functions,
65-
enabling 32-bit draw indices, enabling 32-bit ImWchar, disabling demo/metrics, etc. [@rokups]
64+
SDL+Metal example, building imgui_freetype.cpp, more compile-time imconfig.h settings: disabling
65+
obsolete functions, enabling 32-bit ImDrawIdx, enabling 32-bit ImWchar, disabling demo. [@rokups]
6666
- Backends: Win32: Added ImGui_ImplWin32_EnableDpiAwareness(), ImGui_ImplWin32_GetDpiScaleForHwnd(),
6767
ImGui_ImplWin32_GetDpiScaleForMonitor() helpers functions (backported from the docking branch).
6868
Those functions makes it easier for example apps to support hi-dpi features without setting up

examples/README.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Those will allow you to create portable applications and will solve and abstract
153153
---------------------------------------
154154

155155
Building:
156-
Unfortunately in 2018 it is still tedious to create and maintain portable build files using external
156+
Unfortunately in 2020 it is still tedious to create and maintain portable build files using external
157157
libraries (the kind we're using here to create a window and render 3D triangles) without relying on
158158
third party software. For most examples here I choose to provide:
159159
- Makefiles for Linux/OSX
@@ -164,6 +164,9 @@ Building:
164164
You can probably just import the imgui_impl_xxx.cpp/.h files into your own codebase or compile those
165165
directly with a command-line compiler.
166166

167+
If you are interested in using Cmake to build and links examples, see:
168+
https://github.com/ocornut/imgui/pull/1713 and https://github.com/ocornut/imgui/pull/3027
169+
167170

168171
example_allegro5/
169172
Allegro 5 example.

examples/example_null/Makefile

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22
# Cross Platform Makefile
33
# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
44
#
5+
# Important: This is a "null back-end" application, with no visible output or interaction!
6+
# This is used for testing purpose and continuous integration, and has little use for end-user.
7+
#
58

6-
EXE = example_null
7-
EXTRA_WARNINGS ?= 0
9+
# Options
10+
WITH_EXTRA_WARNINGS ?= 0
811
WITH_FREETYPE ?= 0
12+
13+
EXE = example_null
914
SOURCES = main.cpp
1015
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
1116
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
@@ -15,12 +20,13 @@ CXXFLAGS += -I../ -I../../
1520
CXXFLAGS += -g -Wall -Wformat
1621
LIBS =
1722

18-
# We use the EXTRA_WARNINGS flag on our CI setup to eagerly catch zealous warnings
19-
ifeq ($(EXTRA_WARNINGS), 1)
23+
# We use the WITH_EXTRA_WARNINGS flag on our CI setup to eagerly catch zealous warnings
24+
ifeq ($(WITH_EXTRA_WARNINGS), 1)
2025
CXXFLAGS += -Wno-zero-as-null-pointer-constant -Wno-double-promotion -Wno-variadic-macros
2126
endif
2227

23-
# We use the WITH_FREETYPE flag on our CI setup to test misc/freetype/imgui_freetype.cpp font rasterizer
28+
# We use the WITH_FREETYPE flag on our CI setup to test compiling misc/freetype/imgui_freetype.cpp
29+
# (only supported on Linux, and note that the imgui_freetype code currently won't be executed)
2430
ifeq ($(WITH_FREETYPE), 1)
2531
SOURCES += ../../misc/freetype/imgui_freetype.cpp
2632
CXXFLAGS += $(shell pkg-config --cflags freetype2)
@@ -33,23 +39,23 @@ endif
3339

3440
ifeq ($(UNAME_S), Linux) #LINUX
3541
ECHO_MESSAGE = "Linux"
36-
ifneq ($(EXTRA_WARNINGS), 0)
42+
ifneq ($(WITH_EXTRA_WARNINGS), 0)
3743
CXXFLAGS += -Wextra -pedantic
3844
endif
3945
CFLAGS = $(CXXFLAGS)
4046
endif
4147

4248
ifeq ($(UNAME_S), Darwin) #APPLE
4349
ECHO_MESSAGE = "Mac OS X"
44-
ifneq ($(EXTRA_WARNINGS), 0)
50+
ifneq ($(WITH_EXTRA_WARNINGS), 0)
4551
CXXFLAGS += -Weverything -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-padded -Wno-c++11-long-long
4652
endif
4753
CFLAGS = $(CXXFLAGS)
4854
endif
4955

5056
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
5157
ECHO_MESSAGE = "MinGW"
52-
ifneq ($(EXTRA_WARNINGS), 0)
58+
ifneq ($(WITH_EXTRA_WARNINGS), 0)
5359
CXXFLAGS += -Wextra -pedantic
5460
endif
5561
CFLAGS = $(CXXFLAGS)

0 commit comments

Comments
 (0)