From cf169531fb50fbb1bd2f09123473076e1dc0990e Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Tue, 4 Sep 2018 13:55:16 +0200 Subject: [PATCH] CMake: Do not add dummy.cpp to libraries Cotire does not need it for PCH creation, the PCH will be created when compiling the first source file. --- build/cmake/functions.cmake | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/build/cmake/functions.cmake b/build/cmake/functions.cmake index 8d4dc94511..00e3ed09e1 100644 --- a/build/cmake/functions.cmake +++ b/build/cmake/functions.cmake @@ -282,11 +282,6 @@ macro(wx_add_library name) # collect all source files for mono library set(wxMONO_SRC_FILES ${wxMONO_SRC_FILES} ${src_files} PARENT_SCOPE) else() - - if(wxBUILD_PRECOMP AND MSVC) - # Add dummy source file to be used by cotire for PCH creation - list(INSERT src_files 0 "${wxSOURCE_DIR}/src/common/dummy.cpp") - endif() list(APPEND src_files ${wxSETUP_HEADER_FILE}) if(wxBUILD_SHARED) @@ -348,7 +343,7 @@ macro(wx_finalize_lib target_name) set(wxLIB_TARGETS ${wxLIB_TARGETS} PARENT_SCOPE) if(wxBUILD_PRECOMP) if(TARGET ${target_name}) - wx_target_enable_precomp(${target_name} "${wxSOURCE_DIR}/include/wx/wxprec.h") + wx_target_enable_precomp(${target_name} "${wxSOURCE_DIR}/include/wx/wxprec.h") endif() elseif(MSVC) wx_lib_compile_definitions(${target_name} PRIVATE NOPCH) @@ -765,10 +760,6 @@ function(wx_add_test name) list(APPEND test_src ${wxSOURCE_DIR}/tests/${res}) endforeach() endif() - if(wxBUILD_PRECOMP AND MSVC) - # Add dummy source file to be used by cotire for PCH creation - list(INSERT test_src 0 "${wxSOURCE_DIR}/tests/dummy.cpp") - endif() add_executable(${name} ${test_src}) target_include_directories(${name} PRIVATE "${wxSOURCE_DIR}/tests" "${wxSOURCE_DIR}/3rdparty/catch/include") wx_exe_link_libraries(${name} base)