Skip to content

Commit 9afb4e5

Browse files
committed
Use CMAKE_BUILD_TYPE=Release per default also on Windows...
for single-config generators like Ninja
1 parent 6c744ab commit 9afb4e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/openvkl_macros.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ endmacro()
3838

3939
macro(openvkl_configure_build_type)
4040
set(CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo")
41+
if(NOT CMAKE_BUILD_TYPE)
42+
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the build type." FORCE)
43+
endif()
4144
if (WIN32)
4245
if (NOT OPENVKL_DEFAULT_CMAKE_CONFIGURATION_TYPES_SET)
4346
set(CMAKE_CONFIGURATION_TYPES "${CONFIGURATION_TYPES}"
@@ -46,9 +49,6 @@ macro(openvkl_configure_build_type)
4649
CACHE INTERNAL "Default CMake configuration types set.")
4750
endif()
4851
else()
49-
if(NOT CMAKE_BUILD_TYPE)
50-
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the build type." FORCE)
51-
endif()
5252
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CONFIGURATION_TYPES})
5353
endif()
5454
endmacro()

0 commit comments

Comments
 (0)