Skip to content
Snippets Groups Projects
Commit eca375ce authored by Tobias Leibner's avatar Tobias Leibner
Browse files

[cmake] fix Hints.cmake

parent 41988594
No related branches found
No related tags found
No related merge requests found
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
# and ClangFormat_FOUND accordingly # and ClangFormat_FOUND accordingly
# ~~~ # ~~~
#include(Hints)
find_program(ClangFormat_EXECUTABLE NAMES clang-format-3.9 clang-format) find_program(ClangFormat_EXECUTABLE NAMES clang-format-3.9 clang-format)
if(EXISTS ${ClangFormat_EXECUTABLE}) if(EXISTS ${ClangFormat_EXECUTABLE})
execute_process(COMMAND ${ClangFormat_EXECUTABLE} -version OUTPUT_VARIABLE clang_out) execute_process(COMMAND ${ClangFormat_EXECUTABLE} -version OUTPUT_VARIABLE clang_out)
......
function(APPEND_TO_EACH inputlist postfix outputlist) macro(append_to_each INPUTLIST POSTFIX OUTPUTLIST)
foreach(entry inputlist) foreach(ENTRY ${INPUTLIST})
list(APPEND ${outputlist} ${entry}${postfix}) list(APPEND ${OUTPUTLIST} ${ENTRY}${POSTFIX})
endforeach(entry inputlist) endforeach(ENTRY ${INPUTLIST})
endfunction() endmacro()
set(hint_prefixes set(hint_prefixes
"${CMAKE_SOURCE_DIR}/../local/" "${CMAKE_SOURCE_DIR}/../local/"
...@@ -12,11 +12,11 @@ set(hint_prefixes ...@@ -12,11 +12,11 @@ set(hint_prefixes
"$ENV{HOME}/Software/") "$ENV{HOME}/Software/")
set(bin_hints "") set(bin_hints "")
append_to_each(hint_prefixes "bin/" bin_hints) append_to_each("${hint_prefixes}" "bin/" bin_hints)
set(lib_hints "") set(lib_hint "")
append_to_each(hint_prefixes "lib/" lib_hints) append_to_each("${hint_prefixes}" "lib/" lib_hints)
set(include_hints "") set(include_hints "")
append_to_each(hint_prefixes "include/" include_hints) append_to_each("${hint_prefixes}" "include/" include_hints)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment