Author: akhaldi
Date: Tue Jan 17 23:10:16 2012
New Revision: 54999
URL:
http://svn.reactos.org/svn/reactos?rev=54999&view=rev
Log:
* Introduce support for compilers with /analyze support in _PREFAST_ mode.
* Allow Cameron to enjoy the next revision.
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=54999…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Tue Jan 17 23:10:16 2012
@@ -63,15 +63,20 @@
endif()
if(_PREFAST_)
- message("PREFAST enabled!")
- set(CMAKE_C_COMPILE_OBJECT "prefast cl ${CMAKE_START_TEMP_FILE}
${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /Fo<OBJECT> -c
<SOURCE>${CMAKE_END_TEMP_FILE}"
+ if(MSVC_VERSION EQUAL 1600 OR MSVC_VERSION GREATER 1600)
+ add_compile_flags("/analyze")
+ else()
+ message("PREFAST enabled!")
+ set(CMAKE_C_COMPILE_OBJECT "prefast cl ${CMAKE_START_TEMP_FILE}
${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /Fo<OBJECT> -c
<SOURCE>${CMAKE_END_TEMP_FILE}"
"prefast LIST")
- set(CMAKE_CXX_COMPILE_OBJECT "prefast cl ${CMAKE_START_TEMP_FILE}
${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /TP /Fo<OBJECT> -c
<SOURCE>${CMAKE_END_TEMP_FILE}"
+ set(CMAKE_CXX_COMPILE_OBJECT "prefast cl ${CMAKE_START_TEMP_FILE}
${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /TP /Fo<OBJECT> -c
<SOURCE>${CMAKE_END_TEMP_FILE}"
"prefast LIST")
- set(CMAKE_C_LINK_EXECUTABLE
+ set(CMAKE_C_LINK_EXECUTABLE
"cl ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS>
/Fe<TARGET> -link /implib:<TARGET_IMPLIB>
/version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>
<CMAKE_C_LINK_FLAGS> <LINK_FLAGS>
<LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
- set(CMAKE_CXX_LINK_EXECUTABLE
+ set(CMAKE_CXX_LINK_EXECUTABLE
"cl ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS>
/Fe<TARGET> -link /implib:<TARGET_IMPLIB>
/version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>
<CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS>
<LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
+ endif()
+
endif()
set(CMAKE_RC_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY})