Marcel Telka
2024-04-02 966b7de801e4d31160b59d0892ff8ae43028ae01
make-rules/cmake.mk
@@ -76,8 +76,17 @@
endif
CMAKE_LIBDIR.32 =   lib
CMAKE_LIBDIR.64 =   lib/$(MACH64)
CMAKE_LIBEXECDIR.32 =   lib
CMAKE_LIBEXECDIR.64 =   lib/$(MACH64)
# If the component prefers 64-bit binaries, then ensure builds deliver 64-bit
# binaries to the standard directories and 32-bit binaries to the non-standard
# location.  This allows simplification of package manifests and makes it
# easier to deliver the 64-bit binaries as the default.
ifeq ($(strip $(PREFERRED_BITS)),64)
CMAKE_LIBEXECDIR.32 =   libexec/$(MACH32)
CMAKE_LIBEXECDIR.64 =   libexec
else
CMAKE_LIBEXECDIR.32 =   libexec
CMAKE_LIBEXECDIR.64 =   libexec/$(MACH64)
endif
CMAKE_INCLUDEDIR =   include
CMAKE_DATAROOTDIR =   share
CMAKE_DATADIR =      $(CMAKE_DATAROOTDIR)
@@ -97,6 +106,7 @@
CMAKE_ENV += FCFLAGS="$(FCFLAGS)"
CMAKE_ENV += LDFLAGS="$(LDFLAGS)"
CMAKE_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
CMAKE_ENV += PATH="$(PATH)"
# Rewrite absolute source-code paths into relative for ccache, so that any
# workspace with a shared CCACHE_DIR can benefit when compiling a component
@@ -163,6 +173,23 @@
# configure the unpacked source for building 32 and 64 bit version
CMAKE =   cmake
# provide test transforms for ctest
CMAKE_TEST_TRANSFORMS = \
   ' -e "s/[0-9]*\.[0-9]* sec//" ' \
   ' -n ' \
   ' -e "/Not Run/p" ' \
   ' -e "/Start/p" ' \
   ' -e "/Skipped/p" ' \
   ' -e "/Failed/p" ' \
   ' -e "/Passed/p" ' \
   ' -e "/failed/p" '
USE_DEFAULT_TEST_TRANSFORMS?=no
ifeq ($(strip $(USE_DEFAULT_TEST_TRANSFORMS)),yes)
COMPONENT_TEST_TRANSFORMS += $(CMAKE_TEST_TRANSFORMS)
endif
$(BUILD_DIR)/%/.configured:   $(SOURCE_DIR)/.prep
   ($(RM) -rf $(@D) ; $(MKDIR) $(@D))
   $(COMPONENT_PRE_CMAKE_ACTION)
@@ -189,7 +216,7 @@
   $(TOUCH) $@
# test the built source
$(BUILD_DIR)/%/.tested-and-compared:   $(BUILD_DIR)/%/.built
$(BUILD_DIR)/%/.tested-and-compared:   $(COMPONENT_TEST_DEP)
   $(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
   $(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
   $(COMPONENT_PRE_TEST_ACTION)
@@ -206,7 +233,7 @@
   $(TOUCH) $@
$(BUILD_DIR)/%/.tested:   SHELLOPTS=pipefail
$(BUILD_DIR)/%/.tested:   $(BUILD_DIR)/%/.built
$(BUILD_DIR)/%/.tested:   $(COMPONENT_TEST_DEP)
   $(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
   $(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
   $(COMPONENT_PRE_TEST_ACTION)