From 4530166b0b4befe5e9a68be632c847b95aaf7627 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 9 Jun 2017 19:05:35 +0300 Subject: [PATCH] Support with_checksums option in CMake script * CMakeLists.txt (with_checksums): New option (off by default). * CMakeLists.txt [with_checksums && enable_threads]: Issue MESSAGE that the configuration is not supported. * CMakeLists.txt [with_checksums] (CHECKSUMS): Define macro. * CMakeLists.txt [with_checksums] (SRC): Add checksums.c. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4bcd7f8..236fabc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,6 +137,14 @@ IF(enable_gcj_support) SET(SRC ${SRC} gcj_mlc.c) ENDIF(enable_gcj_support) +OPTION(with_checksums "Report erroneously cleared dirty bits" NO) +IF(with_checksums) + IF(enable_threads) + MESSAGE("CHECKSUMS not compatible with USE_MUNMAP or threads") + ENDIF(enable_threads) + ADD_DEFINITIONS("-DCHECKSUMS") + SET(SRC ${SRC} checksums.c) +ENDIF(with_checksums) ADD_LIBRARY( gc-lib STATIC ${SRC}) SET_TARGET_PROPERTIES(gc-lib PROPERTIES -- 2.50.1