diff --git a/Makefile.am b/Makefile.am index 6386176..1e81ff2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,16 @@ include ./etc/make/emacs.mk SUBDIRS = src bench +if WITH_BUILD_CTF +CTF_COMMIT = 968f8f9eb6aab1d6b67d2fcc1a70c9fc3b98adfa +CTF_GIT_REPOSITORY = https://github.com/cc4s/ctf +CTF_BUILD_PATH = $(builddir)/extern/build/$(CONFIG)/ctf/$(CTF_COMMIT) +CTF_SRC_PATH = $(builddir)/extern/src/$(CONFIG)/ctf/$(CTF_COMMIT) +include $(srcdir)/etc/make/ctf.mk +src: ctf +SUBDIRS += extern/ctf/ +endif + _ATRIPSRCS = Sources.mk ## include $(_ATRIPSRCS) diff --git a/configure.ac b/configure.ac index 315e522..a8e962c 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,15 @@ AC_ARG_WITH(libctf-prefix, LIBCTF_LD_LIBRARY_PATH="`readlink -f $withval`/lib"; BUILD_CTF=NO], [BUILD_CTF=YES]) +AM_CONDITIONAL([WITH_BUILD_CTF], [test x${BUILD_CTF} = xYES]) + +AC_ARG_WITH([clang-check], + [AS_HELP_STRING([--with-clang-check], + [Check with clang-check])], + [clang_check=YES; + AC_CHECK_PROG([CLANG_CHECK], [clang-check])], + [clang_check=NO]) +AM_CONDITIONAL([WITH_CLANG_CHECK], [test x${clang_check} = xYES]) AC_ARG_WITH(dgemm, AS_HELP_STRING([--without-dgemm], [Disable dgemm]), @@ -77,7 +86,7 @@ CXX=${MPICXX} dnl ---------- CHECK CTF if test xYES = x${BUILD_CTF}; then - AC_MSG_ERROR([Sorry, building CTF not supported yet provide a build path + AC_MSG_WARN([Sorry, building CTF not supported yet provide a build path with --with-libctf-prefix=path]) else CPPFLAGS="$CPPFLAGS -I${LIBCTF_CPATH}" diff --git a/etc/make/ctf.mk b/etc/make/ctf.mk index a75ee2d..f4d43e5 100644 --- a/etc/make/ctf.mk +++ b/etc/make/ctf.mk @@ -10,7 +10,7 @@ $(CTF_SRC_PATH)/configure: $(CTF_BUILD_PATH)/Makefile: $(CTF_SRC_PATH)/configure mkdir -p $(CTF_BUILD_PATH) - cd $(CTF_BUILD_PATH) && $(CTF_SRC_PATH)/configure $(CTF_CONFIG_FLAGS) + cd $(CTF_BUILD_PATH) && $(abspath $(CTF_SRC_PATH))/configure $(CTF_CONFIG_FLAGS) $(CTF_STATIC_LIB): $(CTF_BUILD_PATH)/Makefile $(info Compiling $@) @@ -21,8 +21,3 @@ ctf: $(CTF_STATIC_LIB) ctf-clean: rm -rf $(CTF_BUILD_PATH) - -EXTERNAL_DEPENDENCIES += ctf -STATIC_LIBS += $(CTF_LDFLAGS) -INCLUDE_FLAGS += $(CTF_INCLUDE) -REQUIRED_MAKEVARS += CTF_COMMIT CTF_BUILD_PATH CTF_GIT_REPOSITORY CTF_SRC_PATH diff --git a/etc/nix/clang.nix b/etc/nix/clang.nix index 89afa25..3c14a15 100644 --- a/etc/nix/clang.nix +++ b/etc/nix/clang.nix @@ -7,6 +7,8 @@ ]; shellHook = '' + export CC=clang + export CXX=clang++ export OMPI_CC=clang export OMPI_CXX=clang++ '';