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.
This commit is contained in:
parent
ed704caede
commit
cf169531fb
1 changed files with 1 additions and 10 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue