cotire
cotire copied to clipboard
unity target fails to build with custom prefix header and excluded source file
The unity target for the game executable fails to build but the original target succeeds (cotire 1.7.6):
#CMakeLists.txt
cmake_minimum_required(VERSION 2.8.12)
project(game)
include(cotire.cmake)
add_executable(${PROJECT_NAME} a.cc b.cc c.cc pch.h)
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "pch.h")
set_source_files_properties(b.cc PROPERTIES COTIRE_EXCLUDED TRUE)
cotire(${PROJECT_NAME})
//pch.h
#pragma once
#include <vector>
//a.cc
int main() { return 5; }
//b.cc
void b() { std::vector<int> b; }
//c.cc
void c() { std::vector<int> c; }
This is a follow-up issue of #68 and I hope it would be easy to fix - to just use the precompiled header for the excluded from unity files too.