Add set_cpp() to CMake script.

[LIBUSB][UNIATA]
Compile with no RTTI and exception handling.

svn path=/trunk/; revision=57242
This commit is contained in:
Dmitry Gorbachev 2012-09-05 21:39:43 +00:00
parent 455caa18fa
commit 2dfa217c3c
5 changed files with 18 additions and 5 deletions

View file

@ -1,3 +1,4 @@
set_cpp()
add_definitions(-DUSER_MODE)
include_directories(${REACTOS_SOURCE_DIR}/drivers/storage/ide/uniata)

View file

@ -22,10 +22,14 @@ add_library(uniata SHARED
${SOURCE}
idedma.rc)
if(NOT MSVC)
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
if(MSVC)
#add_target_compile_flags(uniata "/GR-")
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
else()
#allow_warnings(uniata)
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error")
#add_target_compile_flags(uniata "-fno-exceptions -fno-rtti")
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti -Wno-error")
endif()
add_pch(uniata stdafx.h)

View file

@ -10,4 +10,4 @@ set_module_type(usbd kernelmodedriver)
add_importlibs(usbd ntoskrnl hal)
add_cd_file(TARGET usbd DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_cd_file(TARGET usbd DESTINATION reactos/system32/drivers NO_CAB FOR all)

View file

@ -34,4 +34,4 @@ endif()
set_module_type(usbehci kernelmodedriver)
add_importlibs(usbehci ntoskrnl hal usbd)
add_cd_file(TARGET usbehci DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_cd_file(TARGET usbehci DESTINATION reactos/system32/drivers NO_CAB FOR all)

View file

@ -19,3 +19,11 @@ list(APPEND SOURCE
add_library(libusb ${SOURCE})
add_dependencies(libusb bugcodes)
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
if(MSVC)
#add_target_compile_flags(libusb "/GR-")
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
else()
#add_target_compile_flags(libusb "-fno-exceptions -fno-rtti")
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
endif()