Update CMakeLists.txt

This commit is contained in:
Martin Kroeker 2016-11-05 12:47:15 +01:00 committed by GitHub
parent 084e4573c1
commit cebcca9987
1 changed files with 14 additions and 6 deletions

View File

@ -30,15 +30,23 @@ set(NO_LAPACK 1)
set(NO_LAPACKE 1)
endif()
if( NOT CMAKE_BUILD_TYPE )
if(CMAKE_CONFIGURATION_TYPES) # multiconfig generator?
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
set(OpenBLAS_LIBNAME
$<$<CONFIG:Debug>:"${OpenBLAS_LIBNAME}_d">
$<$<CONFIG:Release>:"${OpenBLAS_LIBNAME}">
)
else()
if( NOT CMAKE_BUILD_TYPE )
if(BUILD_DEBUG)
set(CMAKE_BUILD_TYPE Debug)
else()
set(CMAKE_BUILD_TYPE Release)
endif()
endif()
endif()
if (CMAKE_BUILD_TYPE = Debug)
if (CMAKE_BUILD_TYPE STREQUAL Debug)
set(OpenBLAS_LIBNAME "${OpenBLAS_LIBNAME}_d")
endif()