How to use generator expression in target_sources?

Sorry this is a bit basic but how do I use a generator expression in target_sources, to conditionally add some source files?

Here is what I need to do:

option(extras "some help" "${extras_default}")

target_sources(${_lib_name}
    PRIVATE
        file1.cpp
        <if extras> file2.cpp
)

There is no need for generator expressions here. The simplest solution would be:

target_sources(${_lib_name}
    PRIVATE
        file1.cpp
)

if(extras)
  target_sources(${_lib_name} PRIVATE file2.cpp)
endif()

Thank you, I didn’t realise that multiple target_sources commands are allowed.