aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/grppi
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/grppi')
-rw-r--r--vcpkg/ports/grppi/fix-build-error.patch13
-rw-r--r--vcpkg/ports/grppi/fix-support-other-compilers.patch44
-rw-r--r--vcpkg/ports/grppi/portfile.cmake34
-rw-r--r--vcpkg/ports/grppi/tbb.patch24
-rw-r--r--vcpkg/ports/grppi/vcpkg.json22
5 files changed, 137 insertions, 0 deletions
diff --git a/vcpkg/ports/grppi/fix-build-error.patch b/vcpkg/ports/grppi/fix-build-error.patch
new file mode 100644
index 0000000..edbdc3a
--- /dev/null
+++ b/vcpkg/ports/grppi/fix-build-error.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 09f1f9b..9ef62e9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -13,7 +13,7 @@ message(STATUS "CMAKE_CXX_COMPILER_ID: " ${CMAKE_CXX_COMPILER_ID} )
+
+ set(CMAKE_CXX_STANDARD 14)
+
+-add_compile_options(-Wall -Werror -pedantic -pedantic-errors -Wextra -Weffc++)
++add_compile_options(-Wall -Werror -pedantic -pedantic-errors -Wextra)
+
+ # Set specific options depending on compiler
+ if ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" )
diff --git a/vcpkg/ports/grppi/fix-support-other-compilers.patch b/vcpkg/ports/grppi/fix-support-other-compilers.patch
new file mode 100644
index 0000000..d347b26
--- /dev/null
+++ b/vcpkg/ports/grppi/fix-support-other-compilers.patch
@@ -0,0 +1,44 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 09f1f9b..e7b562b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -20,22 +20,19 @@ if ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" )
+ if(NOT(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 3.9.0))
+ message(FATAL_ERROR "Clang version " ${CMAKE_CXX_COMPILER_VERSION}
+ " not supported. Upgrade to 3.9 or above.")
+- else()
+- message( STATUS "C++ Compiler is Clang" )
+ endif()
+ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+ if(NOT(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 6.0))
+ message(FATAL_ERROR "g++ version " ${CMAKE_CXX_COMPILER_VERSION}
+ " not supported. Upgrade to 6.0 or above.")
+ else()
+- message( STATUS "C++ Compiler is GNU")
+ if (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 7.0)
+ #g++ 7 warns in non C++17 for over-aligned new otherwise
+ add_compile_options(-faligned-new)
+ endif()
+ endif()
+ elseif ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" )
+- message(FATAL_ERROR "Intel compiler is not currently supported")
++ message(WARNING "Intel compiler is not currently supported")
+ # if(NOT(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 16.0))
+ # message( FATAL_ERROR "Intel version " ${CMAKE_CXX_COMPILER_VERSION}
+ # " not supported. Upgrade to 16.0 or above.")
+@@ -43,12 +40,11 @@ elseif ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" )
+ # message( STATUS "C++ Compiler is Intel" )
+ # message( WARNING "WARNING: GrPPI has not been fully tested with Intel compiler." )
+ # endif()
+-else()
+- message( FATAL_ERROR "Unsupported compiler: "
+- ${CMAKE_CXX_COMPILER_ID}
+- ${CMAKE_CXX_COMPILER_VERSION})
+ endif()
+
++message(STATUS "C++ Compiler is " ${CMAKE_CXX_COMPILER_ID}
++ " version " ${CMAKE_CXX_COMPILER_VERSION})
++
+ # GrPPI library
+ include_directories("${CMAKE_SOURCE_DIR}/include")
+
diff --git a/vcpkg/ports/grppi/portfile.cmake b/vcpkg/ports/grppi/portfile.cmake
new file mode 100644
index 0000000..11543d4
--- /dev/null
+++ b/vcpkg/ports/grppi/portfile.cmake
@@ -0,0 +1,34 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO arcosuc3m/grppi
+ REF v0.4.0
+ SHA512 f8235af6832958de420a68d4465a6c63701ab4385f3430d32f77c1d5e8212001262aad1a8aae04261ba889d592798cd3963843b190d325bddc1fe7dcc4aebd7d
+ HEAD_REF master
+ PATCHES
+ fix-build-error.patch
+ fix-support-other-compilers.patch
+ tbb.patch
+)
+
+file(REMOVE "${SOURCE_PATH}/cmake.modules/FindTBB.cmake")
+
+vcpkg_check_features(
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ tbb GRPPI_TBB_ENABLE
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${FEATURE_OPTIONS}
+ -DGRPPI_DOXY_ENABLE=OFF
+ -DGRPPI_EXAMPLE_APPLICATIONS_ENABLE=OFF
+ -DGRPPI_UNIT_TEST_ENABLE=OFF
+)
+
+vcpkg_cmake_install()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/grppi/tbb.patch b/vcpkg/ports/grppi/tbb.patch
new file mode 100644
index 0000000..8d17ee3
--- /dev/null
+++ b/vcpkg/ports/grppi/tbb.patch
@@ -0,0 +1,24 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 09f1f9b..d58b972 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -53,15 +53,10 @@ endif()
+ include_directories("${CMAKE_SOURCE_DIR}/include")
+
+ # TBB Library
+-find_package( TBB )
+-if( TBB_FOUND )
+- option(GRPPI_TBB_ENABLE "Require TBB library" ON)
+- message(STATUS "TBB found")
+-else( TBB_FOUND )
+- option(GRPPI_TBB_ENABLE "Require TBB library" OFF )
+- set(GRPPI_TBB_ENABLE OFF CACHE BOOL "Require TBB library" FORCE)
+- message(STATUS "TBB not found")
+-endif( TBB_FOUND )
++option(GRPPI_TBB_ENABLE "Enable TBB backend" OFF)
++if(GRPPI_TBB_ENABLE)
++ find_package(TBB CONFIG REQUIRED)
++endif()
+
+ message( STATUS "TBB: " ${GRPPI_TBB_ENABLE} )
+ if( GRPPI_TBB_ENABLE )
diff --git a/vcpkg/ports/grppi/vcpkg.json b/vcpkg/ports/grppi/vcpkg.json
new file mode 100644
index 0000000..126b90f
--- /dev/null
+++ b/vcpkg/ports/grppi/vcpkg.json
@@ -0,0 +1,22 @@
+{
+ "name": "grppi",
+ "version": "0.4.0",
+ "port-version": 2,
+ "description": "GrPPI is an open source generic and reusable parallel pattern programming interface developed at University Carlos III of Madrid.",
+ "homepage": "https://github.com/arcosuc3m/grppi",
+ "license": "Apache-2.0",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ }
+ ],
+ "features": {
+ "tbb": {
+ "description": "Enable tbb backend",
+ "dependencies": [
+ "tbb"
+ ]
+ }
+ }
+}