build_system: make ENTT_ID_TYPE a cached string variable
This commit is contained in:
@@ -29,7 +29,7 @@ jobs:
|
||||
id_type: [uint32, uint64]
|
||||
include:
|
||||
- id_type: uint64
|
||||
id_type_option: -DENTT_BUILD_UINT64=ON
|
||||
id_type_option: -DENTT_ID_TYPE=std::uint64_t
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
- toolset: v141
|
||||
toolset_option: -T"v141"
|
||||
- id_type: uint64
|
||||
id_type_option: -DENTT_BUILD_UINT64=ON
|
||||
id_type_option: -DENTT_ID_TYPE=std::uint64_t
|
||||
exclude:
|
||||
- os: windows-2016
|
||||
toolset: clang-cl
|
||||
@@ -96,7 +96,7 @@ jobs:
|
||||
id_type: [uint32, uint64]
|
||||
include:
|
||||
- id_type: uint64
|
||||
id_type_option: -DENTT_BUILD_UINT64=ON
|
||||
id_type_option: -DENTT_ID_TYPE=std::uint64_t
|
||||
|
||||
runs-on: macOS-latest
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
id_type: [uint32, uint64]
|
||||
include:
|
||||
- id_type: uint64
|
||||
id_type_option: -DENTT_BUILD_UINT64=ON
|
||||
id_type_option: -DENTT_ID_TYPE=std::uint64_t
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
+2
-1
@@ -173,7 +173,8 @@ if(ENTT_BUILD_TESTING)
|
||||
option(ENTT_BUILD_EXAMPLE "Build examples." OFF)
|
||||
option(ENTT_BUILD_LIB "Build lib tests." OFF)
|
||||
option(ENTT_BUILD_SNAPSHOT "Build snapshot test with Cereal." OFF)
|
||||
option(ENTT_BUILD_UINT64 "Build using 64b entity identifiers" OFF)
|
||||
|
||||
set(ENTT_ID_TYPE std::uint32_t CACHE STRING "Type of identifiers to use for the tests")
|
||||
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
|
||||
+1
-8
@@ -61,18 +61,11 @@ function(SETUP_TARGET TARGET_NAME)
|
||||
target_compile_definitions(
|
||||
${TARGET_NAME}
|
||||
PRIVATE
|
||||
ENTT_ID_TYPE=${ENTT_ID_TYPE}
|
||||
_ENABLE_EXTENDED_ALIGNED_STORAGE
|
||||
NOMINMAX
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
if(ENTT_BUILD_UINT64)
|
||||
target_compile_definitions(
|
||||
${TARGET_NAME}
|
||||
PRIVATE
|
||||
ENTT_ID_TYPE=std::uint64_t
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
add_library(odr OBJECT odr.cpp)
|
||||
|
||||
Reference in New Issue
Block a user