Author: akhaldi
Date: Tue Jun 14 15:28:16 2011
New Revision: 52228
URL:
http://svn.reactos.org/svn/reactos?rev=52228&view=rev
Log:
[CMAKE]
* Separate VS and NMake generators handling of asm source files.
Modified:
trunk/reactos/cmake/msvc.cmake
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=52228…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Tue Jun 14 15:28:16 2011
@@ -33,11 +33,19 @@
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <DEFINES>
/I${REACTOS_SOURCE_DIR}/include/psdk /I${REACTOS_BINARY_DIR}/include/psdk
/I${REACTOS_SOURCE_DIR}/include /I${REACTOS_SOURCE_DIR}/include/reactos
/I${REACTOS_BINARY_DIR}/include/reactos /I${REACTOS_SOURCE_DIR}/include/reactos/wine
/I${REACTOS_SOURCE_DIR}/include/crt /I${REACTOS_SOURCE_DIR}/include/crt/mingw32 /fo
<OBJECT> <SOURCE>")
-get_directory_property(definitions DEFINITIONS)
-
-set(CMAKE_ASM_COMPILE_OBJECT
- "<CMAKE_C_COMPILER> /nologo /X /I${REACTOS_SOURCE_DIR}/include/asm
/I${REACTOS_BINARY_DIR}/include/asm <FLAGS> ${definitions} /D__ASM__ /D_USE_ML /EP
/c <SOURCE> > <OBJECT>.tmp"
- "<CMAKE_ASM_COMPILER> /nologo /Cp /Fo<OBJECT> /c /Ta
<OBJECT>.tmp")
+if(MSVC_IDE)
+ # Asm source files are not supported in VS generators yet. As a result,
<DEFINES> isn't recognized.
+ # We may temporarily use just the global defines, but this is not a solution as some
modules (minihal for example) apply additional definitions to source files, so we get an
incorrect build of such targets.
+ get_directory_property(definitions DEFINITIONS)
+ set(CMAKE_ASM_COMPILE_OBJECT
+ "<CMAKE_C_COMPILER> /nologo /X /I${REACTOS_SOURCE_DIR}/include/asm
/I${REACTOS_BINARY_DIR}/include/asm <FLAGS> ${definitions} /D__ASM__ /D_USE_ML /EP
/c <SOURCE> > <OBJECT>.tmp"
+ "<CMAKE_ASM_COMPILER> /nologo /Cp /Fo<OBJECT> /c /Ta
<OBJECT>.tmp")
+else()
+ # NMake Makefiles
+ set(CMAKE_ASM_COMPILE_OBJECT
+ "<CMAKE_C_COMPILER> /nologo /X /I${REACTOS_SOURCE_DIR}/include/asm
/I${REACTOS_BINARY_DIR}/include/asm <FLAGS> <DEFINES> /D__ASM__ /D_USE_ML /EP
/c <SOURCE> > <OBJECT>.tmp"
+ "<CMAKE_ASM_COMPILER> /nologo /Cp /Fo<OBJECT> /c /Ta
<OBJECT>.tmp")
+endif()
set(CMAKE_RC_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY})
set(CMAKE_ASM_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY})