mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Merge pull request #10777 from akallabeth/cmake-build-type
[cmake] enforce a supported build type
This commit is contained in:
@@ -32,6 +32,13 @@ FOREACH(var ${res})
|
||||
LIST(APPEND UWAC_BUILD_CONFIG_LIST "${var}=${${var}}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
set(C_FLAGS ${CMAKE_C_FLAGS})
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" CAPS_BUILD_TYPE)
|
||||
string(APPEND C_FLAGS " ${CMAKE_C_FLAGS_${CAPS_BUILD_TYPE}}")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" " " UWAC_BUILD_CONFIG "${UWAC_BUILD_CONFIG_LIST}")
|
||||
cleaning_configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/version.h)
|
||||
cleaning_configure_file(buildflags.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/buildflags.h)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef UWAC_BUILD_FLAGS_H
|
||||
#define UWAC_BUILD_FLAGS_H
|
||||
|
||||
#define UWAC_CFLAGS "${CMAKE_C_FLAGS}"
|
||||
#define UWAC_CFLAGS "${C_FLAGS}"
|
||||
#define UWAC_COMPILER_ID "${CMAKE_C_COMPILER_ID}"
|
||||
#define UWAC_COMPILER_VERSION "${CMAKE_C_COMPILER_VERSION}"
|
||||
#define UWAC_TARGET_ARCH "${TARGET_ARCH}"
|
||||
|
||||
Reference in New Issue
Block a user