If I do this:
set(SourceDir ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)
message("SourceDir: " ${SourceDir})
The message says that SourceDir is empty. Presumably, it is installed only in the parent area. Is there a way to set a variable in the current scope and the parent scope? So what I do not need to do:
set(SourceDir ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)
set(SourceDir ${CMAKE_CURRENT_SOURCE_DIR})
message("SourceDir: " ${SourceDir})
source
share