forked from Mirrors/openclonk
Fix gcc precompiled headers
parent
e230c90e0b
commit
f04d1163b1
|
@ -1246,20 +1246,6 @@ foreach(FLAG ${OC_EXE_LINKER_FLAGS_DEBUG})
|
|||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${FLAG}" CACHE STRING "Flags used by the linker during debug builds." FORCE)
|
||||
endforeach()
|
||||
|
||||
############################################################################
|
||||
# Precompiled header support, gcc part (it needs the cxx flags)
|
||||
############################################################################
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
include(GccPchSupport)
|
||||
option(USE_GCC_PCH "Use GCC precompiled headers" ON)
|
||||
endif()
|
||||
if(USE_GCC_PCH)
|
||||
add_precompiled_header(libmisc src/C4Include.h)
|
||||
add_precompiled_header(libc4script src/C4Include.h)
|
||||
add_precompiled_header(openclonk src/C4Include.h)
|
||||
endif()
|
||||
|
||||
############################################################################
|
||||
# Some Xcode/OSX specific settings involving building with clang, precompiled headers...
|
||||
############################################################################
|
||||
|
@ -1445,6 +1431,20 @@ if(MSVC_VERSION EQUAL 1600)
|
|||
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln" "\n# reload me\n")
|
||||
endif()
|
||||
|
||||
############################################################################
|
||||
# Precompiled header support, gcc part (it needs the cxx flags)
|
||||
############################################################################
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
include(GccPchSupport)
|
||||
option(USE_GCC_PCH "Use GCC precompiled headers" ON)
|
||||
endif()
|
||||
if(USE_GCC_PCH)
|
||||
add_precompiled_header(libmisc src/C4Include.h)
|
||||
add_precompiled_header(libc4script src/C4Include.h)
|
||||
add_precompiled_header(openclonk src/C4Include.h)
|
||||
endif()
|
||||
|
||||
############################################################################
|
||||
# installation
|
||||
############################################################################
|
||||
|
|
Loading…
Reference in New Issue