Skip to content

Commit

Permalink
Correction to the condition allowing g++ only for external PRNG
Browse files Browse the repository at this point in the history
  • Loading branch information
dsuponitskiy-duality committed Oct 18, 2024
1 parent f7267f9 commit b25a307
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/examples/external-prng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

// ATTENTION: enable this example for g++ on Linux only
//==================================================================================
#if (defined(__linux__) || defined(__unix__)) && !defined(__APPLE__) && !defined(__clang__)
#if (defined(__linux__) || defined(__unix__)) && !defined(__APPLE__) && defined(__GNUC__) && !defined(__clang__)
//==================================================================================
#pragma GCC push_options
#pragma GCC optimize("O0") // Disable optimizations for this file
Expand Down
3 changes: 2 additions & 1 deletion src/core/lib/math/distributiongenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ void PseudoRandomNumberGenerator::InitPRNGEngine(const std::string& libPath) {
// std::cerr << "InitPRNGEngine: using local PRNG" << std::endl;
}
else {
#if (defined(__linux__) || defined(__unix__)) && !defined(__APPLE__) && defined(__GNUC__)
#if (defined(__linux__) || defined(__unix__)) && !defined(__APPLE__) && defined(__GNUC__) && !defined(__clang__)
// enable this code for g++ on Linux only
// do not close libraryHandle, your application will crash if you do
void* libraryHandle = dlopen(libPath.c_str(), RTLD_LAZY);
if (!libraryHandle) {
Expand Down

0 comments on commit b25a307

Please sign in to comment.