summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt25
m---------PMC0
-rw-r--r--include/gras/CMakeLists.txt19
-rw-r--r--lib/CMakeLists.txt18
-rw-r--r--python/gr_tags.i (renamed from swig/gr_tags.i)0
-rw-r--r--python/gras.i (renamed from swig/gras.i)0
-rw-r--r--python/gras/CMakeLists.txt33
-rw-r--r--python/runtime.i (renamed from swig/runtime.i)0
8 files changed, 65 insertions, 30 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8ae84e9..dd0b5fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,19 +5,14 @@ cmake_minimum_required(VERSION 2.6)
project(gras CXX C)
enable_testing()
-#select the release build type by default to get optimization flags
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "Release")
- message(STATUS "Build type not specified: defaulting to release.")
-endif(NOT CMAKE_BUILD_TYPE)
-set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
+set(GRAS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+list(APPEND CMAKE_MODULE_PATH ${GRAS_SOURCE_DIR}/PMC/cmake/Modules)
+include(CMakeDefsHelper)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DGRAS_DEBUG)
endif()
-set(GRAS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
-
set(LIBVER 0.0.0)
if(CMAKE_COMPILER_IS_GNUCXX)
@@ -41,18 +36,20 @@ if (NOT DEFINED GRAS_COMP_PYTHON)
set(GRAS_COMP_PYTHON "python")
endif()
-########################################################################
-# Setup PMC Deps
-########################################################################
set(PMC_COMP_DEVEL ${GRAS_COMP_DEVEL})
set(PMC_COMP_RUNTIME ${GRAS_COMP_RUNTIME})
set(PMC_COMP_PYTHON ${GRAS_COMP_PYTHON})
-list(APPEND CMAKE_MODULE_PATH ${GRAS_SOURCE_DIR}/PMC/cmake/Modules)
-include_directories(${GRAS_SOURCE_DIR}/PMC/include)
-add_subdirectory(PMC)
+########################################################################
+# Paths to public headers
+########################################################################
+list(APPEND GRAS_INCLUDE_DIRS ${GRAS_SOURCE_DIR}/PMC/include)
+list(APPEND GRAS_INCLUDE_DIRS ${GRAS_SOURCE_DIR}/include)
########################################################################
# Add subdirectories
########################################################################
+add_subdirectory(include/gras)
add_subdirectory(lib)
+add_subdirectory(PMC)
+add_subdirectory(python/gras)
diff --git a/PMC b/PMC
-Subproject 7d96189a250a2ad14acd8a900ff4b114266a664
+Subproject 571087e9e35834a738fc6c180e19c30ce9e4ed8
diff --git a/include/gras/CMakeLists.txt b/include/gras/CMakeLists.txt
new file mode 100644
index 0000000..69c4d2c
--- /dev/null
+++ b/include/gras/CMakeLists.txt
@@ -0,0 +1,19 @@
+########################################################################
+# install include files
+########################################################################
+install(FILES
+
+ block.hpp
+ element.hpp
+ gras.hpp
+ hier_block.hpp
+ io_signature.hpp
+ sbuffer.hpp
+ sbuffer.ipp
+ tags.hpp
+ thread_pool.hpp
+ top_block.hpp
+
+ DESTINATION include/gras
+ COMPONENT ${GRAS_COMP_DEVEL}
+)
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index e67f341..6d6b888 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -1,27 +1,13 @@
########################################################################
# Setup the GRAS library build
########################################################################
-include_directories(${GRAS_SOURCE_DIR}/include)
+include_directories(${GRAS_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
########################################################################
# Setup Boost
########################################################################
-if(UNIX AND EXISTS "/usr/lib64")
- list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
-endif(UNIX AND EXISTS "/usr/lib64")
-
-set(Boost_ADDITIONAL_VERSIONS
- "1.35.0" "1.35" "1.36.0" "1.36" "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39"
- "1.40.0" "1.40" "1.41.0" "1.41" "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44"
- "1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.49.0" "1.49"
- "1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54"
- "1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59"
- "1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64"
- "1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69"
-)
-find_package(Boost COMPONENTS)
-
+find_package(Boost)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
list(APPEND GRAS_LIBRARIES ${Boost_LIBRARIES})
diff --git a/swig/gr_tags.i b/python/gr_tags.i
index 828d014..828d014 100644
--- a/swig/gr_tags.i
+++ b/python/gr_tags.i
diff --git a/swig/gras.i b/python/gras.i
index 0fe1ea3..0fe1ea3 100644
--- a/swig/gras.i
+++ b/python/gras.i
diff --git a/python/gras/CMakeLists.txt b/python/gras/CMakeLists.txt
new file mode 100644
index 0000000..a55d09e
--- /dev/null
+++ b/python/gras/CMakeLists.txt
@@ -0,0 +1,33 @@
+########################################################################
+# Include swig generation macros
+########################################################################
+find_package(SWIG)
+find_package(PythonLibs)
+if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
+ return()
+endif()
+include(GrSwig)
+include(GrPython)
+find_package(Boost) #for headers
+
+########################################################################
+# setup SWIG build
+########################################################################
+list(APPEND GR_SWIG_INCLUDE_DIRS ${GRAS_INCLUDE_DIRS})
+list(APPEND GR_SWIG_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
+
+#GR_SWIG_MAKE(${pmc_swig_module} ${pmc_swig_module}.i)
+#GR_SWIG_INSTALL(
+# TARGETS ${pmc_swig_module}
+# DESTINATION ${GR_PYTHON_DIR}/PMC
+# COMPONENT ${PMC_COMP_PYTHON}
+#)
+
+########################################################################
+# Install rules
+########################################################################
+#GR_PYTHON_INSTALL(
+# FILES __init__.py
+# DESTINATION ${GR_PYTHON_DIR}/PMC
+# COMPONENT ${PMC_COMP_PYTHON}
+#)
diff --git a/swig/runtime.i b/python/runtime.i
index 8895a7f..8895a7f 100644
--- a/swig/runtime.i
+++ b/python/runtime.i