forked from arrayfire/arrayfire
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAFBuildConfigurations.cmake
More file actions
24 lines (23 loc) · 953 Bytes
/
AFBuildConfigurations.cmake
File metadata and controls
24 lines (23 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# CMake 3.9 or later provides a global property to whether we are multi-config
# or single-config generator. Before 3.9, the defintion of CMAKE_CONFIGURATION_TYPES
# variable indicated multi-config, but developers might modify.
if(NOT CMAKE_VERSION VERSION_LESS 3.9)
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
elseif(CMAKE_CONFIGURATION_TYPES)
# CMAKE_CONFIGURATION_TYPES is set by project() call for multi-config generators
set(_isMultiConfig True)
else()
set(_isMultiConfig False)
endif()
if(_isMultiConfig)
set(CMAKE_CONFIGURATION_TYPES
"Coverage;Debug;MinSizeRel;Release;RelWithDebInfo"
CACHE STRING "Configurations for Multi-Config CMake Generator" FORCE)
else()
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE)
endif()
set_property(CACHE CMAKE_BUILD_TYPE
PROPERTY
STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "Coverage")
endif()