early-access version 2853
This commit is contained in:
124
externals/vcpkg/ports/clrng/001-build-fixup.patch
vendored
Executable file
124
externals/vcpkg/ports/clrng/001-build-fixup.patch
vendored
Executable file
@@ -0,0 +1,124 @@
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 65f51db..f010bb8 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -31,7 +31,7 @@
|
||||
# ########################################################################
|
||||
|
||||
|
||||
-cmake_minimum_required( VERSION 2.8.10 )
|
||||
+cmake_minimum_required( VERSION 3.0 )
|
||||
|
||||
if( CMAKE_GENERATOR MATCHES "NMake" )
|
||||
option( NMAKE_COMPILE_VERBOSE "Print compile and link strings to the console" OFF )
|
||||
@@ -127,7 +127,6 @@ if( BUILD64 )
|
||||
set_property( GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE )
|
||||
message( STATUS "64bit build - FIND_LIBRARY_USE_LIB64_PATHS TRUE" )
|
||||
|
||||
- set( SUFFIX_LIB_DEFAULT "64" )
|
||||
else( )
|
||||
set_property( GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE )
|
||||
message( STATUS "32bit build - FIND_LIBRARY_USE_LIB64_PATHS FALSE" )
|
||||
@@ -161,7 +160,8 @@ set( SUFFIX_BIN ${SUFFIX_BIN_DEFAULT} CACHE STRING "String to append to 'bin' in
|
||||
#endif( )
|
||||
|
||||
# This will define OPENCL_FOUND
|
||||
-find_package( OpenCL )
|
||||
+find_package( OpenCL REQUIRED )
|
||||
+find_package( Threads REQUIRED )
|
||||
|
||||
if( (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 2.8) )
|
||||
message( STATUS "Cmake version 2.8 or greater needed to use GTest" )
|
||||
@@ -170,7 +170,7 @@ else()
|
||||
find_package( GTest )
|
||||
|
||||
# Hack to get googletest v1.6 to work with vs2012
|
||||
- if( MSVC11 )
|
||||
+ if( 0 )
|
||||
add_definitions( "/D_VARIADIC_MAX=10" )
|
||||
endif( )
|
||||
endif()
|
||||
@@ -196,7 +196,7 @@ get_filename_component( C_COMPILER_NAME ${CMAKE_C_COMPILER} NAME_WE )
|
||||
# message( "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} )
|
||||
|
||||
# Set common compile and link options
|
||||
-if( MSVC )
|
||||
+if( 0 )
|
||||
# Following options for nMake
|
||||
message( STATUS "Detected MSVS Ver: " ${MSVC_VERSION} )
|
||||
|
||||
@@ -206,6 +206,7 @@ if( MSVC )
|
||||
string( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}" )
|
||||
|
||||
elseif( CMAKE_COMPILER_IS_GNUCXX )
|
||||
+ if( 0 )
|
||||
message( STATUS "Detected GNU fortran compiler." )
|
||||
EXEC_PROGRAM( ${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE vnum )
|
||||
STRING(REGEX REPLACE ".*([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" vnum ${vnum})
|
||||
@@ -216,6 +217,7 @@ elseif( CMAKE_COMPILER_IS_GNUCXX )
|
||||
|
||||
set( CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}" )
|
||||
set( CMAKE_C_FLAGS "-std=c11 -Wall -pedantic-errors -pthread ${CMAKE_C_FLAGS}" )
|
||||
+ endif()
|
||||
|
||||
if( BUILD64 )
|
||||
set( CMAKE_CXX_FLAGS "-m64 ${CMAKE_CXX_FLAGS}" )
|
||||
diff --git a/src/library/CMakeLists.txt b/src/library/CMakeLists.txt
|
||||
index dbe479d..8717e58 100644
|
||||
--- a/src/library/CMakeLists.txt
|
||||
+++ b/src/library/CMakeLists.txt
|
||||
@@ -62,8 +62,6 @@ set( clRNG.Headers private.h
|
||||
|
||||
set( clRNG.Files ${clRNG.Source} ${clRNG.Headers} )
|
||||
|
||||
-# Include standard OpenCL headers
|
||||
-include_directories( ${OPENCL_INCLUDE_DIRS} ${PROJECT_BINARY_DIR}/include ../include )
|
||||
|
||||
if(BUILD_SHARED_LIBRARY)
|
||||
add_library( clRNG SHARED ${clRNG.Files} )
|
||||
@@ -72,6 +70,15 @@ else()
|
||||
endif()
|
||||
target_link_libraries( clRNG ${OPENCL_LIBRARIES} )
|
||||
|
||||
+target_link_libraries( clRNG PUBLIC
|
||||
+ OpenCL::OpenCL
|
||||
+ Threads::Threads
|
||||
+)
|
||||
+target_include_directories( clRNG PUBLIC
|
||||
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||
+ $<INSTALL_INTERFACE:include>
|
||||
+)
|
||||
+
|
||||
set_target_properties( clRNG PROPERTIES VERSION ${CLRNG_VERSION} )
|
||||
set_target_properties( clRNG PROPERTIES SOVERSION ${CLRNG_SOVERSION} )
|
||||
set_target_properties( clRNG PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" )
|
||||
@@ -89,7 +96,7 @@ install( TARGETS clRNG
|
||||
EXPORT clRNG-Targets
|
||||
RUNTIME DESTINATION bin${SUFFIX_BIN}
|
||||
LIBRARY DESTINATION lib${SUFFIX_LIB}
|
||||
- ARCHIVE DESTINATION lib${SUFFIX_LIB}/import
|
||||
+ ARCHIVE DESTINATION lib${SUFFIX_LIB}
|
||||
)
|
||||
|
||||
# CMake config files for clRNG
|
||||
@@ -139,9 +146,9 @@ endif( )
|
||||
include( InstallRequiredSystemLibraries )
|
||||
|
||||
# Install necessary runtime files for debug builds
|
||||
-install( PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
|
||||
- CONFIGURATIONS Debug
|
||||
- DESTINATION ${CLRNG_RUNTIME_DESTINATION} )
|
||||
+#install( PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
|
||||
+# CONFIGURATIONS Debug
|
||||
+# DESTINATION ${CLRNG_RUNTIME_DESTINATION} )
|
||||
|
||||
# Install all *.pdb files for debug builds
|
||||
install( DIRECTORY ${PROJECT_BINARY_DIR}/staging/
|
||||
@@ -152,6 +159,6 @@ install( DIRECTORY ${PROJECT_BINARY_DIR}/staging/
|
||||
|
||||
# Install a snapshot of the source as it was for this build; useful for the .pdb's
|
||||
install( DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
- DESTINATION ${CLRNG_RUNTIME_DESTINATION}
|
||||
+ DESTINATION "."
|
||||
OPTIONAL
|
||||
CONFIGURATIONS Debug )
|
||||
45
externals/vcpkg/ports/clrng/portfile.cmake
vendored
Executable file
45
externals/vcpkg/ports/clrng/portfile.cmake
vendored
Executable file
@@ -0,0 +1,45 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO clMathLibraries/clRNG
|
||||
REF 4a16519ddf52ee0a5f0b7e6288b0803b9019c13b
|
||||
SHA512 28bda5d2a156e7394917f8c40bd1e8e7b52cf680abc0ef50c2650b1d546c0a1d0bd47ceeccce3cd7c79c90a15494c3d27829e153613a7d8e18267ce7262eeb6e
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
001-build-fixup.patch
|
||||
)
|
||||
|
||||
file(REMOVE ${SOURCE_PATH}/src/FindOpenCL.cmake)
|
||||
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT VCPKG_CMAKE_SYSTEM_NAME)
|
||||
set(R123_SSE_FLAG [[-DCMAKE_C_FLAGS="/DR123_USE_SSE=0"]])
|
||||
endif()
|
||||
|
||||
# We only have x64 and x86 as valid archs, as arm64 fails fast
|
||||
string(COMPARE EQUAL "${VCPKG_TARGET_ARCHITECTURE}" "x64" BUILD64)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBRARY)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}/src"
|
||||
OPTIONS
|
||||
-DBUILD_SHARED_LIBRARY=${BUILD_SHARED_LIBRARY}
|
||||
-DBUILD64=${BUILD64}
|
||||
-DBUILD_TEST=OFF
|
||||
-DBUILD_CLIENT=OFF
|
||||
${R123_SSE_FLAG}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(
|
||||
REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/bin"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/clRNG)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
19
externals/vcpkg/ports/clrng/vcpkg.json
vendored
Executable file
19
externals/vcpkg/ports/clrng/vcpkg.json
vendored
Executable file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "clrng",
|
||||
"version-date": "2020-12-01",
|
||||
"port-version": 3,
|
||||
"description": "clRNG is a library for uniform random number generation in OpenCL.",
|
||||
"homepage": "https://github.com/clMathLibraries/clRNG",
|
||||
"supports": "!arm64",
|
||||
"dependencies": [
|
||||
"opencl",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user