Open nathanshauer opened 2 years ago
I am running MacOS Monterey and all tests passed. I noted I needed to build all the targets before running the BuildTest?
I am running MacOS Monterey and all tests passed. I noted I needed to build all the targets before running the BuildTest?
I tried building all the targets once more but it didn't help. I guess the way to go is to update my mac...
TL;DR at the end. In my Mac (Big Sur 11.6.1), three unit tests crash if running them in Xcode with MKL. These crashes do not happen if PZ is compiled with Makefiles. The tests that fail are:
Here is the crash message in TestReduced. This happens the first time an MKL pardiso call is made.
Then, I started wondering why can't MKL be seen by the unit test library? Motivated by the following article: CMake: Public VS Private VS Interface
I thought that the problem could be related to the fact that MKL is linked to PZ via the cmake PRIVATE tag. See EnableMKL.cmake
And indeed, using the PUBLIC tag instead of PRIVATE solved the problem and all the unit tests passed successfully in Xcode.
However, this seems like overkill since we don't need every library that links with PZ to also link with MKL. Additionally, it seems especially weird since things work fine compiling with Makefile instead of Xcode.
Does anyone with a mac also have this issue?
I guess the lazy man solution would be to put, in cmake, an if(Xcode) {link PUBLIC} else {link PRIVATE}
TL;DR: