mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-24 23:37:58 +08:00
4fac06df86
According to the upstream PR [1295](https://github.com/fnc12/sqlite_orm/pull/1295), fix the test feature to support uwp. - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] ~~SHA512s are updated for each updated download.~~ - [X] The "supports" clause reflects platforms that may be fixed by this new version. - [ ] ~~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~~ - [ ] ~~Any patches that are no longer applied are deleted from the port's directory.~~ - [X] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [X] Only one version is added to each modified port's versions file. Test features passed with following triplet: ``` x64-uwp ```
17 lines
650 B
Diff
17 lines
650 B
Diff
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
|
|
index 945d275..8ca2de4 100644
|
|
--- a/tests/CMakeLists.txt
|
|
+++ b/tests/CMakeLists.txt
|
|
@@ -162,6 +162,11 @@ if (MSVC)
|
|
# C4458: declaration of 'symbol' hides class member
|
|
/wd4458)
|
|
endif()
|
|
+ if (CMAKE_CXX_FLAGS MATCHES "/D_UNICODE")
|
|
+ # explicitly set the entry point of the executable file,
|
|
+ # otherwise for some reason the linker will not pick up `wmain`, which is provided by the static Catch2 library
|
|
+ target_link_options(unit_tests PRIVATE "/ENTRY:wmainCRTStartup")
|
|
+ endif()
|
|
endif()
|
|
|
|
target_precompile_headers(unit_tests PRIVATE
|