Fixed Visual Studio precompiled headers
This commit is contained in:
parent
f7c1d16b38
commit
0f01d8df1c
@ -328,7 +328,7 @@ ENDMACRO(ADD_NATIVE_PRECOMPILED_HEADER)
|
||||
macro(ocv_add_precompiled_header_to_target the_target pch_header)
|
||||
if(PCHSupport_FOUND AND ENABLE_PRECOMPILED_HEADERS AND EXISTS "${pch_header}")
|
||||
if(CMAKE_GENERATOR MATCHES Visual)
|
||||
set(${the_target}_pch "${pch_header}")
|
||||
string(REGEX REPLACE "hpp$" "cpp" ${the_target}_pch "${pch_header}")
|
||||
add_native_precompiled_header(${the_target} ${pch_header})
|
||||
unset(${the_target}_pch)
|
||||
elseif(CMAKE_GENERATOR MATCHES Xcode)
|
||||
|
Loading…
x
Reference in New Issue
Block a user