From f6ebe21f6caa6e99f984c19e0ac370aa7f79b542 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20=C3=85strand=20=28astrand=29?= Date: Mon, 23 Apr 2018 10:30:30 +0200 Subject: [PATCH] Fix windows build with -DCMAKE_BUILD_TYPE=Debug on machines with IActiveDesktop Avoid that the check_c_source_compiles tests fails due to unused variables, since Debug adds -Werror. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a63288a3..82ddaad3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,8 +125,8 @@ endif() # need to check for both the header and library and use our own implementation # in common/os if either doesn't exist. if(WIN32) - check_c_source_compiles("#include \n#include \n#include \nint main(int c, char** v) {IActiveDesktop iad; return 0;}" HAVE_ACTIVE_DESKTOP_H) - check_c_source_compiles("#include \n#include \n#include \nint main(int c, char** v) {GUID i = CLSID_ActiveDesktop; return 0;}" HAVE_ACTIVE_DESKTOP_L) + check_c_source_compiles("#include \n#include \n#include \nint main(int c, char** v) {IActiveDesktop iad; (void)iad; return 0;}" HAVE_ACTIVE_DESKTOP_H) + check_c_source_compiles("#include \n#include \n#include \nint main(int c, char** v) {GUID i = CLSID_ActiveDesktop; (void)i; return 0;}" HAVE_ACTIVE_DESKTOP_L) endif() # X11 stuff. It's in a if() so that we can say REQUIRED -- 2.39.5