Browse Source

#IQRV #comment DeviceBaseHelper 宏注释

80374374 2 years ago
parent
commit
6a6ed30bd2
3 changed files with 46 additions and 0 deletions
  1. 42 0
      CMakePresets.json
  2. 0 0
      CMakeSettings-.json
  3. 4 0
      Module/include/DeviceBaseHelper.h

+ 42 - 0
CMakePresets.json

@@ -0,0 +1,42 @@
+{
+  "version": 2,
+  "configurePresets": [
+    {
+      "name": "linux-default",
+      "displayName": "Linux Debug",
+      "description": "面向适用于 Linux 的 Windows 子系统(WSL)或远程 Linux 系统。",
+      "generator": "Unix Makefiles",
+      "binaryDir": "${sourceDir}/out/build/${presetName}",
+      "cacheVariables": {
+        "CMAKE_BUILD_TYPE": "Debug",
+        "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
+        "SIMULATE_ON": {
+          "value": "False",
+          "type": "BOOL"
+        },
+        "BUILD_TESTING": "OFF",
+        "BUILD_DEVADAPTER": "ON"
+      },
+      "vendor": {
+        "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ "Linux" ] },
+        "microsoft.com/VisualStudioRemoteSettings/CMake/1.0": { "sourceDir": "$env{HOME}/.vs/$ms{projectDirName}" }
+      }
+    },
+    {
+      "name": "windows-default",
+      "displayName": "Windows x64 Debug",
+      "description": "面向具有 Visual Studio 开发环境的 Windows。",
+      "generator": "Ninja",
+      "binaryDir": "${sourceDir}/out/build/${presetName}",
+      "architecture": {
+        "value": "x64",
+        "strategy": "external"
+      },
+      "cacheVariables": {
+        "CMAKE_BUILD_TYPE": "Debug",
+        "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
+      },
+      "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ "Windows" ] } }
+    }
+  ]
+}

+ 0 - 0
CMakeSettings.json → CMakeSettings-.json


+ 4 - 0
Module/include/DeviceBaseHelper.h

@@ -95,6 +95,8 @@ public:
 		return ((eRet == Error_Succeed) ? (TRUE) : (FALSE));
 	}
 
+#ifndef _WIN32
+
 	static VendorNameType GetCurVendorType(LPCTSTR vendorName) 
 	{
 		if(vendorName == NULL || strlen(vendorName) == 0) {
@@ -160,4 +162,6 @@ struct HardwareEntityCode {
 	DWORD dwReserved;
 };
 
+#endif //NOT _WIN32
+
 #endif // __DEVICEBASE_HELPER_H