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