Author: sir_richard
Date: Tue Jul 27 17:36:25 2010
New Revision: 48316
URL: http://svn.reactos.org/svn/reactos?rev=48316&view=rev
Log:
[CMAKE]: Fix compiler detection, we should check for CMAKE_HOST_SYSTEM_NAME, not CMAKE_SYSTEM_NAME, which is always Windows on a cross-build.
[CMAKE]: PROCESSIR->PROCESSOR
Modified:
branches/cmake-bringup/toolchain-mingw32.cmake
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] Tue Jul 27 17:36:25 2010
@@ -1,5 +1,5 @@
# Choose the right MinGW prefix
-if (CMAKE_SYSTEM_NAME STREQUAL Windows)
+if (CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
set(MINGW_PREFIX "")
else()
set(MINGW_PREFIX "mingw32-")
@@ -7,7 +7,7 @@
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)
-SET(CMAKE_SYSTEM_PROCESSIR i686)
+SET(CMAKE_SYSTEM_PROCESSOR i686)
# which compilers to use for C and C++
SET(CMAKE_C_COMPILER ${MINGW_PREFIX}gcc)
Author: sir_richard
Date: Tue Jul 27 16:07:39 2010
New Revision: 48311
URL: http://svn.reactos.org/svn/reactos?rev=48311&view=rev
Log:
[CMAKE]: Watch and learn, Amine...
Modified:
branches/cmake-bringup/lib/nls/idna/CMakeLists.txt
branches/cmake-bringup/lib/nls/normalize/CMakeLists.txt
branches/cmake-bringup/lib/nls/scripts/CMakeLists.txt
Modified: branches/cmake-bringup/lib/nls/idna/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/nls/idna/CMak…
==============================================================================
--- branches/cmake-bringup/lib/nls/idna/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/nls/idna/CMakeLists.txt [iso-8859-1] Tue Jul 27 16:07:39 2010
@@ -1,7 +1,12 @@
include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/icu4ros/icu/source/common)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -UWINVER -DWINVER=0x600 -fno-exceptions -fno-rtti")
+# Special C++ flags
+add_definitions(-fno-exceptions -fno-rtti)
+
+# Re-definition of WINVER
+remove_definitions(-DWINVER=0x502) # This removes a top-level definition: The compiler never gets it on the command-line
+add_definitions(-DWINVER=0x600) # And now we add our own
file(GLOB_RECURSE SOURCE "*.cpp")
Modified: branches/cmake-bringup/lib/nls/normalize/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/nls/normalize…
==============================================================================
--- branches/cmake-bringup/lib/nls/normalize/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/nls/normalize/CMakeLists.txt [iso-8859-1] Tue Jul 27 16:07:39 2010
@@ -1,7 +1,12 @@
include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/icu4ros/icu/source/common)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -UWINVER -DWINVER=0x600 -fno-exceptions -fno-rtti")
+# Special C++ flags
+add_definitions(-fno-exceptions -fno-rtti)
+
+# Re-definition of WINVER
+remove_definitions(-DWINVER=0x502) # This removes a top-level definition: The compiler never gets it on the command-line
+add_definitions(-DWINVER=0x600) # And now we add our own
file(GLOB_RECURSE SOURCE "*.cpp")
Modified: branches/cmake-bringup/lib/nls/scripts/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/nls/scripts/C…
==============================================================================
--- branches/cmake-bringup/lib/nls/scripts/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/nls/scripts/CMakeLists.txt [iso-8859-1] Tue Jul 27 16:07:39 2010
@@ -1,7 +1,12 @@
include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/icu4ros/icu/source/common)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -UWINVER -DWINVER=0x600 -fno-exceptions -fno-rtti")
+# Special C++ flags
+add_definitions(-fno-exceptions -fno-rtti)
+
+# Re-definition of WINVER
+remove_definitions(-DWINVER=0x502) # This removes a top-level definition: The compiler never gets it on the command-line
+add_definitions(-DWINVER=0x600) # And now we add our own
file(GLOB_RECURSE SOURCE "*.cpp")
Author: sir_richard
Date: Tue Jul 27 16:00:40 2010
New Revision: 48309
URL: http://svn.reactos.org/svn/reactos?rev=48309&view=rev
Log:
[CMAKE]: Detect correct MinGW compiler on Windows vs Linux/Darwin.
Modified:
branches/cmake-bringup/toolchain-mingw32.cmake
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] Tue Jul 27 16:00:40 2010
@@ -1,12 +1,17 @@
+# Choose the right MinGW prefix
+if (CMAKE_SYSTEM_NAME STREQUAL Windows)
+set(MINGW_PREFIX "")
+else()
+set(MINGW_PREFIX "mingw32-")
+endif()
+
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)
+SET(CMAKE_SYSTEM_PROCESSIR i686)
# which compilers to use for C and C++
-SET(CMAKE_C_COMPILER mingw32-gcc)
-SET(CMAKE_CXX_COMPILER mingw32-g++)
-
-# here is the target environment located
-#SET(CMAKE_FIND_ROOT_PATH /usr/local/RosBE )
+SET(CMAKE_C_COMPILER ${MINGW_PREFIX}gcc)
+SET(CMAKE_CXX_COMPILER ${MINGW_PREFIX}g++)
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search