Author: tfaber
Date: Sun Jul 14 21:00:42 2013
New Revision: 59488
URL:
http://svn.reactos.org/svn/reactos?rev=59488&view=rev
Log:
[CMAKE]
- Add configure support for VS 2013
- Add a missing /nologo to assembler invocations
- Properly complain about old MSVC versions during configure instead of failing the build
Modified:
trunk/reactos/CMakeLists.txt
trunk/reactos/cmake/gcc.cmake
trunk/reactos/cmake/msvc.cmake
trunk/reactos/configure.cmd
Modified: trunk/reactos/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/CMakeLists.txt?rev=59488&a…
==============================================================================
--- trunk/reactos/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/CMakeLists.txt [iso-8859-1] Sun Jul 14 21:00:42 2013
@@ -92,7 +92,7 @@
endif()
# Default to Debug for the build type
- set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
+ set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
Debug Release RelWithDebInfo MinSizeRel." FORCE)
# Do some cleanup
@@ -182,36 +182,19 @@
# We're using widl now for both MSVC and GCC builds
include(cmake/widl-support.cmake)
- if(MSVC AND USE_WDK_HEADERS)
- include_directories(
- include
- $ENV{SDK_INC_PATH}
- include/dxsdk
- ${REACTOS_BINARY_DIR}/include
- ${REACTOS_BINARY_DIR}/include/dxsdk
- ${REACTOS_BINARY_DIR}/include/psdk
- ${REACTOS_BINARY_DIR}/include/reactos
- $ENV{CRT_INC_PATH}
- $ENV{DDK_INC_PATH}
- include/ndk
- include/reactos
- include/reactos/libs)
- else()
- include_directories(
- include
- include/psdk
- include/dxsdk
- ${REACTOS_BINARY_DIR}/include
- ${REACTOS_BINARY_DIR}/include/psdk
- ${REACTOS_BINARY_DIR}/include/dxsdk
- ${REACTOS_BINARY_DIR}/include/reactos
- include/crt
- include/ddk
- include/ndk
- include/reactos
- include/reactos/libs)
- endif()
-
+ include_directories(
+ include
+ include/psdk
+ include/dxsdk
+ ${REACTOS_BINARY_DIR}/include
+ ${REACTOS_BINARY_DIR}/include/psdk
+ ${REACTOS_BINARY_DIR}/include/dxsdk
+ ${REACTOS_BINARY_DIR}/include/reactos
+ include/crt
+ include/ddk
+ include/ndk
+ include/reactos
+ include/reactos/libs)
if(ARCH STREQUAL "arm")
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/arm)
@@ -232,7 +215,7 @@
add_subdirectory(include/asm)
include(cmake/baseaddress.cmake)
-
+
# For MSVC builds, this puts all debug symbols file in the same directory.
set(CMAKE_PDB_OUTPUT_DIRECTORY "${REACTOS_BINARY_DIR}/msvc_pdb")
Modified: trunk/reactos/cmake/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=59488&…
==============================================================================
--- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Sun Jul 14 21:00:42 2013
@@ -216,8 +216,8 @@
if(_module_type STREQUAL "STATIC_LIBRARY")
message(FATAL_ERROR "Cannot add delay imports to a static library")
endif()
- foreach(LIB ${ARGN})
- target_link_libraries(${_module} lib${LIB}_delayed)
+ foreach(_lib ${ARGN})
+ target_link_libraries(${_module} lib${_lib}_delayed)
endforeach()
target_link_libraries(${_module} delayimp)
endfunction()
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=59488…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Sun Jul 14 21:00:42 2013
@@ -127,15 +127,15 @@
#define those for having real libraries
set(CMAKE_IMPLIB_CREATE_STATIC_LIBRARY "LINK /LIB /NOLOGO <LINK_FLAGS>
/OUT:<TARGET> <OBJECTS>")
-set(CMAKE_STUB_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> /Cp /Fo<OBJECT>
/c /Ta <SOURCE>")
+set(CMAKE_STUB_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> /nologo /Cp
/Fo<OBJECT> /c /Ta <SOURCE>")
function(add_delay_importlibs _module)
get_target_property(_module_type ${_module} TYPE)
if(_module_type STREQUAL "STATIC_LIBRARY")
message(FATAL_ERROR "Cannot add delay imports to a static library")
endif()
- foreach(LIB ${ARGN})
- add_target_link_flags(${_module} "/DELAYLOAD:${LIB}.dll")
- target_link_libraries(${_module} lib${LIB})
+ foreach(_lib ${ARGN})
+ add_target_link_flags(${_module} "/DELAYLOAD:${_lib}.dll")
+ target_link_libraries(${_module} lib${_lib})
endforeach()
target_link_libraries(${_module} delayimp)
endfunction()
Modified: trunk/reactos/configure.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/configure.cmd?rev=59488&am…
==============================================================================
--- trunk/reactos/configure.cmd [iso-8859-1] (original)
+++ trunk/reactos/configure.cmd [iso-8859-1] Sun Jul 14 21:00:42 2013
@@ -41,27 +41,14 @@
set CMAKE_GENERATOR="Ninja"
)
-) else if defined DDK_TARGET_OS (
- echo Detected DDK/WDK for %DDK_TARGET_OS%-%_BUILDARCH%%
- set BUILD_ENVIRONMENT=WDK
- if "%_BUILDARCH%" == "x86" (
- set ARCH=i386
- ) else if "%_BUILDARCH%" == "AMD64" (
- set ARCH=amd64
- )
- set USE_VSCMD=1
- set USE_WDK_HEADERS=0
-
) else if defined VCINSTALLDIR (
:: VS command prompt does not put this in environment vars
cl 2>&1 | find "x86" > NUL && set ARCH=i386
cl 2>&1 | find "x64" > NUL && set ARCH=amd64
cl 2>&1 | find "ARM" > NUL && set ARCH=arm
- cl 2>&1 | find "14.00." > NUL && set
BUILD_ENVIRONMENT=VS8
- cl 2>&1 | find "15.00." > NUL && set
BUILD_ENVIRONMENT=VS9
cl 2>&1 | find "16.00." > NUL && set
BUILD_ENVIRONMENT=VS10
cl 2>&1 | find "17.00." > NUL && set
BUILD_ENVIRONMENT=VS11
- ::cl 2>&1 | find "18.00." > NUL && set
BUILD_ENVIRONMENT=VS12
+ cl 2>&1 | find "18.00." > NUL && set
BUILD_ENVIRONMENT=VS12
if not defined BUILD_ENVIRONMENT (
echo Error: Visual Studio version too old or version detection failed.
exit /b
@@ -69,19 +56,7 @@
echo Detected Visual Studio Environment !BUILD_ENVIRONMENT!-!ARCH!
if /I "%1" == "VSSolution" (
- if "!BUILD_ENVIRONMENT!" == "VS8" (
- if "!ARCH!" == "amd64" (
- set CMAKE_GENERATOR="Visual Studio 8 2005 Win64"
- ) else (
- set CMAKE_GENERATOR="Visual Studio 8 2005"
- )
- ) else if "!BUILD_ENVIRONMENT!" == "VS9" (
- if "!ARCH!" == "amd64" (
- set CMAKE_GENERATOR="Visual Studio 9 2008 Win64"
- ) else (
- set CMAKE_GENERATOR="Visual Studio 9 2008"
- )
- ) else if "!BUILD_ENVIRONMENT!" == "VS10" (
+ if "!BUILD_ENVIRONMENT!" == "VS10" (
if "!ARCH!" == "amd64" (
set CMAKE_GENERATOR="Visual Studio 10 Win64"
) else (
@@ -95,22 +70,19 @@
) else (
set CMAKE_GENERATOR="Visual Studio 11"
)
+ ) else if "!BUILD_ENVIRONMENT!" == "VS12" (
+ if "!ARCH!" == "amd64" (
+ set CMAKE_GENERATOR="Visual Studio 12 Win64"
+ ) else if "!ARCH!" == "arm" (
+ set CMAKE_GENERATOR="Visual Studio 12 ARM"
+ ) else (
+ set CMAKE_GENERATOR="Visual Studio 12"
+ )
)
) else (
set USE_VSCMD=1
echo This script defaults to Ninja. To use Visual Studio GUI specify
"VSSolution" as a parameter.
)
-
-) else if defined sdkdir (
- echo Detected Windows SDK %TARGET_PLATFORM%-%TARGET_CPU%
- if "%TARGET_CPU%" == "x86" (
- set ARCH=i386
- ) else if "%TARGET_CPU%" == "x64" (
- set ARCH=amd64
- )
-
- set BUILD_ENVIRONMENT=SDK
- set USE_VSCMD=1
) else (
echo Error: Unable to detect build environment. Configure script failure.
@@ -179,8 +151,6 @@
if "%BUILD_ENVIRONMENT%" == "MinGW" (
cmake -G %CMAKE_GENERATOR% -DENABLE_CCACHE=0 -DPCH=0
-DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=%ARCH%
-DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%"
"%REACTOS_SOURCE_DIR%"
-) else if "%BUILD_ENVIRONMENT%" == "WDK" (
- cmake -G %CMAKE_GENERATOR% -DCMAKE_TOOLCHAIN_FILE=toolchain-msvc.cmake
-DUSE_WDK_HEADERS=%USE_WDK_HEADERS% -DARCH=%ARCH%
-DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%"
"%REACTOS_SOURCE_DIR%"
) else (
cmake -G %CMAKE_GENERATOR% -DCMAKE_TOOLCHAIN_FILE=toolchain-msvc.cmake -DARCH=%ARCH%
-DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%"
"%REACTOS_SOURCE_DIR%"
)