mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Make cmake's check_const_exists() rely on cache
This commit is contained in:
parent
878bb2d3b9
commit
4c61a04cd5
@ -1,6 +1,7 @@
|
|||||||
include(CheckCSourceCompiles)
|
include(CheckCSourceCompiles)
|
||||||
|
|
||||||
macro(check_const_exists CONST FILES VARIABLE)
|
macro(check_const_exists CONST FILES VARIABLE)
|
||||||
|
if (NOT DEFINED ${VARIABLE})
|
||||||
set(check_const_exists_source "")
|
set(check_const_exists_source "")
|
||||||
foreach(file ${FILES})
|
foreach(file ${FILES})
|
||||||
set(check_const_exists_source
|
set(check_const_exists_source
|
||||||
@ -20,4 +21,5 @@ macro(check_const_exists CONST FILES VARIABLE)
|
|||||||
set(${VARIABLE} 0 CACHE INTERNAL "Have const ${CONST}")
|
set(${VARIABLE} 0 CACHE INTERNAL "Have const ${CONST}")
|
||||||
message(STATUS "Looking for ${CONST} - not found")
|
message(STATUS "Looking for ${CONST} - not found")
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
endmacro(check_const_exists)
|
endmacro(check_const_exists)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user