[ros-diffs] [tkreuzer] 49705: [CMAKE] No precompiled headers for MSVC atm

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Mon Nov 22 12:25:26 UTC 2010


Author: tkreuzer
Date: Mon Nov 22 12:25:25 2010
New Revision: 49705

URL: http://svn.reactos.org/svn/reactos?rev=49705&view=rev
Log:
[CMAKE]
No precompiled headers for MSVC atm

Modified:
    branches/cmake-bringup/CMakeMacros.cmake
    branches/cmake-bringup/gcc.cmake
    branches/cmake-bringup/msc.cmake

Modified: branches/cmake-bringup/CMakeMacros.cmake
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeMacros.cmake?rev=49705&r1=49704&r2=49705&view=diff
==============================================================================
--- branches/cmake-bringup/CMakeMacros.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/CMakeMacros.cmake [iso-8859-1] Mon Nov 22 12:25:25 2010
@@ -1,31 +1,4 @@
 
-MACRO(_PCH_GET_COMPILE_FLAGS _target_name _out_compile_flags _header_filename)
-
-    # Add the precompiled header to the build
-    get_filename_component(FILE ${_header_filename} NAME)
-    set(_gch_filename "${_target_name}_${FILE}.gch")
-    list(APPEND ${_out_compile_flags} -c ${_header_filename} -o ${_gch_filename})
-
-    # This gets us our includes
-    get_directory_property(DIRINC INCLUDE_DIRECTORIES)
-    foreach(item ${DIRINC})
-        list(APPEND ${_out_compile_flags} -I${item})
-    endforeach(item) 
-
-    # This is a particular bit of undocumented/hacky magic I'm quite proud of
-    get_directory_property(_compiler_flags DEFINITIONS)
-    string(REPLACE "\ " "\t" _compiler_flags ${_compiler_flags})
-    list(APPEND ${_out_compile_flags} ${_compiler_flags})
-
-    # This gets any specific definitions that were added with set-target-property
-    get_target_property(_target_defs ${_target_name} COMPILE_DEFINITIONS)
-    if (_target_defs)
-        foreach(item ${_target_defs})
-            list(APPEND ${_out_compile_flags} -D${item})
-        endforeach(item)
-    endif()
-
-ENDMACRO(_PCH_GET_COMPILE_FLAGS) 
 
 if (NOT MSVC)
 MACRO(CreateBootSectorTarget _target_name _asm_file _object_file)

Modified: branches/cmake-bringup/gcc.cmake
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=49705&r1=49704&r2=49705&view=diff
==============================================================================
--- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Mon Nov 22 12:25:25 2010
@@ -33,6 +33,32 @@
 add_definitions(-Os -fno-strict-aliasing -ftracer -momit-leaf-frame-pointer -mpreferred-stack-boundary=2 -fno-set-stack-executable -fno-optimize-sibling-calls)
 
 # Macros
+MACRO(_PCH_GET_COMPILE_FLAGS _target_name _out_compile_flags _header_filename)
+    # Add the precompiled header to the build
+    get_filename_component(FILE ${_header_filename} NAME)
+    set(_gch_filename "${_target_name}_${FILE}.gch")
+    list(APPEND ${_out_compile_flags} -c ${_header_filename} -o ${_gch_filename})
+
+    # This gets us our includes
+    get_directory_property(DIRINC INCLUDE_DIRECTORIES)
+    foreach(item ${DIRINC})
+        list(APPEND ${_out_compile_flags} -I${item})
+    endforeach(item) 
+
+    # This is a particular bit of undocumented/hacky magic I'm quite proud of
+    get_directory_property(_compiler_flags DEFINITIONS)
+    string(REPLACE "\ " "\t" _compiler_flags ${_compiler_flags})
+    list(APPEND ${_out_compile_flags} ${_compiler_flags})
+
+    # This gets any specific definitions that were added with set-target-property
+    get_target_property(_target_defs ${_target_name} COMPILE_DEFINITIONS)
+    if (_target_defs)
+        foreach(item ${_target_defs})
+            list(APPEND ${_out_compile_flags} -D${item})
+        endforeach(item)
+    endif()
+ENDMACRO(_PCH_GET_COMPILE_FLAGS) 
+
 MACRO(add_pch _target_name _header_filename _src_list)
     get_filename_component(FILE ${_header_filename} NAME)
     set(_gch_filename "${_target_name}_${FILE}.gch")

Modified: branches/cmake-bringup/msc.cmake
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=49705&r1=49704&r2=49705&view=diff
==============================================================================
--- branches/cmake-bringup/msc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/msc.cmake [iso-8859-1] Mon Nov 22 12:25:25 2010
@@ -26,12 +26,9 @@
 MACRO(add_pch _target_name _header_filename _src_list)
     get_filename_component(FILE ${_header_filename} NAME)
     set(_gch_filename "${_target_name}_${FILE}.gch")
-    list(APPEND ${_src_list} ${_gch_filename})
-    _PCH_GET_COMPILE_FLAGS(${_target_name} _args ${_header_filename})
-    file(REMOVE ${_gch_filename})
     add_custom_command(
         OUTPUT ${_gch_filename}
-        COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} ${_args}
+        COMMAND echo Ignoring precompiled header
         DEPENDS ${_header_filename})
 ENDMACRO(add_pch _target_name _header_filename _src_list)
 




More information about the Ros-diffs mailing list