forked from KarypisLab/SLIM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
141 changed files
with
41,378 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*.o | ||
*.a | ||
*.la | ||
*.lo | ||
*.in | ||
*.swp | ||
build/ | ||
lib/ | ||
.vscode/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "lib/GKlib"] | ||
path = lib/GKlib | ||
url = https://github.com/KarypisLab/GKlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
------------------------------------------------------------------------------ | ||
Building requires | ||
|
||
- CMake 2.8, found at http://www.cmake.org/, as well as GNU make. | ||
- A export of the latest trunk of GKlib (see bellow). | ||
|
||
Assumming that the above are available, two commands should suffice to | ||
build the software: | ||
|
||
$ make config | ||
$ make | ||
|
||
|
||
GKlib | ||
----- | ||
Prior to running "make config" create a symbolic link to GKlib's trunk directory | ||
inside the top-level directory of rsuggest. For instance, the following command | ||
should do it: | ||
|
||
$ ln -s ~/local/src/GKlib/trunk GKlib | ||
|
||
which assumes that you have checked out the latest version of GKlib in your | ||
~/local/src directory. | ||
|
||
|
||
Configuration | ||
------------- | ||
SLIM is primarily configured by passing options to make config. For example: | ||
|
||
$ make config shared=1 cc=gcc-4.2 | ||
|
||
would configure rsuggest to be built as a shared library using GCC 4.2. | ||
|
||
Common configuration options are: | ||
cc=[compiler] - The C compiler to use [default is determined by CMake] | ||
shared=1 - Build a shared library instead of a static one | ||
[off by default] | ||
prefix=[PATH] - Set the installation prefix [/usr/local/ by default] | ||
|
||
Advanced debugging related options: | ||
gdb=1 - Build with support for GDB [off by default] | ||
debug=1 - Enable debugging support [off by default] | ||
assert=1 - Enable asserts [off by default] | ||
assert2=1 - Enable very expensive asserts [off by default] | ||
|
||
|
||
Installation | ||
------------ | ||
To install, run | ||
|
||
$ make install | ||
|
||
The default installation prefix is /usr/local. To pick an installation | ||
prefix pass prefix=[path] to make config. For example, | ||
|
||
$ make config prefix=~/myroot/ | ||
|
||
will cause the program to be installed in ~/myroot/ when make install | ||
is run. | ||
|
||
|
||
Other make commands | ||
------------------- | ||
$ make uninstall | ||
Removes all files installed by 'make install'. | ||
|
||
$ make clean | ||
Removes all object files but retains the configuration options. | ||
|
||
$ make distclean | ||
Performs clean and completely removes the build directory. | ||
|
||
------------------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
project(SLIM) | ||
|
||
set(SHARED FALSE CACHE BOOL "build a shared library") | ||
set(WITH_MKL FALSE CACHE BOOL "build using MKL") | ||
|
||
if(MSVC) | ||
set(SLIM_INSTALL FALSE) | ||
else() | ||
set(SLIM_INSTALL TRUE) | ||
endif() | ||
|
||
# Configure libslim library. | ||
if(SHARED) | ||
set(SLIM_LIBRARY_TYPE SHARED) | ||
else() | ||
set(SLIM_LIBRARY_TYPE STATIC) | ||
endif(SHARED) | ||
|
||
if(WITH_MKL) | ||
message(STATUS "*** Building WITH MKL support!") | ||
set(USE_MKL true) | ||
else() | ||
message(STATUS "*** Building WITHOUT MKL support!") | ||
set(USE_MKL false) | ||
endif(WITH_MKL) | ||
|
||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
set(MACOSX TRUE) | ||
endif() | ||
|
||
if (OPENMP) | ||
set(__OPENMP__ TRUE) | ||
endif() | ||
|
||
# Add GK's standard cmake settings | ||
include(./conf/gkbuild.cmake) | ||
|
||
# Include directories | ||
include_directories(include) | ||
include_directories(lib/GKlib) | ||
|
||
# Link directories | ||
if (MACOSX) | ||
link_directories(${PROJECT_SOURCE_DIR}/lib/GKlib/build/Darwin-x86_64/) | ||
else() | ||
link_directories(${PROJECT_SOURCE_DIR}/lib/GKlib/build/Linux-x86_64/) | ||
endif() | ||
|
||
|
||
# Recursively look for CMakeLists.txt in subdirs. | ||
add_subdirectory("include") | ||
add_subdirectory("src/libslim") | ||
add_subdirectory("src/programs") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Configuration options. | ||
gdb = not-set | ||
assert = not-set | ||
assert2 = not-set | ||
debug = not-set | ||
gprof = not-set | ||
openmp = yes | ||
prefix = not-set | ||
gklib_path = not-set | ||
bcls_path = not-set | ||
shared = not-set | ||
with_mkl = not-set | ||
cc = /usr/bin/gcc | ||
cxx = /usr/bin/g++ | ||
#cc = gcc-mp-4.9 | ||
#cxx = g++-mp-4.9 | ||
|
||
#=============================================================== | ||
# There should be no need to modify beyond this point | ||
|
||
cputype = $(shell uname -m | sed "s/\\ /_/g") | ||
systype = $(shell uname -s) | ||
|
||
BUILDDIR = build/$(systype)-$(cputype) | ||
|
||
# Process configuration options. | ||
CONFIG_FLAGS = -DCMAKE_VERBOSE_MAKEFILE=1 | ||
ifeq ($(gklib_path), not-set) | ||
gklib_path = GKlib | ||
endif | ||
#CONFIG_FLAGS += -DGKLIB_PATH=$(abspath $(gklib_path)) | ||
ifneq ($(gdb), not-set) | ||
CONFIG_FLAGS += -DGDB=$(gdb) | ||
endif | ||
ifneq ($(assert), not-set) | ||
CONFIG_FLAGS += -DASSERT=$(assert) | ||
endif | ||
ifneq ($(assert2), not-set) | ||
CONFIG_FLAGS += -DASSERT2=$(assert2) | ||
endif | ||
ifneq ($(debug), not-set) | ||
CONFIG_FLAGS += -DDEBUG=$(debug) | ||
endif | ||
ifneq ($(gprof), not-set) | ||
CONFIG_FLAGS += -DGPROF=$(gprof) | ||
endif | ||
ifneq ($(openmp), not-set) | ||
CONFIG_FLAGS += -DOPENMP=$(openmp) | ||
endif | ||
ifneq ($(prefix), not-set) | ||
CONFIG_FLAGS += -DCMAKE_INSTALL_PREFIX=$(prefix) | ||
endif | ||
ifneq ($(shared), not-set) | ||
CONFIG_FLAGS += -DSHARED=1 | ||
endif | ||
ifneq ($(with_mkl), not-set) | ||
CONFIG_FLAGS += -DWITH_MKL=1 | ||
endif | ||
ifneq ($(cc), not-set) | ||
CONFIG_FLAGS += -DCMAKE_C_COMPILER=$(cc) | ||
endif | ||
ifneq ($(cxx), not-set) | ||
CONFIG_FLAGS += -DCMAKE_CXX_COMPILER=$(cxx) | ||
endif | ||
|
||
VERNUM=1.0.1 | ||
PKGNAME=slim-$(VERNUM) | ||
|
||
define run-config | ||
mkdir -p $(BUILDDIR) | ||
cd $(BUILDDIR) && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 $(CURDIR) $(CONFIG_FLAGS) | ||
endef | ||
|
||
all clean install: | ||
@if [ ! -f $(BUILDDIR)/Makefile ]; then \ | ||
more BUILD.txt; \ | ||
else \ | ||
make -C $(BUILDDIR) $@ $(MAKEFLAGS); \ | ||
fi | ||
|
||
uninstall: | ||
xargs rm < $(BUILDDIR)/install_manifest.txt | ||
|
||
config: distclean | ||
$(run-config) | ||
|
||
distclean: | ||
rm -rf $(BUILDDIR) | ||
|
||
remake: | ||
find . -name CMakeLists.txt -exec touch {} ';' | ||
|
||
dist: | ||
utils/mkdist.sh $(PKGNAME) | ||
|
||
.PHONY: config distclean all clean install uninstall remake dist |
Oops, something went wrong.