This repository was archived by the owner on May 9, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ add_executable(${bench_name} taxi_reduced_bench.cpp)
4
4
target_link_libraries (${bench_name} ${EXECUTE_TEST_LIBS} benchmark)
5
5
6
6
add_executable (taxi_full taxi_full_bench.cpp)
7
- target_link_libraries (taxi_full ${EXECUTE_TEST_LIBS} benchmark)
7
+ target_link_options (taxi_full PUBLIC "LINKER:--no-as-needed" )
8
+ target_link_libraries (taxi_full ${PROFILER_LIBS} ${EXECUTE_TEST_LIBS} benchmark)
Original file line number Diff line number Diff line change @@ -31,6 +31,17 @@ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
31
31
# Force -O0 optimization level for debug builds.
32
32
set (CMAKE_CXX_FLAGS_DEBUG "-g -O0" )
33
33
34
+ set (PROFILER_LIBS "" )
35
+ option (ENABLE_PROFILER "Enable Gperftools linking" OFF )
36
+ if (ENABLE_PROFILER)
37
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fPIC" )
38
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-omit-frame-pointer -fPIC" )
39
+ list (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR} /cmake/Modules" )
40
+ find_package (Gperftools REQUIRED COMPONENTS TCMALLOC PROFILER)
41
+ set (PROFILER_LIBS ${Gperftools_TCMALLOC} ${Gperftools_PROFILER} )
42
+ add_definitions ("-DHAVE_PROFILER" )
43
+ endif ()
44
+
34
45
if ("${CMAKE_VERSION} " VERSION_GREATER 3.11.999)
35
46
cmake_policy (SET CMP0074 NEW)
36
47
endif ()
@@ -608,14 +619,6 @@ if(TIME_LIMITED_BUILD)
608
619
set (MAPD_PACKAGE_FLAGS "${MAPD_PACKAGE_FLAGS} -${TIME_LIMITED_NUMBER_OF_DAYS} d" )
609
620
endif ()
610
621
611
- option (ENABLE_PROFILER "Enable google perftools" OFF )
612
- if (ENABLE_PROFILER)
613
- find_package (Gperftools REQUIRED COMPONENTS TCMALLOC PROFILER)
614
- set (PROFILER_LIBS ${Gperftools_TCMALLOC} ${Gperftools_PROFILER} )
615
- add_definitions ("-DHAVE_PROFILER" )
616
- else ()
617
- set (PROFILER_LIBS "" )
618
- endif ()
619
622
620
623
add_subdirectory (SqliteConnector)
621
624
You can’t perform that action at this time.
0 commit comments