[sundials-users] Installing on Windows apparently changes build type

0 views
Skip to first unread message

David Lorenzetti

unread,
May 7, 2026, 12:23:30 PM (9 days ago) May 7
to SUNDIAL...@listserv.llnl.gov
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`).


To unsubscribe from the SUNDIALS-USERS list: write to: mailto:SUNDIALS-USERS-...@LISTSERV.LLNL.GOV

David Lorenzetti

unread,
May 7, 2026, 12:24:40 PM (9 days ago) May 7
to SUNDIAL...@listserv.llnl.gov
Hello,

I just realized that perhaps I need to pass the `-C` flag to the build, to ensure it runs Release.  I know this is a thing with multi-config builds (like Windows), but forgot about it.  Will try that and see if it works.

Thanks,
-Dave

David Lorenzetti

unread,
May 7, 2026, 12:27:12 PM (9 days ago) May 7
to SUNDIAL...@listserv.llnl.gov
Hello,

Yes, adding `--config Release` to my build invocation took care of myproblem.

PEBKAC.

Thanks,
-Dave
Reply all
Reply to author
Forward
0 new messages