Skip to content

Commit 13ea54f

Browse files
committed
Set OMR_MIXED_REFERENCES_MODE_STATIC for easier static mode checks
Signed-off-by: Sharon Wang <[email protected]>
1 parent b3e11a1 commit 13ea54f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

cmake/config.cmake

+3-2
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ elseif(OMR_GC_POINTER_MODE STREQUAL "mixed")
171171
omr_assert(FATAL_ERROR TEST NOT OMR_ENV_DATA32 MESSAGE "OMR_GC_POINTER_MODE must be \"full\" on 32 bit platforms")
172172
set(OMR_GC_COMPRESSED_POINTERS ON CACHE INTERNAL "")
173173
set(OMR_GC_FULL_POINTERS ON CACHE INTERNAL "")
174-
# OMR_MIXED_REFERENCES_MODE should already be set to 'static' or 'dynamic', but a default is provided here
175-
set(OMR_MIXED_REFERENCES_MODE "static" CACHE STRING "")
174+
if(OMR_MIXED_REFERENCES_MODE STREQUAL "static")
175+
set(OMR_MIXED_REFERENCES_MODE_STATIC ON CACHE INTERNAL "")
176+
endif()
176177
else()
177178
message(FATAL_ERROR "OMR_GC_FULL_POINTERS must be set to one of \"full\", \"compressed\", or \"mixed\"")
178179
endif()

gc/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ target_link_libraries(omrgc
440440
)
441441
set_target_properties(omrgc omrgc_hookgen omrgc_tracegen PROPERTIES FOLDER gc)
442442

443-
if(OMR_MIXED_REFERENCES_MODE STREQUAL "static")
443+
if(OMR_MIXED_REFERENCES_MODE_STATIC)
444444
target_compile_definitions(omrgc PUBLIC -DOMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES=1)
445445

446446
omr_assert(

gc/api/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ target_compile_features(omrgc
5454
${gc_compile_features}
5555
)
5656

57-
if(OMR_MIXED_REFERENCES_MODE STREQUAL "static")
57+
if(OMR_MIXED_REFERENCES_MODE_STATIC)
5858
target_include_directories(omrgc_full
5959
PUBLIC
6060
${gc_include_directories}

0 commit comments

Comments
 (0)