mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 12:34:35 +03:00
Build related improvements (CMake 3.8 now required)
* CMake 3.8 as a baseline means no "IF"s in a cmake build script
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
|
||||||
|
|
||||||
cmake_policy(PUSH)
|
cmake_policy(PUSH)
|
||||||
|
|
||||||
@@ -212,11 +212,7 @@ function(asmjit_add_target target target_type)
|
|||||||
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " ${link_flag}")
|
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " ${link_flag}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if (${CMAKE_VERSION} VERSION_LESS "3.8.0")
|
target_compile_features(${target} PUBLIC cxx_std_11)
|
||||||
set_property(TARGET ${target} PROPERTY CXX_STANDARD 11)
|
|
||||||
else()
|
|
||||||
target_compile_features(${target} PUBLIC cxx_std_11)
|
|
||||||
endif()
|
|
||||||
set_property(TARGET ${target} PROPERTY CXX_EXTENSIONS NO)
|
set_property(TARGET ${target} PROPERTY CXX_EXTENSIONS NO)
|
||||||
set_property(TARGET ${target} PROPERTY CXX_VISIBILITY_PRESET hidden)
|
set_property(TARGET ${target} PROPERTY CXX_VISIBILITY_PRESET hidden)
|
||||||
target_compile_options(${target} PRIVATE ${X_CFLAGS} ${ASMJIT_SANITIZE_CFLAGS} $<$<CONFIG:Debug>:${X_CFLAGS_DBG}> $<$<NOT:$<CONFIG:Debug>>:${X_CFLAGS_REL}>)
|
target_compile_options(${target} PRIVATE ${X_CFLAGS} ${ASMJIT_SANITIZE_CFLAGS} $<$<CONFIG:Debug>:${X_CFLAGS_DBG}> $<$<NOT:$<CONFIG:Debug>>:${X_CFLAGS_REL}>)
|
||||||
@@ -562,9 +558,7 @@ foreach(src_file ${ASMJIT_SRC_LIST})
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if (NOT ${CMAKE_VERSION} VERSION_LESS "3.8.0")
|
source_group(TREE "${ASMJIT_DIR}" FILES ${ASMJIT_SRC})
|
||||||
source_group(TREE "${ASMJIT_DIR}" FILES ${ASMJIT_SRC})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# AsmJit - Summary
|
# AsmJit - Summary
|
||||||
# ================
|
# ================
|
||||||
|
|||||||
Reference in New Issue
Block a user