Makefile revision 5680
312N/A#
312N/A# CDDL HEADER START
312N/A#
312N/A# The contents of this file are subject to the terms of the
312N/A# Common Development and Distribution License (the "License").
312N/A# You may not use this file except in compliance with the License.
312N/A#
312N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
312N/A# or http://www.opensolaris.org/os/licensing.
312N/A# See the License for the specific language governing permissions
312N/A# and limitations under the License.
312N/A#
312N/A# When distributing Covered Code, include this CDDL HEADER in each
312N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
312N/A# If applicable, add the following below this CDDL HEADER, with the
312N/A# fields enclosed by brackets "[]" replaced with your own identifying
312N/A# information: Portions Copyright [yyyy] [name of copyright owner]
312N/A#
312N/A# CDDL HEADER END
5680N/A#
312N/A
312N/A#
5680N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
312N/A#
5680N/ABUILD_BITS= 64
5680N/A# Currently only builds with gcc
5680N/ACOMPILER= gcc
312N/Ainclude ../../make-rules/shared-macros.mk
312N/A
312N/ACOMPONENT_NAME= cmake
5079N/ACOMPONENT_VERSION= 3.3.2
844N/ACOMPONENT_ARCHIVE_HASH= \
5079N/A sha256:e75a178d6ebf182b048ebfe6e0657c49f0dc109779170bad7ffcb17463f2fc22
5079N/ACOMPONENT_ARCHIVE_URL= http://www.cmake.org/files/v3.3/$(COMPONENT_ARCHIVE)
312N/ACOMPONENT_PROJECT_URL= http://www.cmake.org/
312N/A
5079N/ATPNO= 25030
2899N/A
5680N/A# configure in cmake does not accept many of the options set in
5680N/A# configure.mk (CC=, CXX=, --bindir, --libdir, --sbindir).
5680N/ACONFIGURE_DEFAULT_DIRS= no
5680N/A
5680N/A# expected failure for test: CTestTestUpload
5680N/ASYSTEM_TEST_TARGET= build $(SYSTEM_TEST_64)
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
312N/A
5079N/A# Remove undesriable /opt/csw lines from the Modules/*.cmake files.
5079N/ACOMPONENT_PREP_ACTION += \
5079N/A cd $(COMPONENT_SRC)/Modules; $(GNU_GREP) -l '/opt/csw' *.cmake | /usr/bin/xargs -I \{\} $(GSED) -i -e '/^[ ]*\/opt\/csw/d' \{\}
5680N/A# Since it's C++, force it to build as C++11 for ABI compatibility.
5079N/ACXXFLAGS += -std=c++11
5079N/A
312N/A# Need to remove this option from LD_OPTIONS (only affects sparc build);
312N/A# it causes a SegFault failure in kwsys/testSystemInformation
312N/A# when testing on sparc
5680N/ALD_MAP_NOEXBSS.sparc=
312N/A
312N/ALDFLAGS += $($(COMPILER)_NORUNPATH)
312N/A
312N/A# We need these in the environment, although they are already passed
312N/A# as CONFIGURE_OPTIONS; otherwise the correct compilers are not used
312N/ACONFIGURE_ENV += MAKE="$(GMAKE)"
5079N/A
623N/A# Use system-installed third-party libraries, rather than the private
5079N/A# copies in the cmake source.
623N/ACONFIGURE_OPTIONS += --system-curl
623N/ACONFIGURE_OPTIONS += --system-expat
623N/ACONFIGURE_OPTIONS += --system-zlib
623N/ACONFIGURE_OPTIONS += --system-bzip2
5079N/ACONFIGURE_OPTIONS += --system-libarchive
312N/A
312N/ACOMPONENT_BUILD_ENV += CC="$(CC)"
312N/ACOMPONENT_BUILD_ENV += CXX="$(CXX)"
312N/ACOMPONENT_BUILD_ENV += LDFLAGS="$(LDFLAGS)"
312N/ACOMPONENT_BUILD_ENV += MAKE="$(GMAKE)"
3814N/ACOMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS)"
3814N/ACOMPONENT_BUILD_ENV += CXXFLAGS="$(CXXFLAGS)"
312N/ACOMPONENT_BUILD_TARGETS = all
312N/A
623N/A# Need C and C++ compiler locations for cmake tests
623N/ACOMPONENT_TEST_ENV += CC="$(CC)"
623N/ACOMPONENT_TEST_ENV += CXX="$(CXX)"
623N/A
312N/ACOMPONENT_TEST_TARGETS = test
312N/A
3814N/ACOMPONENT_TEST_TRANSFORMS += \
3814N/A '-e "s/\s\s*[0-9][0-9]*\.[0-9][0-9]* sec/ SEC sec/"' \
3814N/A '-e "s/\][0-9][0-9]*\.[0-9][0-9]* sec/\]SEC sec/"'
3814N/A
5079N/ACOMPONENT_SYSTEM_TEST_ENV += CC="$(CC)"
5079N/ACOMPONENT_SYSTEM_TEST_ENV += CXX="$(CXX)"
5079N/A
5079N/ACOMPONENT_SYSTEM_TEST_TARGETS = test
5079N/A
5079N/A# Built binaries are moved aside and replaced with
5079N/A# symlinks to the system-installed binaries in /usr/bin,
5079N/A# which will be executed for the system-test target
5079N/ACOMPONENT_PRE_SYSTEM_TEST_ACTION += \
5079N/A $(MV) $(BUILD_DIR_64)/bin $(BUILD_DIR_64)/bin-save; \
5079N/A $(MKDIR) $(BUILD_DIR_64)/bin; cd $(BUILD_DIR_64)/bin; \
5680N/A $(LN) -s $(USRBINDIR)/cmake; $(LN) -s /usr/bin/ctest; \
5680N/A $(LN) -s $(USRBINDIR)/ccmake; $(LN) -s /usr/bin/cpack
5079N/A
5079N/A# Restore the built binaries after system-test is done
5079N/ACOMPONENT_POST_SYSTEM_TEST_ACTION += \
5079N/A $(RM) -r $(BUILD_DIR_64)/bin; \
5079N/A $(MV) $(BUILD_DIR_64)/bin-save $(BUILD_DIR_64)/bin
5079N/A
3817N/AREQUIRED_PACKAGES += compress/bzip2
5079N/AREQUIRED_PACKAGES += compress/xz
3817N/AREQUIRED_PACKAGES += library/expat
5079N/AREQUIRED_PACKAGES += library/libarchive
5079N/AREQUIRED_PACKAGES += library/ncurses
3817N/AREQUIRED_PACKAGES += library/zlib
5079N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
5079N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
3817N/AREQUIRED_PACKAGES += system/library/math
3817N/AREQUIRED_PACKAGES += web/curl