Skip to content

Commit

Permalink
FixpmdkFailure
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheney-Wang committed May 9, 2018
1 parent 7e79587 commit d91e2ef
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ports/pmdk/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Source: pmdk
Version: 1.4-1
Version: 1.4-2
Description: Persistent Memory Development Kit
22 changes: 22 additions & 0 deletions ports/pmdk/addPowerShellExecutionPolicy.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/srcversion.vcxproj b/srcversion.vcxproj
index 8761197..795d1a7 100644
--- a/srcversion.vcxproj
+++ b/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>
5 changes: 5 additions & 0 deletions ports/pmdk/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ vcpkg_from_github(
get_filename_component(PMDK_VERSION "${SOURCE_PATH}" NAME)
string(REPLACE "pmdk-" "" PMDK_VERSION "${PMDK_VERSION}")

vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}/src/windows/srcversion
PATCHES "${CMAKE_CURRENT_LIST_DIR}/addPowerShellExecutionPolicy.patch"
)

# Build only the selected projects
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/src/PMDK.sln
Expand Down

0 comments on commit d91e2ef

Please sign in to comment.