From 61fde33ba754947114b09eee3d59bfde586282c9 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Tue, 17 Sep 2013 22:31:33 +0000 Subject: [PATCH] [CMAKE] * Add a proper way to enable/disable PSEH3. svn path=/trunk/; revision=60190 --- reactos/CMakeLists.txt | 4 ---- reactos/cmake/config.cmake | 7 ------- reactos/cmake/gcc.cmake | 8 ++++++++ reactos/lib/pseh/CMakeLists.txt | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/reactos/CMakeLists.txt b/reactos/CMakeLists.txt index df6bd7bed5d..16c2f6d68bb 100644 --- a/reactos/CMakeLists.txt +++ b/reactos/CMakeLists.txt @@ -129,10 +129,6 @@ else() add_definitions(-D_WINKD_=1) endif() - if(USE_PSEH3) - add_definitions(-D_USE_PSEH3=1) - endif() - # Version Options add_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 diff --git a/reactos/cmake/config.cmake b/reactos/cmake/config.cmake index d3619a524a0..9dd983b5fc9 100644 --- a/reactos/cmake/config.cmake +++ b/reactos/cmake/config.cmake @@ -71,15 +71,8 @@ set(GENERATE_DEPENDENCY_GRAPH FALSE CACHE BOOL "Whether to create a graphml dependency of dlls.") if(MSVC) - set(_PREFAST_ FALSE CACHE BOOL "Whether to enable PREFAST while compiling.") set(_VS_ANALYZE_ FALSE CACHE BOOL "Whether to enable static analysis while compiling.") - -else() - -set(USE_PSEH3 FALSE CACHE BOOL -"Whether to use the new PSEH3 library (requires GCC 4.5 and newer).") - endif() diff --git a/reactos/cmake/gcc.cmake b/reactos/cmake/gcc.cmake index 4c3872763e6..669ffe6bfd3 100644 --- a/reactos/cmake/gcc.cmake +++ b/reactos/cmake/gcc.cmake @@ -9,6 +9,14 @@ if(NOT DEFINED SEPARATE_DBG) set(SEPARATE_DBG FALSE) endif() +if(NOT DEFINED USE_PSEH3) + set(USE_PSEH3 0) +endif() + +if(USE_PSEH3) + add_definitions(-D_USE_PSEH3=1) +endif() + # Compiler Core add_compile_flags("-pipe -fms-extensions -fno-strict-aliasing") if(GCC_VERSION VERSION_GREATER 4.7) diff --git a/reactos/lib/pseh/CMakeLists.txt b/reactos/lib/pseh/CMakeLists.txt index d58e089fe99..5e960e13451 100644 --- a/reactos/lib/pseh/CMakeLists.txt +++ b/reactos/lib/pseh/CMakeLists.txt @@ -1,7 +1,7 @@ if(NOT MSVC) - if (USE_PSEH3) + if(USE_PSEH3) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/pseh) list(APPEND SOURCE i386/pseh3.c