Move test_fx_ver under test folder (#49313)
authorElinor Fung <elfung@microsoft.com>
Tue, 9 Mar 2021 03:46:53 +0000 (19:46 -0800)
committerGitHub <noreply@github.com>
Tue, 9 Mar 2021 03:46:53 +0000 (19:46 -0800)
src/native/corehost/CMakeLists.txt
src/native/corehost/test/CMakeLists.txt
src/native/corehost/test/fx_ver/CMakeLists.txt [new file with mode: 0644]
src/native/corehost/test/fx_ver/test_fx_ver.cpp [moved from src/native/corehost/test_fx_ver/test_fx_ver.cpp with 100% similarity]
src/native/corehost/test_fx_ver/CMakeLists.txt [deleted file]

index 5489361..3ce1d78 100644 (file)
@@ -31,7 +31,6 @@ if (NOT RUNTIME_FLAVOR STREQUAL Mono)
     add_subdirectory(apphost)
     add_subdirectory(dotnet)
     add_subdirectory(nethost)
-    add_subdirectory(test_fx_ver)
     add_subdirectory(test)
 
     if(CLR_CMAKE_TARGET_WIN32)
index 7f56fad..72ba29f 100644 (file)
@@ -1,3 +1,4 @@
+add_subdirectory(fx_ver)
 add_subdirectory(mockcoreclr)
 add_subdirectory(mockhostfxr)
 add_subdirectory(mockhostpolicy)
diff --git a/src/native/corehost/test/fx_ver/CMakeLists.txt b/src/native/corehost/test/fx_ver/CMakeLists.txt
new file mode 100644 (file)
index 0000000..e2849e9
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright (c) .NET Foundation and contributors. All rights reserved.
+# Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+project(test_fx_ver)
+
+set(DOTNET_PROJECT_NAME "test_fx_ver")
+
+include_directories(../../fxr)
+
+set(SOURCES
+    test_fx_ver.cpp
+)
+
+include(${CMAKE_CURRENT_LIST_DIR}/../../hostmisc/hostmisc.cmake)
+
+include(../testexe.cmake)
+
+target_link_libraries(${DOTNET_PROJECT_NAME} libhostcommon)
diff --git a/src/native/corehost/test_fx_ver/CMakeLists.txt b/src/native/corehost/test_fx_ver/CMakeLists.txt
deleted file mode 100644 (file)
index d68eea6..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (c) .NET Foundation and contributors. All rights reserved.
-# Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-project(test_fx_ver)
-
-set(EXE_NAME "test_fx_ver")
-
-include_directories(../../)
-include_directories(../)
-include_directories(../fxr)
-include_directories(../hostmisc)
-
-set(SOURCES
-    test_fx_ver.cpp
-)
-
-include(${CMAKE_CURRENT_LIST_DIR}/../hostmisc/hostmisc.cmake)
-
-if(CLR_CMAKE_HOST_WIN32)
-    add_compile_options($<$<CONFIG:RelWithDebInfo>:/MT>)
-    add_compile_options($<$<CONFIG:Release>:/MT>)
-    add_compile_options($<$<CONFIG:Debug>:/MTd>)
-else()
-    add_compile_options(-fvisibility=hidden)
-endif()
-
-add_executable(${EXE_NAME} ${SOURCES})
-target_link_libraries(${EXE_NAME} libhostcommon)
-
-install(TARGETS ${EXE_NAME} DESTINATION corehost_test)
-
-if(CLR_CMAKE_TARGET_LINUX)
-    target_link_libraries (${EXE_NAME} "dl")
-endif()
-
-if(CLR_CMAKE_TARGET_LINUX AND CLR_CMAKE_TARGET_ARCH_ARM)
-    target_link_libraries (${EXE_NAME} "atomic")
-endif()