Strange compiling error

When I compiled the SlicerHeart again using CMake. I just want a Release version.
The OPENSLL_INCLUDE_DIR was set to C:/Slicer/SlicerBuild/OpenSSL-install/Release/include
But when compiling, there is error:

8>CMake Error at C:/Slicer/SlicerBuild/Slicer-build/SlicerConfig.cmake:704 (message):
8>  Variable OPENSSL_INCLUDE_DIR defined prior calling 'find_package(Slicer)'
8>  does NOT match value used to configure Slicer.  It probably means that a
8>  different OPENSSL_INCLUDE_DIR has been used to configure this project and
8>  Slicer.
8>
8>  OPENSSL_INCLUDE_DIR=C:/Slicer/SlicerBuild/OpenSSL-install/Debug/include
8>
8>
8>  Slicer_OPENSSL_INCLUDE_DIR=C:/Slicer/SlicerBuild/OpenSSL-install/Release/include
8>Call Stack (most recent call first):
8>  C:/Slicer/SlicerBuild/Slicer-build/SlicerConfig.cmake:747 (slicer_config_set_ep)
8>  CMakeLists.txt:21 (find_package)
8>
8>
8>-- Configuring incomplete, errors occurred!

Maybe the OPENSSL_INCLUDE_DIR=C:/Slicer/SlicerBuild/OpenSSL-install/Debug/include is set automatically ??

Anyone who occurred this ?

thanks

@RafaelPalomar @jcfr may be able to help woth this I think. Thank you guys

Hello @whu. I can try to reproduce this on Linux. I’ll try 3D Slicer master branch and SlicerHeart master branch. Please, let me know if you have used any other version/commit of any of those.

Rafael.

2 Likes

Thanks.
Taht is windows platform, VS2019.

@whu, I’ve tried the latest Slicer (master branch) with the latest SlicerHeart (master branch) and I cannot reproduce this problem (Linux, though). From your last reply, it is not clear whether you are using the master branch for both Slicer and SlicerHeart. Could you give it a try and let us know if there are still problems?

1 Like

@whu Could you make sure you are configuring both Slicer and SlicerHeart specifying the same configuration (Debug, Release, …) ?

I used the debug mode under Windows using vs2019, successful.
Later I changed to Release mode, then that compiling error happened.
I am not sure that would be occured again.

Later I changed to Release mode, then that compiling error happened.

If this was not a clean build, it likely explained the issue. Toggling between built type on windows is not tested or supported.