mirror of
https://github.com/lifting-bits/mcsema
synced 2026-06-08 15:31:09 +00:00
31f267bd5f
* Update to latest remill APIs and way of using CMake. * Minor fixes * Bug fixes for AArch64 * Tweaks * Adds some nifty functionality useful for debugging some aarch64 bugs * Fixes a subtle bug * Bug fixes * Make the test suite use explicit args * Bug fix in xrefs * Disable tests for now
55 lines
1.2 KiB
CMake
55 lines
1.2 KiB
CMake
# This is only executed once; use a macro (and not a function) so that
|
|
# everything defined here does not end up in a separate namespace
|
|
macro(mcsema_settings_main)
|
|
# default build type
|
|
if(WIN32)
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
else()
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
|
endif()
|
|
endif()
|
|
|
|
# overwrite the default install prefix
|
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|
if(DEFINED WIN32)
|
|
set(CMAKE_INSTALL_PREFIX "C:/")
|
|
else()
|
|
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
|
endif()
|
|
endif()
|
|
|
|
message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
|
|
|
|
# generate a compile commands JSON file.
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
#
|
|
# compiler and linker flags
|
|
#
|
|
|
|
# Globally set the required C++ standard
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
if(UNIX)
|
|
if(APPLE)
|
|
set(PLATFORM_NAME "macos")
|
|
else()
|
|
set(PLATFORM_NAME "linux")
|
|
endif()
|
|
|
|
elseif(WIN32)
|
|
set(PLATFORM_NAME "windows")
|
|
|
|
else()
|
|
message("This platform is not officially supported")
|
|
endif()
|
|
|
|
set(SETTINGS_CMAKE_ true)
|
|
endmacro()
|
|
|
|
if(NOT DEFINED SETTINGS_CMAKE_)
|
|
mcsema_settings_main()
|
|
endif()
|