Unexpected double quoting of generator expression BUILD_INTERFACE
Hello all,
While trying to make a little "modern" CMake project, I happened to find what I believe to be a bug regarding quotes and the generator expression <BUILD_INTERFACE:...>. I use version 3.14.3 of CMake and required this exact version to be used on my project. The following code generates an error during the generation phase:
target_include_directories(Project
PUBLIC
$<BUILD_INTERFACE:"${CMAKE_CURRENT_BINARY_DIR}"> #The quotes seems to be the origin of the error
)
The following error is given:
Found relative path while evaluating include directories of "Project":
""F:/Path-to-project/Project/Build""
I think the path is deduced to be relative because of the double quoting.
I will add that the following code, on the other hand, do not generate any errors:
target_include_directories(Project
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
)