|
|
@ -35,7 +35,9 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
|
|
# These are shared by bddisasm and bdshemu.
|
|
|
|
# These are shared by bddisasm and bdshemu.
|
|
|
|
if (NOT MSVC)
|
|
|
|
if (MSVC OR "${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC")
|
|
|
|
|
|
|
|
set(BDDISASM_COMMON_COMPILE_OPTIONS /W4 /WX)
|
|
|
|
|
|
|
|
else ()
|
|
|
|
set(BDDISASM_COMMON_COMPILE_OPTIONS
|
|
|
|
set(BDDISASM_COMMON_COMPILE_OPTIONS
|
|
|
|
"$<$<CONFIG:Release>:-U_FORTIFY_SOURCE>"
|
|
|
|
"$<$<CONFIG:Release>:-U_FORTIFY_SOURCE>"
|
|
|
|
"$<$<CONFIG:Release>:-D_FORTIFY_SOURCE=2>"
|
|
|
|
"$<$<CONFIG:Release>:-D_FORTIFY_SOURCE=2>"
|
|
|
@ -68,8 +70,6 @@ if (NOT MSVC)
|
|
|
|
-gdwarf-4
|
|
|
|
-gdwarf-4
|
|
|
|
-grecord-gcc-switches
|
|
|
|
-grecord-gcc-switches
|
|
|
|
-march=westmere)
|
|
|
|
-march=westmere)
|
|
|
|
else ()
|
|
|
|
|
|
|
|
set(BDDISASM_COMMON_COMPILE_OPTIONS /W4 /WX)
|
|
|
|
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
|
|
set(BDDISASM_PUBLIC_HEADERS
|
|
|
|
set(BDDISASM_PUBLIC_HEADERS
|
|
|
@ -91,6 +91,7 @@ set(BDDISASM_INSTALL_INCLUDE_DIR
|
|
|
|
|
|
|
|
|
|
|
|
include(CheckFunctionExists)
|
|
|
|
include(CheckFunctionExists)
|
|
|
|
include(CheckSymbolExists)
|
|
|
|
include(CheckSymbolExists)
|
|
|
|
|
|
|
|
include(CheckCCompilerFlag)
|
|
|
|
|
|
|
|
|
|
|
|
add_library(
|
|
|
|
add_library(
|
|
|
|
bddisasm STATIC
|
|
|
|
bddisasm STATIC
|
|
|
@ -171,7 +172,9 @@ target_include_directories(bddisasm PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOU
|
|
|
|
target_link_libraries(bdshemu PUBLIC bddisasm)
|
|
|
|
target_link_libraries(bdshemu PUBLIC bddisasm)
|
|
|
|
|
|
|
|
|
|
|
|
target_compile_options(bdshemu PRIVATE ${BDDISASM_COMMON_COMPILE_OPTIONS})
|
|
|
|
target_compile_options(bdshemu PRIVATE ${BDDISASM_COMMON_COMPILE_OPTIONS})
|
|
|
|
if (NOT MSVC)
|
|
|
|
|
|
|
|
|
|
|
|
check_c_compiler_flag(-maes HAS_MAES)
|
|
|
|
|
|
|
|
if (HAS_MAES)
|
|
|
|
target_compile_options(bdshemu PRIVATE -maes)
|
|
|
|
target_compile_options(bdshemu PRIVATE -maes)
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
|
|