function(begin_workspace)
    set(workspace_cpp ${CMAKE_CURRENT_BINARY_DIR}/workspace.cpp)
    file(WRITE ${workspace_cpp} "// Dummy translation unit.\n")
    set_global(workspace_FILES ${workspace_cpp})
endfunction()

function(add_to_workspace first) # ...
    foreach(workspace_file ${first} ${ARGN})
        append_global(workspace_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${workspace_file})
    endforeach()
endfunction()

function(end_workspace)
    get_global(workspace_FILES)
    set_property(SOURCE ${workspace_FILES} PROPERTY HEADER_FILE_ONLY TRUE)
    folderify_sources(${workspace_FILES})
    add_library(workspace ${workspace_FILES})
    set_property(TARGET workspace PROPERTY EXCLUDE_FROM_ALL TRUE)
    set_property(TARGET workspace PROPERTY FOLDER "[ReMake]")
endfunction()
