mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
[cmake] fix CheckAndSetFlag
Actually add the flags provided and not discard them.
This commit is contained in:
parent
c375ed6cb1
commit
46bcc2bea3
@ -1,8 +1,12 @@
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
macro(RemoveFlag FLAG)
|
||||
string(REPLACE "${FLAG}" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
string(REPLACE "${FLAG}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
endmacro()
|
||||
|
||||
macro(CheckAndSetFlag FLAG)
|
||||
if(FLAG)
|
||||
get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||
|
||||
unset(C_FLAG)
|
||||
@ -24,5 +28,4 @@ macro(CheckAndSetFlag FLAG)
|
||||
if(NOT C_FLAG AND NOT CXX_FLAG)
|
||||
message(WARNING "compiler does not support ${FLAG}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
@ -4,8 +4,8 @@ option(EXPORT_ALL_SYMBOLS "Export all symbols form library" OFF)
|
||||
|
||||
if(EXPORT_ALL_SYMBOLS)
|
||||
add_compile_definitions(EXPORT_ALL_SYMBOLS)
|
||||
removeflag(-fvisibility=hidden)
|
||||
else()
|
||||
message(STATUS "${} default symbol visibility: hidden")
|
||||
|
||||
checkandsetflag(-fvisibility=hidden)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user