Commit Graph

58 Commits

Author SHA1 Message Date
Đoàn Trần Công Danh 5b4e07f57e Revert "build-style/cmake: common flags for KDE"
This reverts commit f10887f683.
2024-05-12 06:23:54 +07:00
Đoàn Trần Công Danh f10887f683 build-style/cmake: common flags for KDE 2024-05-11 21:44:12 +07:00
John 32e6ea71aa New package: corrosion-0.4.4 2023-10-31 18:33:40 +01:00
John 13b085be7c build-style/cmake.sh: specify paths as type PATH
specifying the type prevents cmake to converthing the paths
relative to the CWD

cmake documentation:

Furthermore, if the <type> is PATH or FILEPATH and the <value> provided
on the command line is a relative path, then the set command will treat
the path as relative to the current working directory and convert it to an absolute path.
2023-10-14 10:21:59 +02:00
John 8714c52bf7 build-style/cmake.sh: add riscv64 arch 2023-08-25 17:06:56 +02:00
Đoàn Trần Công Danh 5215d4a7f9 build-style/cmake: no longer need to block FetchContent 2023-08-21 21:32:09 +07:00
Đoàn Trần Công Danh 1f2932447a build-style/cmake: set PATH in environment 2023-08-21 09:11:59 +07:00
Đoàn Trần Công Danh 6b9c9c7dfa build-style/cmake: support build with cmake-bootstrap 2023-08-17 19:59:36 +07:00
Đoàn Trần Công Danh 48dabfa867 build-style/cmake: Disable FetchContent 2023-01-17 08:20:02 +07:00
Đoàn Trần Công Danh d6500f65f7 build-style/cmake: sysconfigdir is /etc 2022-09-05 21:01:16 +07:00
Đoàn Trần Công Danh e19f2af481 build-style/cmake: only set QT_HOST_PATH on cross build
They're used by QtBuildInternals to find other components configuration.
With QT_HOST_PATH and QT_HOST_PATH_CMAKE_DIR set, cmake will only look
into those directories.
2022-08-10 22:46:31 +07:00
Đoàn Trần Công Danh a72cf1e3de build-style/cmake: set common Qt options 2022-08-09 20:19:57 +07:00
classabbyamp 124ce2e404 common/build-style: make do_check run in parallel unless disabled 2022-06-23 23:08:03 -05:00
Michal Vasilek 71b11fdbdb xbps-src: add make_check_pre
$make_check_pre can be used for wrapper commands like xvfb-run or
dbus-run-session which are common ways to make tests work. This way many
templates can avoid defining their own do_check function.
2022-05-04 10:46:53 +02:00
Đoàn Trần Công Danh 0d75e72b8b build-style/cmake: pass LIBS as CMAKE_*_STANDARD_LIBRARIES
Normally, we can add them into configure_args directly.
However, if we need to link with 2 or more libaries (e.g. -latomic
and -lexecinfo on armv6-musl), we have noway to do it properly:
- configure_args will be splited on whitespace
- cmake denies to recognise CMAKE_*_STANDARD_LIBRARIES as a list,
  hence denies to split on semicolon (";")

Let's pass LIBS as CMAKE_*_STANDARD_LIBRARIES instead.
2022-02-23 21:28:37 +07:00
Joshua Krämer 636336b1a7 Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
CMake adds -DNDEBUG with build types Release, MinSizeRel and RelWithDebInfo.
NDEBUG disables assert(), which can improve performance.
2021-07-16 19:48:16 +02:00
Piotr Wójcik 88c9f70cfa build-style/cmake: move CTEST_OUTPUT_ON_FAILURE to environment 2021-06-11 22:45:07 +02:00
John 644bdb2867 common/build-style/cmake.sh: pass full path of TOOLCHAIN_FILE to cmake 2021-05-06 18:23:18 +02:00
Đoàn Trần Công Danh 1af5a29d87 build-style/cmake: set CMAKE_BUILD_TYPE to None
- CMAKE_BUILD_TYPE=Release will force -O3 instead of respecting our
  CFLAGS and CXXFLAGS
- Theoretically, we could patch cmake to always use -O2 instead,
  however, patching will break users' expectation when compiling their
  our code.
- RelWithDebInfo could be another option if it's acceptable to always
  have debug symbol available.
- However, some projects ignore all CFLAGS and CXXFLAGS;
- Some other projects relies on CMAKE_BUILD_TYPE=Release to install to
  correct location and/or disable coverage.
- To get away with -O3, we need patching either ways, let's go with
  CMAKE_BUILD_TYPE=None, and patch all problematic softwares.
2021-04-03 09:52:55 +07:00
Đoàn Trần Công Danh 2a1482daeb build-style/cmake: add missing "{}" 2021-02-20 13:11:25 +07:00
Đoàn Trần Công Danh 8e102f22ce build-style/cmake: also fix -isystem for Ninja
Discovered by cross-build failure of gnuradio-osmosdr.

While we're at it, fix flags.make in batch.
2021-02-20 13:09:32 +07:00
Érico Rolim 8c41deaff7 common/build-style: fix do_check for cmake.
make was accidentally left hardcoded to query if a test target was
available, which meant tests wouldn't be run for most of the
applications, since they were now using ninja.
2021-02-19 18:56:18 +01:00
John 446425847d build-style/cmake: replace sed monstrosity with ${wrksrc}/${build_wrksrc} 2021-02-09 00:19:27 +01:00
John 04715e12f6 build-style/cmake: use ninja as default generator
closes #28304
2021-02-09 00:19:07 +01:00
John 98f239edf8 build-style/cmake.sh: remove handeling of wxWidgets when cross compiing
This can be potentially broken, and the preffered way is to just set the WX_CONFIG env variable
2020-12-30 17:58:36 +01:00
q66 87d28506e1 build-style: change all build-styles to use /usr/libNN 2020-12-22 22:18:25 +01:00
Đoàn Trần Công Danh b400ac3e81 build-style/cmake: set find_root_path to cross_base/usr 2020-11-28 05:56:03 +07:00
Đoàn Trần Công Danh 3c1727cf31 build-style/cmake: only look into masterdir libraries
As of it's now, cmake will look into host's libraries, thus
bootstrapping will fail at ccache if host system doesn't have
libzstd-devel installed.
2020-11-01 21:22:23 +01:00
John 0e87174b5e build-style/cmake: set CTEST_OUTPUT_ON_FAILURE=TRUE in do_check
Currently a failed output has to be found somewhere in the build directory,
having it output also to stdout makes it far easier to see why it failed
2020-07-11 14:07:29 +02:00
q66 b5fd7971b5 build-style/cmake: recognize ppcle for cross 2020-04-30 01:06:52 +02:00
John 0adf0a781c build-style/cmake: pass DESTDIR as env var to make install
this ensures that the build-style also works with ninja when setting
-GNinja and make_cmd=ninja
2020-02-06 10:34:36 +01:00
q66 f317ed5e7e common/build-style/cmake.sh: strip -pipe if present in C(XX)FLAGS
Reason: https://gitlab.kitware.com/cmake/cmake/issues/19590

Our workaround within cmake is not sufficient as it does not
address the issue fully and things still break sometimes. So
work around this in the build-style for the time being (and
drop the cmake patch).

Once this is fixed upstream (probably needs special casing
for the -pipe flag and strip it during compile tests) we
can drop this.
2020-01-11 18:52:12 +01:00
John f4273541b8 New build-helper: qemu 2019-10-26 00:59:41 +02:00
q66 c7989e5693
build-style/cmake: powerpc->ppc for CMAKE_SYSTEM_PROCESSOR
ppc is the correct name which cmake reports in a native ppc32
environment, therefore the cross toolchain definition is wrong.

Closes: #12061 [via git-merge-pr]
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2019-06-01 00:58:57 +02:00
John 851a83b478 Revert "build-style/cmake.sh: Use -DCMAKE_BUILD_TYPE=RelWithDebInfo when having XBPS_DEBUG_PKGS set"
This reverts commit 6638dc5526.

Setting RelWithDebInfo can cause issues since cmake macros often handle
only Release or Debug build but not RelWithDebInf which might cause
issues https://github.com/void-linux/void-packages/pull/10948

It is advised to set -DCMAKE_BUILD_TYPE=RelWithDebInfo manually in
packages that ignore our CFLAGS or patch them to use them

closes #10948
2019-04-15 04:26:07 +02:00
John 86a7cb8689 build-style/cmake: only set CMAKE_CROSSCOMPILING_EMULATOR when qemu is in hostdeps 2019-04-15 03:11:14 +02:00
John 01d11a4938 build-style/cmake: set CMAKE_CROSSCOMPILING_EMULATOR 2019-04-05 23:04:14 +02:00
Foxlet f726125246 common: Set system processor for PPC cmake 2019-02-09 02:29:24 -02:00
John 9518d3c77c
build-style/cmake: add missing space before closing bracket 2019-01-21 22:52:56 +01:00
John 6f0fee9429 build-style/cmake: add check fo nodebug flag
[ci skip]
2019-01-17 14:04:27 +00:00
John 6638dc5526 build-style/cmake.sh: Use -DCMAKE_BUILD_TYPE=RelWithDebInfo when having XBPS_DEBUG_PKGS set 2019-01-15 16:15:13 +01:00
Enno Boland 0832e1adfa
build-style/cmake: fix typo 2019-01-05 23:45:27 +01:00
q66 151f876627 common: add ppc64 build profiles and other ppc64 bits
This adds the build profiles for ppc64 targets as well as
modifications in other parts of the infra.

These targets are supported:

- ppc64le (glibc little endian elfv2)
- ppc64le-musl (musl little endian)
- ppc64-musl (musl big endian)

ELFv1 targets are explicitly not supported at this point.

Big endian musl supports ppc 970 or newer, while little endian
targets are set to a generic powerpc64le which effectively means
POWER8 and newer. Tuning is always set for POWER9, which is the
most likely target hardware. We also make sure AltiVec is always
on, because it is supported on all hardware we target.

[ci skip]
2019-01-05 23:38:00 +01:00
John ee4ce35a68 build-style/cmake: dehardcode gtk2 wxWdigets when cross compiling 2018-11-28 16:49:52 -02:00
maxice8 b552a5f05d build-style/cmake.sh: set CMAKE_SYSTEM_PROCESSOR on cross-builds 2018-10-04 10:30:10 +02:00
Piotr Wójcik e1a62f4018 build-style/cmake.sh: fix default do_check 2018-03-09 13:43:10 -05:00
newbluemoon 67c20224e0 xbps-src: make cmake find/use the wx-config wrapper 2018-01-09 13:35:09 +01:00
Enno Boland 768fd97393
Revert "build-style/cmake.sh: reset working dir to wrksrc after do_install"
This reverts commit 2d678d4188.
2017-11-29 15:02:01 +01:00
Enno Boland b842440e76 build-style/cmake.sh: fix result code invalid invertation 2017-11-22 12:55:35 +01:00
maxice8 dd231e7a14 build-style/cmake.sh: add generic do_check function.
Closes #9391.
2017-11-21 12:33:38 +01:00