set(CMAKE_UNITY_BUILD ON) set(CMAKE_UNITY_BUILD_BATCH_SIZE 1) add_executable(main main.cpp some_source_file_1.cpp)