mirror of
https://codeberg.org/wownero/RandomWOW
synced 2026-03-04 21:57:36 -05:00
Fixes for cmake build with visual studio (#144)
* Fixed CMake configuration for visual studio build Added proper asm source and set correct type. * Disabled stadard layout check of randomx_cache for visual studio debug Required to silence static_assert which fails on Visual Studio Debug configuation. * Fixed warning message and defines check * Removed unsupported flags for MSVC compiler * Enabled AVX2 for msvc * Fixed formatting in CmakeLists * Added generation of configuration.asm by CMake for MSVC
This commit is contained in:
@@ -61,8 +61,17 @@ struct randomx_cache {
|
||||
|
||||
//A pointer to a standard-layout struct object points to its initial member
|
||||
static_assert(std::is_standard_layout<randomx_dataset>(), "randomx_dataset must be a standard-layout struct");
|
||||
|
||||
//the following assert fails when compiling Debug in Visual Studio (JIT mode will crash in Debug)
|
||||
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && defined(_DEBUG)
|
||||
#define TO_STR(x) #x
|
||||
#define STR(x) TO_STR(x)
|
||||
#pragma message ( __FILE__ "(" STR(__LINE__) ") warning: check std::is_standard_layout<randomx_cache>() is disabled for Debug configuration. JIT mode will crash." )
|
||||
#undef STR
|
||||
#undef TO_STR
|
||||
#else
|
||||
static_assert(std::is_standard_layout<randomx_cache>(), "randomx_cache must be a standard-layout struct");
|
||||
#endif
|
||||
|
||||
namespace randomx {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user