Feature #880

Use PCH under Linux with CMake

Added by kervala almost 9 years ago. Updated over 8 years ago.

Status:Closed Start date:05/11/2010
Priority:Normal Due date:
Assignee:kervala % Done:

100%

Category:Build
Target version:Version 0.8.0

Description

PCH are really usefull when compiling huge projects as NeL and Ryzom Core.

We should enable them for compiling under Linux with GCC.

History

#1 Updated by rti almost 9 years ago

Once I created such a setup. It looked something like this:

MACRO(GCC_SETUP_PCH)
  MESSAGE("creating pch.")
  EXEC_PROGRAM(${CMAKE_CXX_COMPILER} 
    ARGS /path/to/file/containing/includes.h -g -o pch.h.gch
      ${FOO_DEFINITIONS}
      -I${SOME_INCLUDE_DIRS} 
      -I${OTHER_INCLUDE_DIR} 
    OUTPUT_VARIABLE CMAKE_C_COMPILER_BUILD_PCH_OUTPUT)
  MESSAGE("${CMAKE_C_COMPILER_BUILD_PCH_OUTPUT}")
ENDMACRO(GCC_SETUP_PCH)

Might be a starting point.

#2 Updated by sfb almost 9 years ago

  • Assignee set to sfb

Thanks rti! I think I can make that work for NeL/Ryzom.

#3 Updated by vl almost 9 years ago

  • Target version set to Version 0.8.0

#4 Updated by kervala over 8 years ago

  • Status changed from New to Assigned
  • Assignee changed from sfb to kervala

#5 Updated by kervala over 8 years ago

  • % Done changed from 0 to 30

Done for NeL libs.

Needs to be done :

  • NeL tools
  • Ryzom client, servers and tools

#6 Updated by kervala over 8 years ago

Without PCH activated :

  • i386 build of ryzom 0.7.0-r394~lucid0 in ubuntu lucid RELEASE

Build started on 2010-06-22 on nannyberry (virtual) and finished on 2010-06-22 taking 34 minutes

  • amd64 build of ryzom 0.6.0-r317~lucid1 in ubuntu lucid RELEASE

Build started on 2010-06-11 on americium (virtual) and finished on 2010-06-11 taking 46 minutes

With PCH activated :

  • i386 build of nel 0.7.0-r404~lucid1 in ubuntu lucid RELEASE

Build started 9 hours ago on nannyberry (virtual) and finished 8 hours ago taking 23 minutes

  • amd64 build of nel 0.7.0-r404~lucid1 in ubuntu lucid RELEASE

Build started 9 hours ago on americium (virtual) and finished 9 hours ago taking 29 minutes

#7 Updated by kervala over 8 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 30 to 100

#8 Updated by kervala over 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF