Merge pull request #3469 from Cheney-W/fixpmdkFailedInWiC

FixPmdkFailure
This commit is contained in:
Alexander Karatarakis 2018-05-17 16:59:35 -07:00 committed by GitHub
commit a4b4f0ddfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 4 deletions

View File

@ -1,3 +1,3 @@
Source: pmdk
Version: 1.4-1
Version: 1.4-2
Description: Persistent Memory Development Kit

View File

@ -0,0 +1,22 @@
diff --git a/src/windows/srcversion/srcversion.vcxproj b/src/windows/srcversion/srcversion.vcxproj
index 8761197..795d1a7 100644
--- a/src/windows/srcversion/srcversion.vcxproj
+++ b/src/windows/srcversion/srcversion.vcxproj
@@ -72,7 +72,7 @@
</Command>
</PreBuildEvent>
<CustomBuildStep>
- <Command>powershell.exe -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION)</Command>
+ <Command>powershell.exe -ExecutionPolicy Bypass -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION)</Command>
<Outputs>__NON_EXISTENT_FILE__</Outputs>
<Message>generate srcversion.h</Message>
</CustomBuildStep>
@@ -99,7 +99,7 @@
</Command>
</PreBuildEvent>
<CustomBuildStep>
- <Command>powershell.exe -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION)</Command>
+ <Command>powershell.exe -ExecutionPolicy Bypass -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION)</Command>
<Outputs>__NON_EXISTENT_FILE__</Outputs>
<Message>generate srcversion.h</Message>
</CustomBuildStep>

View File

@ -21,6 +21,9 @@ vcpkg_from_github(
REF 1.4
SHA512 95dbea9acfea4a6cb433a25f56f7484946a93fbce1c5e0e1d6ff36e0824e3e0e9f28f37024918998358f8ff12e69d0902fcf88357b9ad12695f32e06e86ffac8
HEAD_REF master
PATCHES
"${CMAKE_CURRENT_LIST_DIR}/addPowerShellExecutionPolicy.patch"
"${CMAKE_CURRENT_LIST_DIR}/v141.patch"
)
get_filename_component(PMDK_VERSION "${SOURCE_PATH}" NAME)
@ -29,9 +32,6 @@ string(REPLACE "pmdk-" "" PMDK_VERSION "${PMDK_VERSION}")
# Build only the selected projects
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/src/PMDK.sln
PLATFORM x64
PLATFORM_TOOLSET v140
TARGET_PLATFORM_VERSION 10.0.16299.0
TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmemcto,Solution Items\\libpmempool,Solution Items\\libvmem,Solution Items\\Tools\\pmempool"
OPTIONS /p:SRCVERSION=${PMDK_VERSION}
)

13
ports/pmdk/v141.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/src/common/util.h b/src/common/util.h
index 04b098f..33a64c2 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -284,7 +284,7 @@ typedef enum {
#error MSVC ports of util_atomic_ only work on X86_64
#endif
-#if _MSC_VER > 1911
+#if _MSC_VER >= 2000
#error util_atomic_ utility functions not tested with this version of VC++
#error These utility functions are not future proof, as they are not
#error based on publicly available documentation.