Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] build-style/cmake: set CMAKE_BUILD_TYPE to None
Date: Wed, 17 Mar 2021 00:26:07 +0100	[thread overview]
Message-ID: <20210316232607.lv5Bq_kq9PZLx58deAPLlpuLL7av1JTaGMmoJ1qhxWM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29459@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 458 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages cmake-build-type-to-None
https://github.com/void-linux/void-packages/pull/29459

[WIP] build-style/cmake: set CMAKE_BUILD_TYPE to None
- I'm going to build all packages with `build_style=cmake` and fix them one by one before merging this in.

A patch file from https://github.com/void-linux/void-packages/pull/29459.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cmake-build-type-to-None-29459.patch --]
[-- Type: text/x-diff, Size: 5674 bytes --]

From 277c23f6efe6fc3a83053fe13148776326d61c9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 14 Mar 2021 20:18:03 +0700
Subject: [PATCH 1/3] build-style/cmake: set CMAKE_BUILD_TYPE to None

---
 common/build-style/cmake.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh
index 5100a96dfd7b..9d1a1a7a1941 100644
--- a/common/build-style/cmake.sh
+++ b/common/build-style/cmake.sh
@@ -52,7 +52,7 @@ _EOF
 		cmake_args+=" -DCMAKE_TOOLCHAIN_FILE=cross_${XBPS_CROSS_TRIPLET}.cmake"
 	fi
 	cmake_args+=" -DCMAKE_INSTALL_PREFIX=/usr"
-	cmake_args+=" -DCMAKE_BUILD_TYPE=Release"
+	cmake_args+=" -DCMAKE_BUILD_TYPE=None"
 	cmake_args+=" -DCMAKE_INSTALL_LIBDIR=lib${XBPS_TARGET_WORDSIZE}"
 
 	if [[ $build_helper = *"qemu"* ]]; then

From ad2d2b63694f6ca95931612cacf23fbfc62e245f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 08:07:16 +0700
Subject: [PATCH 2/3] amdvlk: allow CMAKE_BUILD_TYPE=None

---
 .../patches/cmake-build-type-none.patch       | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 srcpkgs/amdvlk/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/amdvlk/patches/cmake-build-type-none.patch b/srcpkgs/amdvlk/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..7a629e58548e
--- /dev/null
+++ b/srcpkgs/amdvlk/patches/cmake-build-type-none.patch
@@ -0,0 +1,60 @@
+Index: llvm-project/llvm/CMakeLists.txt
+===================================================================
+--- llvm-project/llvm/CMakeLists.txt.orig
++++ llvm-project/llvm/CMakeLists.txt
+@@ -251,11 +251,6 @@ endif()
+ 
+ string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
+ 
+-if (CMAKE_BUILD_TYPE AND
+-    NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
+-  message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+-endif()
+-
+ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
+ 
+ set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
+Index: pal/cmake/Modules/AmdCmakeHelper.cmake
+===================================================================
+--- pal/cmake/Modules/AmdCmakeHelper.cmake.orig
++++ pal/cmake/Modules/AmdCmakeHelper.cmake
+@@ -37,11 +37,6 @@ if (CMAKE_CONFIGURATION_TYPES)
+ else()
+     string(TOUPPER "${CMAKE_BUILD_TYPE}" capital_CMAKE_BUILD_TYPE)
+ 
+-    if (CMAKE_BUILD_TYPE AND
+-        NOT capital_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
+-        message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+-    endif()
+-
+     if(capital_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+         set(CMAKE_BUILD_TYPE_DEBUG ON)
+         set(CMAKE_BUILD_TYPE_RELEASE OFF)
+Index: xgl/CMakeLists.txt
+===================================================================
+--- xgl/CMakeLists.txt.orig
++++ xgl/CMakeLists.txt
+@@ -181,11 +181,6 @@ if (CMAKE_CONFIGURATION_TYPES)
+ else()
+     string(TOUPPER "${CMAKE_BUILD_TYPE}" capital_CMAKE_BUILD_TYPE)
+ 
+-    if (CMAKE_BUILD_TYPE AND
+-        NOT capital_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
+-        message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+-    endif()
+-
+     if(capital_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+         set(CMAKE_BUILD_TYPE_DEBUG ON)
+         set(CMAKE_BUILD_TYPE_RELEASE OFF)
+Index: xgl/icd/CMakeLists.txt
+===================================================================
+--- xgl/icd/CMakeLists.txt.orig
++++ xgl/icd/CMakeLists.txt
+@@ -84,7 +84,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Cl
+     endif()
+ 
+     if(CMAKE_BUILD_TYPE_RELEASE)
+-        target_compile_options(xgl PRIVATE -O3)
+         if(XGL_ENABLE_LTO)
+             if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
+                 execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)

From 6bbe5ce1771a10e9b2e80a6035cf47134897f6b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Wed, 17 Mar 2021 06:24:04 +0700
Subject: [PATCH 3/3] eigen*: set CMAKE_BUILD_TYPE to Release

We're going to set default CMAKE_BUILD_TYPE to None soon. Those packages
are header only libraries, no need to waste time on patching.
---
 srcpkgs/eigen/template    | 2 ++
 srcpkgs/eigen3.2/template | 1 +
 2 files changed, 3 insertions(+)

diff --git a/srcpkgs/eigen/template b/srcpkgs/eigen/template
index ee825e95f273..28e8d458b639 100644
--- a/srcpkgs/eigen/template
+++ b/srcpkgs/eigen/template
@@ -3,6 +3,8 @@ pkgname=eigen
 version=3.3.9
 revision=1
 build_style=cmake
+# This is header only library, don't waste time to patch
+configure_args="-DCMAKE_BUILD_TYPE=Release"
 short_desc="C++ template library for linear algebra (version 3.x)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MPL-2.0, GPL-3.0-or-later, LGPL-2.1-or-later, BSD-3-Clause"
diff --git a/srcpkgs/eigen3.2/template b/srcpkgs/eigen3.2/template
index 5715fc1b3a19..7b710534b5e5 100644
--- a/srcpkgs/eigen3.2/template
+++ b/srcpkgs/eigen3.2/template
@@ -4,6 +4,7 @@ version=3.2.10
 revision=3
 wrksrc="eigen-${version}"
 build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release"
 short_desc="C++ template library for linear algebra (version 3.x)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MPL-2.0, GPL-3.0-or-later, LGPL-2.1-or-later, BSD-3-Clause"

  parent reply	other threads:[~2021-03-16 23:26 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-14 13:19 [PR PATCH] " sgn
2021-03-15  1:07 ` [PR PATCH] [Updated] " sgn
2021-03-16 23:26 ` sgn [this message]
2021-03-17 15:32 ` sgn
2021-03-21  9:45 ` sgn
2021-03-21  9:48 ` sgn
2021-03-21  9:48 ` [PR REVIEW] " sgn
2021-03-21  9:52 ` sgn
2021-03-21  9:55 ` sgn
2021-03-21  9:55 ` [PR REVIEW] " thypon
2021-03-21  9:55 ` thypon
2021-03-21  9:59 ` sgn
2021-03-23  9:15 ` [PR REVIEW] " Piraty
2021-03-25  0:45 ` [PR PATCH] [Updated] " sgn
2021-03-25  1:38 ` sgn
2021-03-26 15:13 ` sgn
2021-03-26 15:42 ` ericonr
2021-03-26 15:43 ` ericonr
2021-03-26 15:48 ` sgn
2021-03-26 16:01 ` [PR PATCH] [Updated] " sgn
2021-03-27  8:23 ` sgn
2021-03-27  8:24 ` sgn
2021-03-27  8:51 ` [PR PATCH] [Updated] " sgn
2021-03-27 12:30 ` sgn
2021-03-27 12:33 ` sgn
2021-03-28  3:40 ` [PR PATCH] [Updated] " sgn
2021-03-28  3:50 ` sgn
2021-03-28  3:53 ` sgn
2021-03-28  3:54 ` sgn
2021-03-29  0:48 ` [PR PATCH] [Updated] " sgn
2021-03-29 15:30 ` sgn
2021-04-03  3:00 ` sgn
2021-04-03  3:13 ` sgn
2021-04-03  3:13 ` [PR PATCH] [Merged]: " sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210316232607.lv5Bq_kq9PZLx58deAPLlpuLL7av1JTaGMmoJ1qhxWM@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).