Author: akhaldi
Date: Sun Sep 19 00:15:45 2010
New Revision: 48808
URL:
http://svn.reactos.org/svn/reactos?rev=48808&view=rev
Log:
[CMAKE]
- *cough* Separate compiler specific flags.
Added:
branches/cmake-bringup/gcc.cmake
branches/cmake-bringup/msc.cmake
Modified:
branches/cmake-bringup/CMakeLists.txt
Modified: branches/cmake-bringup/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeLists.txt?re…
==============================================================================
--- branches/cmake-bringup/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/CMakeLists.txt [iso-8859-1] Sun Sep 19 00:15:45 2010
@@ -19,6 +19,7 @@
include_directories(${REACTOS_SOURCE_DIR}/tools/unicode)
include_directories(include)
+include_directories(include/host)
include_directories(include/reactos)
include_directories(include/reactos/wine)
include_directories(${REACTOS_BINARY_DIR}/include)
@@ -30,10 +31,11 @@
else()
-# Linking
-link_directories("${REACTOS_SOURCE_DIR}/importlibs"
${REACTOS_BINARY_DIR}/lib/3rdparty/mingw)
-set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS>
<CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>
<LINK_LIBRARIES>")
-set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base
-Wl,--kill-at -Wl,-T,${REACTOS_SOURCE_DIR}/global.lds")
+if(MSVC)
+include(msc.cmake)
+else()
+include(gcc.cmake)
+endif(MSVC)
# Activate support for assembly source files
enable_language(ASM)
@@ -69,25 +71,6 @@
add_definitions(-DUSE_COMPILER_EXCEPTIONS)
add_definitions(-D_USE_32BIT_TIME_T)
-# Compiler Core
-add_definitions(-pipe -fms-extensions)
-set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER>
<CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
-
-# Debugging (Note: DWARF-4 on 4.5.1 when we ship)
-add_definitions(-gdwarf-2 -g2 -femit-struct-debug-detailed=none
-feliminate-unused-debug-types)
-
-# Tuning
-add_definitions(-march=pentium -mtune=i686)
-
-# Warnings
-add_definitions(-Wall -Wno-char-subscripts -Wpointer-arith -Wno-multichar
-Wno-error=uninitialized -Wno-unused-value -Winvalid-pch)
-
-# Optimizations
-add_definitions(-Os -fno-strict-aliasing -ftracer -momit-leaf-frame-pointer
-mpreferred-stack-boundary=2 -fno-set-stack-executable -fno-optimize-sibling-calls)
-
-# C++ Flags
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
-
include_directories(include)
include_directories(include/psdk)
include_directories(include/dxsdk)
@@ -96,7 +79,11 @@
include_directories(${REACTOS_BINARY_DIR}/include/psdk)
include_directories(${REACTOS_BINARY_DIR}/include/reactos)
include_directories(include/crt)
+if(MSVC)
+include_directories(include/crt/msc)
+else()
include_directories(include/crt/mingw32)
+endif(MSVC)
include_directories(include/ddk)
include_directories(include/ndk)
include_directories(include/reactos)
Added: branches/cmake-bringup/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=488…
==============================================================================
--- branches/cmake-bringup/gcc.cmake (added)
+++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Sun Sep 19 00:15:45 2010
@@ -1,0 +1,25 @@
+
+# Linking
+link_directories("${REACTOS_SOURCE_DIR}/importlibs"
${REACTOS_BINARY_DIR}/lib/3rdparty/mingw)
+set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS>
<CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>
<LINK_LIBRARIES>")
+set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base
-Wl,--kill-at -Wl,-T,${REACTOS_SOURCE_DIR}/global.lds")
+
+# Compiler Core
+add_definitions(-pipe -fms-extensions)
+
+set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER>
<CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
+
+# Debugging (Note: DWARF-4 on 4.5.1 when we ship)
+add_definitions(-gdwarf-2 -g2 -femit-struct-debug-detailed=none
-feliminate-unused-debug-types)
+
+# Tuning
+add_definitions(-march=pentium -mtune=i686)
+
+# Warnings
+add_definitions(-Wall -Wno-char-subscripts -Wpointer-arith -Wno-multichar
-Wno-error=uninitialized -Wno-unused-value -Winvalid-pch)
+
+# Optimizations
+add_definitions(-Os -fno-strict-aliasing -ftracer -momit-leaf-frame-pointer
-mpreferred-stack-boundary=2 -fno-set-stack-executable -fno-optimize-sibling-calls)
+
+# C++ Flags
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
Added: branches/cmake-bringup/msc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=488…
==============================================================================
--- branches/cmake-bringup/msc.cmake (added)
+++ branches/cmake-bringup/msc.cmake [iso-8859-1] Sun Sep 19 00:15:45 2010
@@ -1,0 +1,3 @@
+
+add_definitions(/GS- /Zl /Zi)
+add_definitions(-Dinline=__inline -D__STDC__=1)