[packages/cmake] set CMAKE_SYSTEM_PROCESSOR and related options when cmake builds itself
atler
atler at pld-linux.org
Fri Sep 15 21:05:29 CEST 2023
commit 37c4775b0ab28fb66e1d06e40be1c83b7d80058c
Author: Jan Palus <atler at pld-linux.org>
Date: Fri Sep 15 20:47:27 2023 +0200
set CMAKE_SYSTEM_PROCESSOR and related options when cmake builds itself
based on %cmake macro
cmake.spec | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/cmake.spec b/cmake.spec
index 17610bd..506c6fb 100644
--- a/cmake.spec
+++ b/cmake.spec
@@ -158,6 +158,14 @@ cat > "init.cmake" <<EOF
SET (CURSES_INCLUDE_PATH "/usr/include/ncurses" CACHE PATH " " FORCE)
SET (CMAKE_INSTALL_SYSCONFDIR "%{_sysconfdir}" CACHE PATH " " FORCE)
SET (CMAKE_INSTALL_DATADIR "%{_datadir}" CACHE PATH " " FORCE)
+SET (CMAKE_SYSTEM_NAME "Linux" CACHE STRING " " FORCE)
+SET (CMAKE_SYSTEM_VERSION "%(uname -r)" CACHE STRING " " FORCE)
+SET (CMAKE_CROSSCOMPILING FALSE CACHE BOOL " " FORCE)
+%ifarch x32
+SET (CMAKE_SYSTEM_PROCESSOR "x86_64" CACHE STRING " " FORCE)
+%else
+SET (CMAKE_SYSTEM_PROCESSOR "%{_target_cpu}" CACHE STRING " " FORCE)
+%endif
EOF
# cleanup backups after patching, modules are copied as-is
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/cmake.git/commitdiff/da809505894c5f16c4b8f03ce514c2879d909f6c
More information about the pld-cvs-commit
mailing list