New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build with Intel MKL include dirs. #202
Comments
Hmnmn, that is weird! If |
Can you try replacing toml++'s use of static_assert(FLT_RADIX == 2, TOML_ENV_MESSAGE); to this: static_assert(std::numeric_limits<double>::radix == 2, TOML_ENV_MESSAGE); |
If that doesn't work, you can |
Replacing the macro invocation by |
I think I'll go for some more targetted hack instead: #ifndef FLT_RADIX
#define FLT_RADIX std::numeric_limits<float>::radix
#endif .. but I just want to get rid of one confusion first: do you expect |
I'd caution against that solution; the standard specifies
Either would be fine since they should be the same, but floats in TOML++ are (at least) 64-bit so it uses |
Wop, thank you for spotting the snag! ^ ^" |
FWIW it seems that the error does not occur.. provided you opt into using Intel's proprietary compiler |
Ah, right, so I guess MKL assumes you're using that compiler and does That's... unfortunate 😅 |
Environment
toml++ version and/or commit hash:
Compiler:
C++ standard mode:
set(CMAKE_CXX_STANDARD 17)
Target arch:
$ uname -a Linux copak 6.4.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 24 Aug 2023 00:38:14 +0000 x86_64 GNU/Linux
Library configuration overrides:
none
Relevant compilation flags:
After having installed intel-oneapi-mkl:
Describe the bug
The library compiles fine, until I add the above flag (because the project otherwise uses MKL), then I get:
Steps to reproduce (or a small repro code sample)
main.cpp
CMakeLists.txt
I'm not exactly sure what the error deeply means here. FWIU the
FLT_RADIX
macro is (re-)defined withinintel/oneapi/compiler/latest/linux/compiler/include/float.h:75
to:but I'm not confident what it means or why this would result in "undeclared FLT_RADIX". I'm happy to learn more ^ ^"
The text was updated successfully, but these errors were encountered: