-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert our unit tests and perf harness to use native entry-points (#50)
- Loading branch information
1 parent
56371fb
commit f6e4b6c
Showing
34 changed files
with
1,489 additions
and
1,366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,12 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<RepoDir>$(MSBuildThisFileDirectory)</RepoDir> | ||
<BaseArtifactsPath>$(RepoDir)artifacts</BaseArtifactsPath> | ||
<ArtifactsDir>$(BaseArtifactsPath)/$(Configuration)/</ArtifactsDir> | ||
|
||
<BaseIntermediateOutputPath>$(ArtifactsDir)obj/$(MSBuildProjectName)</BaseIntermediateOutputPath> | ||
<BaseOutputPath>$(ArtifactsDir)bin/$(MSBuildProjectName)</BaseOutputPath> | ||
<UseArtifactsOutput>true</UseArtifactsOutput> | ||
<ArtifactsPath>$(MSBuildThisFileDirectory)/artifacts/managed</ArtifactsPath> | ||
|
||
<!-- Define the intermediate and output paths so the configuration isn't appended --> | ||
<IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath> | ||
<OutputPath>$(BaseOutputPath)</OutputPath> | ||
<NativeOutputPath Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(BaseArtifactsPath)/bin</NativeOutputPath> | ||
<NativeOutputPath Condition="!$([MSBuild]::IsOSPlatform('Windows'))">$(BaseArtifactsPath)/lib</NativeOutputPath> | ||
|
||
<TargetFrameworkLatest>net8.0</TargetFrameworkLatest> | ||
<TargetFramework>net8.0</TargetFramework> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,40 @@ | ||
# Configure the compiler | ||
include(../configure.cmake) | ||
include(FindNetHost.cmake) | ||
|
||
add_subdirectory(regnative/) | ||
if (POLICY CMP0135) | ||
cmake_policy(SET CMP0135 NEW) # Set timestamps in downloaded archives to the time of download. | ||
endif() | ||
|
||
include(FetchContent) | ||
FetchContent_Declare( | ||
googletest | ||
GIT_REPOSITORY | ||
https://github.com/google/googletest.git | ||
GIT_TAG | ||
v1.14.0 | ||
) | ||
# For Windows: Prevent overriding the parent project's compiler/linker settings | ||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) | ||
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) | ||
|
||
FetchContent_Declare( | ||
benchmark | ||
GIT_REPOSITORY | ||
https://github.com/google/benchmark.git | ||
GIT_TAG | ||
v1.8.3 | ||
) | ||
|
||
# Don't build the tests for the benchmark library. | ||
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE) | ||
set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "" FORCE) | ||
FetchContent_MakeAvailable(googletest benchmark) | ||
|
||
include(GoogleTest) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
add_subdirectory(regpal) | ||
add_subdirectory(regperf) | ||
add_subdirectory(regtest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
execute_process( | ||
COMMAND ${CMAKE_COMMAND} -E env DOTNET_NOLOGO=1 dotnet msbuild FindNetHostDir.proj -t:OutputNetHostDir -nologo | ||
OUTPUT_VARIABLE NET_HOST_DIR | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
COMMAND_ERROR_IS_FATAL ANY | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
string(STRIP ${NET_HOST_DIR} NET_HOST_DIR) | ||
|
||
if (WIN32) | ||
add_library(nethost IMPORTED SHARED) | ||
set_target_properties(nethost PROPERTIES | ||
IMPORTED_LOCATION ${NET_HOST_DIR}/nethost.dll | ||
IMPORTED_IMPLIB ${NET_HOST_DIR}/nethost.lib) | ||
else() | ||
add_library(nethost IMPORTED STATIC) | ||
target_compile_definitions(nethost INTERFACE NETHOST_USE_AS_STATIC) | ||
set_target_properties(nethost PROPERTIES | ||
IMPORTED_LOCATION ${NET_HOST_DIR}/libnethost.a) | ||
endif() | ||
|
||
target_include_directories(nethost INTERFACE ${NET_HOST_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="OutputNetHostDir"> | ||
<Target Name="OutputNetHostDir"> | ||
<Message Text="$(NetCoreTargetingPackRoot)/Microsoft.NETCore.App.Host.$(NETCoreSdkRuntimeIdentifier)/$(BundledNETCoreAppPackageVersion)/runtimes/$(NETCoreSdkRuntimeIdentifier)/native" Importance="high" /> | ||
</Target> | ||
</Project> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/Regression.TargetAssembly/Regression.TargetAssembly.ilproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.