Skip to content

Commit

Permalink
[11175] Fix precompiled header defines so GCC can actually use it
Browse files Browse the repository at this point in the history
  • Loading branch information
Lynx3d committed Feb 16, 2011
1 parent 086d9e4 commit 9790bcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions cmake/FindPCHSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX)

MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)


STRING(TOUPPER ${CMAKE_BUILD_TYPE} _build_type)
STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
SET(${_out_compile_flags} ${${_flags_var_name}} )

Expand All @@ -60,10 +60,13 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
ENDFOREACH(item)

GET_DIRECTORY_PROPERTY(_directory_flags COMPILE_DEFINITIONS)
GET_DIRECTORY_PROPERTY(_directory_flags_type COMPILE_DEFINITIONS_${_build_type})
LIST(APPEND _directory_flags ${_directory_flags_type})
# MESSAGE("_directory_flags ${_directory_flags}" )

FOREACH(define ${_directory_flags})
LIST(APPEND ${_out_compile_flags} -D${define})
STRING(REPLACE "\"" "\\\"" escaped_define ${define})
LIST(APPEND ${_out_compile_flags} -D${escaped_define})
ENDFOREACH(define)
LIST(APPEND ${_out_compile_flags} ${CMAKE_CXX_FLAGS} )

Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11174"
#define REVISION_NR "11175"
#endif // __REVISION_NR_H__

0 comments on commit 9790bcd

Please sign in to comment.