Author: akhaldi
Date: Mon Feb 14 10:32:46 2011
New Revision: 50688
URL:
http://svn.reactos.org/svn/reactos?rev=50688&view=rev
Log:
[CMAKE]
- Get rid of the redundancy in setting msvc flags, and set /ZI instead of /Zi for both
host and target modules.
- Get rid of the redundancy in setting the default behaviour of the FIND_XXX() commands
between toolchain files.
Modified:
branches/cmake-bringup/CMakeLists.txt
branches/cmake-bringup/cmake/Platform/Windows-cl.cmake
branches/cmake-bringup/msc.cmake
branches/cmake-bringup/toolchain-mingw32.cmake
branches/cmake-bringup/toolchain-msvc.cmake
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] Mon Feb 14 10:32:46 2011
@@ -60,6 +60,13 @@
endif()
else()
+
+ # adjust the default behaviour of the FIND_XXX() commands:
+ # search headers and libraries in the target environment, search
+ # programs in the host environment
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# Do some cleanup
file(REMOVE
Modified: branches/cmake-bringup/cmake/Platform/Windows-cl.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/cmake/Platform/Wi…
==============================================================================
--- branches/cmake-bringup/cmake/Platform/Windows-cl.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/cmake/Platform/Windows-cl.cmake [iso-8859-1] Mon Feb 14
10:32:46 2011
@@ -194,7 +194,7 @@
ENDIF()
# default to Debug builds
-IF(MSVC_VERSION GREATER 1310)
+if(MSVC_VERSION GREATER 1310)
# for 2005 make sure the manifest is put in the dll with mt
# SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_COMMAND> -E vs_link_dll
${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
# SET(CMAKE_CXX_CREATE_SHARED_MODULE "<CMAKE_COMMAND> -E vs_link_dll
${CMAKE_CXX_CREATE_SHARED_MODULE}")
@@ -205,15 +205,15 @@
# SET(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_COMMAND> -E vs_link_exe
${CMAKE_CXX_LINK_EXECUTABLE}")
# SET(CMAKE_C_LINK_EXECUTABLE "<CMAKE_COMMAND> -E vs_link_exe
${CMAKE_C_LINK_EXECUTABLE}")
- SET(CMAKE_BUILD_TYPE_INIT Debug)
-
- IF(ENV{DDKBUILDENV} OR NOT CMAKE_CROSSCOMPILING)
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /Zi /Ob0 /Od")
- SET (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /Zi /Ob0 /Od")
- ELSE()
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /Zi /Ob0 /Od")
- SET (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /Zi /Ob0 /Od")
- ENDIF()
+ set(CMAKE_BUILD_TYPE_INIT Debug)
+
+ if(ENV{DDKBUILDENV} OR NOT CMAKE_CROSSCOMPILING)
+ set(CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /ZI /Ob0 /Od")
+ set(CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /ZI /Ob0 /Od")
+ else()
+ set(CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /ZI /Ob0 /Od")
+ set(CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /ZI /Ob0 /Od")
+ endif()
SET (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc")
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/O1 /Ob1 /D NDEBUG")
Modified: branches/cmake-bringup/msc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=506…
==============================================================================
--- branches/cmake-bringup/msc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/msc.cmake [iso-8859-1] Mon Feb 14 10:32:46 2011
@@ -13,7 +13,7 @@
endif()
endif()
-add_definitions(/X /GR- /GS- /Zl /Zi)
+add_definitions(/X /GR- /GS- /Zl)
add_definitions(-Dinline=__inline -D__STDC__=1)
if(${_MACHINE_ARCH_FLAG} MATCHES X86)
@@ -130,9 +130,6 @@
set(IS_UNICODE 1)
endmacro()
-set(CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od")
-set(CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od")
-
macro(set_rc_compiler)
# dummy, this workaround is only needed in mingw due to lack of RC support in cmake
endmacro()
Modified: branches/cmake-bringup/toolchain-mingw32.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/toolchain-mingw32…
==============================================================================
--- branches/cmake-bringup/toolchain-mingw32.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/toolchain-mingw32.cmake [iso-8859-1] Mon Feb 14 10:32:46 2011
@@ -48,10 +48,3 @@
elseif(ARCH MATCHES amd64)
set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib
-Wl,--enable-auto-image-base -Wl,--disable-auto-import")
endif()
-
-# adjust the default behaviour of the FIND_XXX() commands:
-# search headers and libraries in the target environment, search
-# programs in the host environment
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Modified: branches/cmake-bringup/toolchain-msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/toolchain-msvc.cm…
==============================================================================
--- branches/cmake-bringup/toolchain-msvc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/toolchain-msvc.cmake [iso-8859-1] Mon Feb 14 10:32:46 2011
@@ -20,12 +20,6 @@
"<CMAKE_ASM_COMPILER> /nologo /Cp /Fo<OBJECT> /c /Ta
<OBJECT>.tmp")
set(CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W1 /Zm1000")
-set(CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od")
-set(CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od")
-
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_C_STANDARD_LIBRARIES "" CACHE INTERNAL "")