openmopac / mopac

Molecular Orbital PACkage
http://openmopac.net
GNU Lesser General Public License v3.0
111 stars 31 forks source link

Fix Windows build type problem #201

Closed godotalgorithm closed 3 months ago

godotalgorithm commented 3 months ago

Windows executables are presently being built with a "Debug" build type and thus debug flags rather than optimization flags, which is slowing down the distributed Windows executables for MOPAC. This is an open PR for repairing the CMake and GHA scripts to fix this problem.

Status

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 66.75%. Comparing base (a22996f) to head (bef9537). Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #201 +/- ## ======================================= Coverage 66.75% 66.75% ======================================= Files 332 332 Lines 74082 74082 ======================================= Hits 49456 49456 Misses 24626 24626 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

godotalgorithm commented 3 months ago

The problem was that CMAKE_BUILD_TYPE was being set too late, and for whatever reason it still working on Mac and Linux even though it was technically wrong. CMAKE_BUILD_TYPE is used when the project() or enable_language() commands are used in CMake, and so it needs to be set before then.