(cmake): check CMAKE_BUILD_TYPE value
What does this MR do?
- on Windows, if the user doesn't specify a value for 'CMAKE_BUILD_TYPE', it's automatically initialized to 'Debug' after 'project()' cmake command.
- it's annoying because if we wanted to build in release, we have to clean the cmake cache and define
CMAKE_BUILD_TYPE
toRelease
(just redefiningCMAKE_BUILD_TYPE
isn't enough and is "dangerous") - so now, we check
CMAKE_BUILD_TYPE
before cmake command 'project()', and if the user forgets to defineCMAKE_BUILD_TYPE
before configuring, configuration is stopped and display an error message
How to test it?
- make a cmake configure of
Sight
without specifying a value forCMAKE_BUILD_TYPE
- configuration is stopped and display an error message
Data
No required data
Additional tests to run
(If you need some specific test e.g Windows compilation...)
-
Build on Windows -
Build on Linux -
Build on macOS
Associated issue
Closes #335 (closed)