enabled PCH for macOS as well (gives small build time improvment)
This commit is contained in:
parent
80a8a7ceb6
commit
a290c96eb4
2 changed files with 3 additions and 3 deletions
|
|
@ -55,7 +55,7 @@ if(APPLE)
|
|||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10.5)
|
||||
endif()
|
||||
|
||||
set(USE_PCH FALSE CACHE BOOL "Use shared precompiled headers for MSVC")
|
||||
set(USE_PCH FALSE CACHE BOOL "Use shared precompiled headers")
|
||||
|
||||
include_directories(src contrib/eos_portable_archive contrib contrib/epee/include "${CMAKE_BINARY_DIR}/version" "${CMAKE_BINARY_DIR}/contrib/zlib")
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ MACRO(INIT_SHARED_PCH)
|
|||
set(PCH_LIB_NAME pch)
|
||||
IF(MSVC)
|
||||
set_property(SOURCE "pch/stdafx.cpp" APPEND_STRING PROPERTY COMPILE_FLAGS " /Fo$(OutDir) /Z7 /Fd$(OutDir)vc$(PlatformToolsetVersion).pdb /Ycstdafx.h /Fp$(TargetDir)pch.pch")
|
||||
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
ELSEIF(APPLE OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
target_precompile_headers(pch PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/pch/stdafx.h")
|
||||
ENDIF()
|
||||
ENDIF(USE_PCH)
|
||||
|
|
@ -33,7 +33,7 @@ MACRO(ENABLE_SHARED_PCH target sources_var)
|
|||
OBJECT_DEPENDS "${precompiled_binary}")
|
||||
endif()
|
||||
endforeach()
|
||||
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
ELSEIF(APPLE OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
MESSAGE( STATUS " ...... enabling precompiled headers for: " ${target} )
|
||||
target_precompile_headers(${target} REUSE_FROM pch)
|
||||
ENDIF()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue