From 2dfa217c3ce7f516e25a93a6c6e26c68c15573e8 Mon Sep 17 00:00:00 2001 From: Dmitry Gorbachev Date: Wed, 5 Sep 2012 21:39:43 +0000 Subject: [PATCH] [ATACTL] Add set_cpp() to CMake script. [LIBUSB][UNIATA] Compile with no RTTI and exception handling. svn path=/trunk/; revision=57242 --- reactos/base/applications/atactl/CMakeLists.txt | 1 + reactos/drivers/storage/ide/uniata/CMakeLists.txt | 10 +++++++--- reactos/drivers/usb/usbd/CMakeLists.txt | 2 +- reactos/drivers/usb/usbehci/CMakeLists.txt | 2 +- reactos/lib/drivers/libusb/CMakeLists.txt | 8 ++++++++ 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/reactos/base/applications/atactl/CMakeLists.txt b/reactos/base/applications/atactl/CMakeLists.txt index 80a3f6a60dc..82ccfeb1eb7 100644 --- a/reactos/base/applications/atactl/CMakeLists.txt +++ b/reactos/base/applications/atactl/CMakeLists.txt @@ -1,3 +1,4 @@ +set_cpp() add_definitions(-DUSER_MODE) include_directories(${REACTOS_SOURCE_DIR}/drivers/storage/ide/uniata) diff --git a/reactos/drivers/storage/ide/uniata/CMakeLists.txt b/reactos/drivers/storage/ide/uniata/CMakeLists.txt index ff106958305..47a82982ba2 100644 --- a/reactos/drivers/storage/ide/uniata/CMakeLists.txt +++ b/reactos/drivers/storage/ide/uniata/CMakeLists.txt @@ -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) diff --git a/reactos/drivers/usb/usbd/CMakeLists.txt b/reactos/drivers/usb/usbd/CMakeLists.txt index 59f8c6b28a3..993f1d053c2 100644 --- a/reactos/drivers/usb/usbd/CMakeLists.txt +++ b/reactos/drivers/usb/usbd/CMakeLists.txt @@ -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) \ No newline at end of file +add_cd_file(TARGET usbd DESTINATION reactos/system32/drivers NO_CAB FOR all) diff --git a/reactos/drivers/usb/usbehci/CMakeLists.txt b/reactos/drivers/usb/usbehci/CMakeLists.txt index effa8081e4a..828804b6f7e 100644 --- a/reactos/drivers/usb/usbehci/CMakeLists.txt +++ b/reactos/drivers/usb/usbehci/CMakeLists.txt @@ -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) \ No newline at end of file +add_cd_file(TARGET usbehci DESTINATION reactos/system32/drivers NO_CAB FOR all) diff --git a/reactos/lib/drivers/libusb/CMakeLists.txt b/reactos/lib/drivers/libusb/CMakeLists.txt index 61925dc1b77..afbcd3ff3e2 100644 --- a/reactos/lib/drivers/libusb/CMakeLists.txt +++ b/reactos/lib/drivers/libusb/CMakeLists.txt @@ -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()