diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ecef119..39f62c10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,20 +79,29 @@ enable_testing() set(TESTDIR ${CMAKE_CURRENT_SOURCE_DIR}/src/test) subdirlist(TEST_CATEGORIES ${TESTDIR}) -foreach(SUPER_SLAB_SIZE 1;16) - foreach(TEST_CATEGORY ${TEST_CATEGORIES}) - subdirlist(TESTS ${TESTDIR}/${TEST_CATEGORY}) - foreach(TEST ${TESTS}) - unset(SRC) - aux_source_directory(${TESTDIR}/${TEST_CATEGORY}/${TEST} SRC) - set(TESTNAME "${TEST_CATEGORY}-${TEST}-${SUPER_SLAB_SIZE}") - add_executable(${TESTNAME} ${SRC} src/override/new.cc) - if (${SUPER_SLAB_SIZE} EQUAL 1) - target_compile_definitions(${TESTNAME} PRIVATE IS_ADDRESS_SPACE_CONSTRAINED) - endif() - target_include_directories(${TESTNAME} PRIVATE src) - linklibs(${TESTNAME}) - add_test(${TESTNAME} ${TESTNAME}) +foreach(TEST_CACHE_FRIENDLY_OFFSET OFF;ON) + foreach(SUPER_SLAB_SIZE 1;16) + foreach(TEST_CATEGORY ${TEST_CATEGORIES}) + subdirlist(TESTS ${TESTDIR}/${TEST_CATEGORY}) + foreach(TEST ${TESTS}) + unset(SRC) + aux_source_directory(${TESTDIR}/${TEST_CATEGORY}/${TEST} SRC) + set(TESTNAME "${TEST_CATEGORY}-${TEST}-${SUPER_SLAB_SIZE}") + if (TEST_CACHE_FRIENDLY_OFFSET) + set(TESTNAME "${TESTNAME}-cache-friendly") + endif() + + add_executable(${TESTNAME} ${SRC} src/override/new.cc) + if (${SUPER_SLAB_SIZE} EQUAL 1) + target_compile_definitions(${TESTNAME} PRIVATE IS_ADDRESS_SPACE_CONSTRAINED) + endif() + if(TEST_CACHE_FRIENDLY_OFFSET) + target_compile_definitions(${TESTNAME} PRIVATE CACHE_FRIENDLY_OFFSET=64) + endif() + target_include_directories(${TESTNAME} PRIVATE src) + linklibs(${TESTNAME}) + add_test(${TESTNAME} ${TESTNAME}) + endforeach() endforeach() endforeach() endforeach()