From 129f803905e34bdbe07c072e59469f2e828f7350 Mon Sep 17 00:00:00 2001 From: Philippe Virouleau Date: Mon, 28 Jun 2021 14:08:57 +0200 Subject: [PATCH 1/2] Use GIT_SHALLOW on external libraries --- grapher/cmake/external_libraries.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/grapher/cmake/external_libraries.cmake b/grapher/cmake/external_libraries.cmake index 17b3408..e9e4b32 100644 --- a/grapher/cmake/external_libraries.cmake +++ b/grapher/cmake/external_libraries.cmake @@ -12,7 +12,8 @@ set(JSON_CI OFF) FetchContent_Declare(json_content GIT_REPOSITORY https://github.com/nlohmann/json.git - GIT_TAG v3.9.1) + GIT_TAG v3.9.1 + GIT_SHALLOW TRUE) FetchContent_MakeAvailable(json_content) @@ -23,7 +24,8 @@ link_libraries(nlohmann_json::nlohmann_json) FetchContent_Declare(sciplot_content GIT_REPOSITORY https://github.com/sciplot/sciplot.git - GIT_TAG master) + GIT_TAG master + GIT_SHALLOW TRUE) FetchContent_GetProperties(sciplot_content) if(NOT sciplot_content_POPULATED) From 8c741131074368a7f81c7fe82a7dc3b13ceb83cf Mon Sep 17 00:00:00 2001 From: Philippe Virouleau Date: Mon, 28 Jun 2021 14:14:10 +0200 Subject: [PATCH 2/2] Fix build --- CMakeLists.txt | 1 + grapher/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d31a72..5b618d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,7 @@ project(ctbench) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_CXX_STANDARD 20) +link_libraries(stdc++fs) option(CTBENCH_ENABLE_TESTING "Enable testing for ctbench components." OFF) diff --git a/grapher/CMakeLists.txt b/grapher/CMakeLists.txt index d4c63be..f3f9ea6 100644 --- a/grapher/CMakeLists.txt +++ b/grapher/CMakeLists.txt @@ -12,6 +12,8 @@ find_package(LLVM REQUIRED CONFIG) llvm_map_components_to_libnames(llvm_libs support) include_directories(${LLVM_INCLUDE_DIRS}) link_libraries(${llvm_libs}) +# LLVM libraries are compiled without RTTI +add_compile_options(-fno-rtti) # External libraries include(cmake/external_libraries.cmake)