File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -297,14 +297,16 @@ endfunction()
297
297
# glslang_pch() adds precompiled header rules to <target> for the pre-compiled
298
298
# header file <pch>. As target_precompile_headers() was added in CMake 3.16,
299
299
# this is a no-op if called on earlier versions of CMake.
300
- if (NOT CMAKE_VERSION VERSION_LESS "3.16" )
300
+ if (NOT CMAKE_VERSION VERSION_LESS "3.16" AND ENABLE_PCH )
301
301
function (glslang_pch target pch )
302
302
target_precompile_headers (${target} PRIVATE ${pch} )
303
303
endfunction ()
304
304
else ()
305
305
function (glslang_pch target pch )
306
306
endfunction ()
307
- message ("Your CMake version is ${CMAKE_VERSION} . Update to at least 3.16 to enable precompiled headers to speed up incremental builds" )
307
+ if (ENABLE_PCH )
308
+ message ("Your CMake version is ${CMAKE_VERSION} . Update to at least 3.16 to enable precompiled headers to speed up incremental builds" )
309
+ endif ()
308
310
endif ()
309
311
310
312
if (BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /External )
You can’t perform that action at this time.
0 commit comments