mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 01:24:47 +08:00
Protect #pragma comment(lib, "foo") with _WIN32 checks (#6867)
lld on Linux can now process #pragma comment(lib, "foo") macros which results in build failures on Linux when lld is used. Fix this by protecting these macros with _WIN32 checks.
This commit is contained in:
parent
70149722d7
commit
8c49e565c0
@ -1,7 +1,9 @@
|
||||
#include "tests.pch.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#pragma comment(lib, "version")
|
||||
#pragma comment(lib, "winhttp")
|
||||
#endif
|
||||
|
||||
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||||
|
||||
@ -61,4 +63,4 @@ namespace UnitTest1
|
||||
Assert::AreEqual(size_t{0}, v.command_arguments.size());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
#include "tests.pch.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#pragma comment(lib, "version")
|
||||
#pragma comment(lib, "winhttp")
|
||||
#endif
|
||||
|
||||
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||||
|
||||
|
@ -2,8 +2,10 @@
|
||||
|
||||
#include <tests.utils.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#pragma comment(lib, "version")
|
||||
#pragma comment(lib, "winhttp")
|
||||
#endif
|
||||
|
||||
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
#include "tests.pch.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#pragma comment(lib, "version")
|
||||
#pragma comment(lib, "winhttp")
|
||||
#endif
|
||||
|
||||
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||||
|
||||
|
@ -40,8 +40,10 @@
|
||||
#include <memory>
|
||||
#include <random>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#pragma comment(lib, "ole32")
|
||||
#pragma comment(lib, "shell32")
|
||||
#endif
|
||||
|
||||
using namespace vcpkg;
|
||||
|
||||
|
@ -16,7 +16,9 @@
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#pragma comment(lib, "Advapi32")
|
||||
#endif
|
||||
|
||||
using namespace vcpkg::System;
|
||||
|
||||
|
@ -9,8 +9,10 @@
|
||||
#include <vcpkg/base/strings.h>
|
||||
#include <vcpkg/base/system.process.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#pragma comment(lib, "version")
|
||||
#pragma comment(lib, "winhttp")
|
||||
#endif
|
||||
|
||||
namespace vcpkg::Metrics
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user