Hello,
I am doing a build+install of Sundials on a Windows-11 machine, and see something concerning in the cmake support files. It looks as though my request for a "Release" build gets turned into one for a "Debug" build. I don't see a similar problem on my Mac.
Details below.
Thanks in advance,
-Dave
Build-install steps
===============
I run the cmake "configure" step, requesting a "Release" version, as follows (only breaking up the command into lines for readability):
> cmake
-S .\sundials_downloads\sundials-7.5.0\
-B experiment_bld_auto
-D CMAKE_BUILD_TYPE=Release
-D CMAKE_INSTALL_PREFIX=experiment_install_auto
The cmake output that follows confirms the request for "Release" build:
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version ...
...
-- Building SUNDIALS in 'Release' mode.
-- Looking for sys/types.h
...
Then I build:
> cmake --build .\experiment_bld_auto\
And install:
> cmake --build .\experiment_bld_auto\ --target install
Signs something is wrong
====================
Now comes the curious / concerning part. In the just-installed
experiment_bld_auto\lib\cmake\sundials, I find a file
`SUNDIALSTargets-debug.cmake`
rather than the expected
`SUNDIALSTargets-release.cmake`
Looking in that file confirms that it thinks it's doing a "Debug" configuration. For example, line 8 has:
# Import target "SUNDIALS::core_static" for configuration "Debug"
I have been doing all this on a Mac for a while now, with no
problems -- i.e., I get "release" in the file name, and "Release" in the file comments.
In the build directory, I find subdirectories named "Debug", but none named "Release" (e.g., at `experiment_bld_auto\bin\Debug`). So it looks like things go south right from the start.
If I build with `--verbose`, the compiler flags look like a Debug build. For example, I see `/Od` (disable optimization), but no optimization flags (like `/O2` or `/Ot`).