cmake: fix ninja toolchain

When CMake is run with ninja as the generator, duplicate target names
are generated that cause configuration to fail. This commit fixes that
by adding a "compile_" prefix to each of the byte-compiled target names,
eliminating the naming collision.
This commit is contained in:
Brian Heim 2020-04-10 14:17:56 -05:00
parent 7b5d954003
commit a85032e5fb

View file

@ -33,7 +33,7 @@ if (SC_EL_BYTECOMPILE)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Creating byte-compiled Emacs lisp ${CMAKE_CURRENT_BINARY_DIR}/${el}c") COMMENT "Creating byte-compiled Emacs lisp ${CMAKE_CURRENT_BINARY_DIR}/${el}c")
add_custom_target(${el}c ALL add_custom_target(compile_${el}c ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${el}c) DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${el}c)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${el}c install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${el}c