Commit Graph

2839 Commits

Author SHA1 Message Date
Vadim Zeitlin
099ea7176d Properly stop Travis CI build after a test failure
Using "pushd tests && test-command && popd" loses the exit code of the
test command, as it's not taken into account by "set -e" when the
command is part of a "&&" list.

Fix this by simply splitting such lists in their individual commands.
2020-07-09 14:08:44 +02:00
Vadim Zeitlin
9fde10f53e Use #!/bin/bash for Travis build script which requires bash
It uses arithmetic expansion and, now, arrays, neither of which exists
in POSIX sh.
2020-07-07 12:43:12 +02:00
Vadim Zeitlin
403884e1d8 Fix quoting of CXXFLAGS passed to make
Use arrays to simplify passing CXXFLAGS and LDFLAGS, both of them may
contain spaces, separately on make command line.

Simpler solution of just using individual variable doesn't work because
of bash/POSIX word splitting behaviour (zsh should be blamed for
spoiling me with its much more reasonable behaviour and allowing me
to forget about this insanity in the first place). In principle, we
could work around this by temporarily resetting IFS, but using arrays is
arguably more clear and this script already uses bashisms, in spite of
its shebang line.
2020-07-07 12:40:22 +02:00
Vadim Zeitlin
a4c1e542aa Use makefile flags when building the samples too
This will notably detect all warnings in them.
2020-07-06 18:01:38 +02:00
Vadim Zeitlin
85ad131adb Fix not handling #warning as errors for clang
clang uses "#warnings" warning category instead of "cpp" as gcc does and
complains about unknown "cpp" warning option if we use it with it.
2020-07-06 18:01:38 +02:00
Vadim Zeitlin
437b8eebec Pass -Werror on make command line
Setting CXXFLAGS=-Werror in the environment wasn't enough, it was still
overridden by the empty CXXFLAGS in the makefile.

Ideal would be to get rid of the empty flags there, but for now override
them on make command line explicitly.
2020-07-06 18:01:38 +02:00
Vadim Zeitlin
c4152869f5 Split wxMAKEFILE_FLAGS in separate CXX/LDFLAGS variables
This will allow appending extra CXXFLAGS to use with make in the
upcoming commit.
2020-07-06 18:01:38 +02:00
Vadim Zeitlin
b91d3e35cf Only use -Werror for building, not configuring
Use of -Werror results in failures of configure tests that should
normally succeed, e.g. testing for va_copy() when cross-compiling for
iOS, so don't do it and just enable -Werror for building our own code.
2020-07-06 13:13:35 +02:00
Vadim Zeitlin
20e385e7bb Do not make explicit #warnings fatal in Travis CI builds
Don't give errors for the intentional warnings from #warning directives.
2020-07-06 12:52:01 +02:00
Vadim Zeitlin
31a1779a86 Keep building libraries/samples/tests in Travis CI tests
This is useful to see all the warnings at once instead of having to run
many builds to see them all.
2020-07-06 12:45:57 +02:00
Vadim Zeitlin
b48515d5cc squash! Treat warnings as errors in Travis CI builds
Add wxALLOW_WARNINGS which can be set to prevent this from happening for
the ports where we don't want to avoids warnings anyhow because they
indicate real problems in the code, such as wxDFB.
2020-07-06 12:44:25 +02:00
Vadim Zeitlin
d2e03dec77 Treat warnings as errors in Travis CI builds
This will allow detecting any new warnings immediately.
2020-07-06 00:30:41 +02:00
Stefan Csomor
dedefa65c1 applying CMake patch from @MaartenBent 2020-07-05 15:54:27 +02:00
Stefan Csomor
243f81a66e adding arm optimization file 2020-07-01 23:03:09 +02:00
Stefan Csomor
f80ac025ba added wxUSE_MENUBAR
for platforms like iOS where menus are available but menubars are not we need a finter level of control
2020-06-28 22:59:00 +02:00
Stefan Csomor
2e95a03a7b removing erronously added files 2020-06-28 09:11:39 +02:00
Stefan Csomor
199a3f51ef remove older code for new macos 10.10 base requirement 2020-06-28 08:47:50 +02:00
Vadim Zeitlin
284cf9a872 Merge branch 'cmake-ios' of https://github.com/MaartenBent/wxWidgets
Build wxiOS on Travis CI.

See https://github.com/wxWidgets/wxWidgets/pull/1895
2020-06-21 19:02:54 +02:00
Maarten Bent
e4437c4974 Add iOS CMake build to Travis CI
Use the following CMake flags:
-DCMAKE_SYSTEM_NAME=iOS - for specifying it is an iOS build
-DCMAKE_FIND_ROOT_PATH=/usr/local - dir to search for the built wxWidgets libraries
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO - don't require signing app packages
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 - specify a target so both the libraries and sample will use the same architecture

Also use the code signing flag when testing precompiled header support.
Don't build the default samples, widgets sample has features that are not supported by the iOS build.

Xcode seems to rebuild the libraries when installing, so call CMake only once.
2020-06-18 21:20:21 +02:00
Maarten Bent
21e92cbcf1 CMake: don't add cross compile suffix to wx-config library names for iOS build
The libraries do not have this suffix. And configure also doesn't do it.
2020-06-18 20:28:54 +02:00
Maarten Bent
49a23c1dfa CMake: fix try_compile and other checks for iOS build 2020-06-18 20:28:42 +02:00
Maarten Bent
cf46dde182 CMake: fix building and copying wxrc util for iOS
An app bundle is built, instead of a single executable.
2020-06-18 20:28:36 +02:00
Maarten Bent
5041915001 CMake: fix building media and gl lib for iOS 2020-06-18 20:28:19 +02:00
Maarten Bent
3ab4d9461b CMake: add missing libraries for iOS build
Remove unused section from file list.
2020-06-18 20:28:12 +02:00
Maarten Bent
3d705dd867 Remove non-existing file from file list 2020-06-18 20:17:06 +02:00
Maarten Bent
78500e4a3b Improve folding in Travis CI log
Start the fold before echoing the description, so the description is shown when folded.
Combine Xcode checks into one statement.
Add missing '-G' argument when building sample using CMake.
2020-06-18 19:48:03 +02:00
Vadim Zeitlin
0ca6be3cf4 Link samples using STC with imm32.lib
This completes the changes of f730da3c14 (Add imm32.lib to
wxStyledTextCtrl, 2020-05-10) that didn't take care of MSW makefiles,
that need to contain the new required library as well.

Closes #18788.
2020-06-10 19:30:48 +02:00
Vadim Zeitlin
13477ee164 Merge branch 'xrc-generic-animation-ctrl'
Extend wxAnimationCtrl XRC handler to cover wxGenericAnimationCtrl too.

Also fix a bug with wxGenericAnimationCtrl inactive bitmap background.

See https://github.com/wxWidgets/wxWidgets/pull/1889
2020-06-10 00:02:59 +02:00
Maarten Bent
1ed8197dfa CMake: prevent mismatched package name warnings
Use all caps for the packages.

Closes https://github.com/wxWidgets/wxWidgets/pull/1886
2020-06-09 23:57:53 +02:00
Vadim Zeitlin
2c4b0b4271 Get rid of src/xrc/xmladv.cpp file
It contained a single function which can be defined in xh_animatctrl.cpp
instead as it's only used there anyhow, and this file has no more reason
to exist, as "adv" library itself doesn't exist any longer.
2020-06-09 18:07:10 +02:00
Vadim Zeitlin
68feb3e7ff Fix linking monolithic wxMSW DLL after STC IME changes
Link wxMSW monolithic library with imm32.lib as it's not required by
wxscintilla.lib.

This should have been been part of f730da3c14 (Add imm32.lib to
wxStyledTextCtrl, 2020-05-10).

See https://github.com/wxWidgets/wxWidgets/pull/1852

Closes #18776.
2020-05-31 14:33:30 +02:00
Vadim Zeitlin
2665c024c8 Merge branch 'cmake-project-version-warning' of https://github.com/MaartenBent/wxWidgets
CMake: set the project version.

See https://github.com/wxWidgets/wxWidgets/pull/1867
2020-05-25 01:34:52 +02:00
Vadim Zeitlin
a087d7c8da Merge branch 'fix-stc-ime' of https://github.com/wangqr/wxWidgets
Fix position of IME in wxSTC in wxMSW.

See https://github.com/wxWidgets/wxWidgets/pull/1852
2020-05-25 01:33:00 +02:00
Maarten Bent
a9f1655c9c CMake: set policy for VERSION variables
Also update the description of other policies to the description on the CMake
website.
2020-05-24 22:20:05 +02:00
Maarten Bent
442b82a6c5 CMake: add more STL checks and enable them in setup.h
Closes https://github.com/wxWidgets/wxWidgets/pull/1862
2020-05-22 23:15:52 +02:00
Vadim Zeitlin
53a35d15bc Merge branch 'dynlib-simplify'
Enhance wxDynamicLibrary error logging and simplify code by not checking
for dlopen() and dlerror() that are always available nowadays.

See https://github.com/wxWidgets/wxWidgets/pull/1849
2020-05-21 02:13:10 +02:00
Maarten Bent
ba3fd12efb CMake: fix linking the DLL sample in monolithic build 2020-05-17 20:01:03 +02:00
Maarten Bent
0f806ad96d CMake: use wx prefix in library names
Rename all library targets to start with wx. This way it does not use generic
names like base or core that could interfere with other libraries that add
include the wxWidgets project.
2020-05-17 20:01:02 +02:00
Maarten Bent
0c2d05f52f CMake: add library aliases using wx:: namespace 2020-05-17 20:01:02 +02:00
Maarten Bent
498b79d619 CMake: copy data of widgets sample to correct directory 2020-05-17 20:01:02 +02:00
Maarten Bent
ef741462cd CMake: fix file names in info header 2020-05-17 20:01:02 +02:00
Maarten Bent
e69755c203 CMake: check if the compiler supports using precompiled headers
Build the cotire test project and check if it succeeds. Also check if the
'had text segment at different address' warning does not appear in the build
output. If it does not succeed, disable usage of precompiled headers.

If the PCH option was changed, clean the project and rebuild it again. Do not
clean everytime the project is configured because (re)building the cotire test
project takes some time.
2020-05-17 20:01:01 +02:00
Vadim Zeitlin
7a82a0bbf5 Assume dlerror() function is always available when dlopen() is
Remove separate checks for dlerror() which don't seem to be needed under
any platform any longer.

No real changes, just slim down configure/CMake a tiny bit.
2020-05-15 00:00:06 +02:00
Vadim Zeitlin
fea8c608b1 Remove checks for shl_load() from configure/CMake
This function is not used any more since e289eb07e1 (Get rid of
non-POSIX code for loading dynlibs on *nix, 2020-05-13), so don't check
for it and don't defined the corresponding HAVE_SHL_LOAD symbol.
2020-05-14 23:59:38 +02:00
wangqr
a6e7409888 Rebake after adding imm32.lib to wxSTC 2020-05-11 00:37:56 -04:00
wangqr
f730da3c14 Add imm32.lib to wxStyledTextCtrl 2020-05-11 00:37:56 -04:00
Stefan Csomor
da48b9e45d
adding an iOS build to travis (#1847)
* fixing compilation of tests that cannot build

bracket code with the corresponding wxUSE… macros

* adding directive for iOS

* adding a switch for skipping the run - not the build of tests

right now I don’t know yet, how to run the test binary in the iOS simulator, but building it is still a good test in itself

* adding skipping of tests

* increasing minimum deployment to get proper c++17 support

* using --disable-sys-libs, restoring other targets

even when the zlib in -isysroot is used, due to deployment on lower iOS versions inflateValidate may not be available and crash. The guards are evaluated using macros from the zlib from the SDK, not from the lowest version supported.
2020-05-08 08:01:56 +02:00
Vadim Zeitlin
d0fb641498 Merge branch 'cmake-warnings' of https://github.com/MaartenBent/wxWidgets
Enable warnings for CMake builds and fix some warnings that this
exposed.

Also add wxUSE_NATIVE_DATAVIEWCTRL option and change default GTK version
to 3 for CMake too.

See https://github.com/wxWidgets/wxWidgets/pull/1825
2020-05-06 14:34:34 +02:00
Maarten Bent
d3d1a91620 CMake: change default GTK version from 2 to 3 2020-05-06 01:52:27 +02:00
Maarten Bent
b1ddd454f8 CMake: add wxUSE_NATIVE_DATAVIEWCTRL option 2020-05-06 01:52:27 +02:00