Permalink
Browse files

update build system for using external libraries

  • Loading branch information...
fwang2 committed Feb 6, 2014
1 parent 42d0229 commit c25019f0b2e3ae3f64f09a3cb9bed174a50d2331
Showing with 13 additions and 13 deletions.
  1. +7 −8 CMakeLists.txt
  2. +2 −2 experimental/dtar/CMakeLists.txt
  3. +0 −1 experimental/dtar/common.h
  4. +4 −2 experimental/dtar/env.sh
View
@@ -3,26 +3,25 @@ project(fileutils)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeScripts)
#include(CMakeForceCompiler)
#CMAKE_FORCE_C_COMPILER(mpicc ${CMAKE_C_COMPILER_ID})
#CMAKE_FORCE_CXX_COMPILER(mpicxx ${CMAKE_CXX_COMPILER_ID})
if (DEFINED ENV{FILEUTILS_EXT})
message("-- Using $ENV{FILEUTILS_EXT}")
set(ENV{PKG_CONFIG_PATH} "$ENV{FILEUTILS_EXT}/lib/pkgconfig" )
endif()
find_package(PkgConfig)
find_package(MPI REQUIRED)
set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g")
set(CMAKE_C_FLAGS_RELEASE "-Wall -Werror -O3")
# pkg_check_modules(ARCHIVE REQUIRED libarchive)
find_package(PkgConfig)
find_package(MPI REQUIRED)
include_directories(${MPI_INCLUDE_PATH})
pkg_check_modules(CIRCLE REQUIRED libcircle)
pkg_check_modules(DTCMP REQUIRED libdtcmp)
add_definitions(${CIRCLE_CFLAGS})
add_definitions(${DTCMP_CFLAGS})
include_directories(src/common)
add_subdirectory(src/common)
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8)
project(fileutils_dtar)
set(CMAKE_C_FLAGS_DEBUG "-std=c99 -Wall -O0 -g")
set(CMAKE_C_FLAGS "-std=c99 -Wall -O0 -g")
pkg_check_modules(GLIB2 REQUIRED glib-2.0)
@@ -15,4 +15,4 @@ link_libraries(${ARCHIVE_LDFLAGS})
set(dtar_src_files common.c handle_args.c dtar.c)
add_executable(dtar ${dtar_src_files})
target_link_libraries(dtar bayer circle)
target_link_libraries(dtar ${MPI_LIBRARIES} bayer circle)
@@ -23,7 +23,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <attr/xattr.h>
#include <mpi.h>
#include <glib.h>
#include <libcircle.h>
View
@@ -1,2 +1,4 @@
export LIBFFI_CFLAGS=-I/ccs/home/fwang2/fu_ext/lib/libffi-3.0.13/include
export LIBFFI_LIBS="-L/ccs/home/fwang2/fu_ext/lib64 -lffi"
export FILEUTILS_EXT=$HOME/fu_ext
export LIBFFI_CFLAGS=-I${FILEUTILS_EXT}/fu_ext/lib/libffi-3.0.13/include
export LIBFFI_LIBS="-L${FILEUTILS_EXT}/lib64 -lffi"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${FILEUTILS_EXT}/lib:${FILEUTILS_EXT}/lib64

0 comments on commit c25019f

Please sign in to comment.