mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 21:45:40 +01:00
cmake: move options to the top
This commit is contained in:
parent
1780f89ecf
commit
0b4e2ac6f5
@ -1,6 +1,16 @@
|
|||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
project("mbed TLS" C)
|
project("mbed TLS" C)
|
||||||
|
|
||||||
|
option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF)
|
||||||
|
option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF)
|
||||||
|
|
||||||
|
option(ENABLE_PROGRAMS "Build mbed TLS programs." ON)
|
||||||
|
option(ENABLE_TESTING "Build mbed TLS tests." ON)
|
||||||
|
|
||||||
|
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}
|
||||||
|
CACHE STRING "Choose the type of build: None Debug Release Coverage ASan ASanDbg MemSan MemSanDbg Check CheckFull"
|
||||||
|
FORCE)
|
||||||
|
|
||||||
string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}")
|
string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}")
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
@ -30,23 +40,12 @@ if(MSVC)
|
|||||||
set(CMAKE_C_FLAGS_CHECK "/WX")
|
set(CMAKE_C_FLAGS_CHECK "/WX")
|
||||||
endif(MSVC)
|
endif(MSVC)
|
||||||
|
|
||||||
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}
|
|
||||||
CACHE STRING "Choose the type of build: None Debug Release Coverage ASan ASanDbg MemSan MemSanDbg Check CheckFull"
|
|
||||||
FORCE)
|
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
||||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
|
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "--coverage")
|
set(CMAKE_SHARED_LINKER_FLAGS "--coverage")
|
||||||
endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
|
endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
|
||||||
endif(CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
endif(CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
||||||
|
|
||||||
option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF)
|
|
||||||
|
|
||||||
option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF)
|
|
||||||
option(ENABLE_PROGRAMS "Build mbed TLS programs." ON)
|
|
||||||
|
|
||||||
option(ENABLE_TESTING "Build mbed TLS tests." ON)
|
|
||||||
|
|
||||||
if(LIB_INSTALL_DIR)
|
if(LIB_INSTALL_DIR)
|
||||||
else()
|
else()
|
||||||
set(LIB_INSTALL_DIR lib)
|
set(LIB_INSTALL_DIR lib)
|
||||||
|
Loading…
Reference in New Issue
Block a user