mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
build: remove code for cmake < 2.6
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
acedf9eb70
commit
ffd981a645
1 changed files with 4 additions and 17 deletions
|
@ -251,24 +251,11 @@ if(GENERATE_LUADOC)
|
||||||
|
|
||||||
# {{{ setup a command for ${capi_lua}
|
# {{{ setup a command for ${capi_lua}
|
||||||
macro(a_file_match infile regex result_var)
|
macro(a_file_match infile regex result_var)
|
||||||
if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 6)
|
file(STRINGS ${infile} match REGEX ${regex} LIMIT_COUNT 1)
|
||||||
# cmake < 2.6 doesn't know FILE(STRINGS ...)
|
if(match)
|
||||||
execute_process(
|
set(${result_var} TRUE)
|
||||||
COMMAND ${GREP_EXECUTABLE} -l ${regex} ${infile}
|
|
||||||
RESULT_VARIABLE exit_code
|
|
||||||
OUTPUT_QUIET)
|
|
||||||
if(exit_code EQUAL 0)
|
|
||||||
set(${result_var} TRUE)
|
|
||||||
else()
|
|
||||||
set(${result_var} FALSE)
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
file(STRINGS ${infile} match REGEX ${regex} LIMIT_COUNT 1)
|
set(${result_var} FALSE)
|
||||||
if(match)
|
|
||||||
set(${result_var} TRUE)
|
|
||||||
else()
|
|
||||||
set(${result_var} FALSE)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue