Files
CMake/Tests/RunCMake/SharedLibraryDefines/checker.h
AJIOB 83bbde5449 MSVC: Define _WINDLL consistently for shared libraries
Visual Studio defines this automatically for `.dll` targets.
For consistency, define it when compiling for the MSVC ABI
with other generators.  Add policy CMP0203 for compatibility.

Fixes: #27253
2025-09-29 18:26:44 -04:00

20 lines
331 B
C

#pragma once
#ifdef MUST_HAVE_DEFINE
# ifndef _WINDLL
# error "_WINDLL is not defined, but it should be"
# endif
# if _WINDLL != 1
# error "_WINDLL is not defined as 1, but it should be"
# endif
#else
# ifdef _WINDLL
# error "_WINDLL is defined, but it should not be"
# endif
#endif
int FUNCTION()
{
return 0;
}