Fix PCH for idlib when using gcc compiler on linux

This commit is contained in:
Stephen Saunders 2023-06-24 01:24:08 -04:00
parent 444b25a1e8
commit eef8e1b329

View file

@ -130,6 +130,11 @@ else()
SEPARATE_ARGUMENTS(_compiler_FLAGS)
if (USE_PRECOMPILED_HEADERS)
if(OPTICK)
LIST(APPEND _compiler_FLAGS -DUSE_OPTICK=1)
else()
LIST(APPEND _compiler_FLAGS -DUSE_OPTICK=0)
endif()
add_custom_target(precomp_header_idlib ALL
COMMAND ${CMAKE_CXX_COMPILER} ${_compiler_FLAGS} -x c++-header precompiled.h -o precompiled.h.gch
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}