| | |
| | | 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) |
| | |
| | | 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 |
| | |
| | | # variable that we can generally use to accomplish the same result. Setting |
| | | # them both shouldn't harm anything. |
| | | CMAKE_OPTIONS += -DLIB_INSTALL_DIR="$(CMAKE_PREFIX)/$(CMAKE_LIBDIR.$(BITS))" |
| | | CMAKE_OPTIONS.64 += -DCMAKE_LIBRARY_ARCHITECTURE=amd64 |
| | | CMAKE_OPTIONS.64 += -DCMAKE_LIBRARY_ARCHITECTURE=$(MACH64) |
| | | CMAKE_OPTIONS.64 += -DLIB_SUFFIX="/$(MACH64)" |
| | | endif |
| | | CMAKE_OPTIONS += $(CMAKE_OPTIONS.$(BITS)) |
| | |
| | | |
| | | # 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) |
| | |
| | | $(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) |
| | |
| | | $(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) |