File tree Expand file tree Collapse file tree 8 files changed +14
-3
lines changed
Expand file tree Collapse file tree 8 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ if("${isSystemDir}" STREQUAL "-1")
3636 set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX} /lib" )
3737endif ("${isSystemDir} " STREQUAL "-1" )
3838
39-
4039# Setting the include directory for the application to find config.h
4140include_directories ( ${CMAKE_BINARY_DIR} )
4241# Since we have created a config.h add a global define for it
@@ -46,11 +45,12 @@ add_definitions( "-DPACKAGE_VERSION=\"${FLUX_SCHED_VER}\"" )
4645# We build a lot of shared libs, build them all with PIC
4746set (CMAKE_POSITION_INDEPENDENT_CODE ON )
4847
49- # variable to store paths to add to module path for tests
50-
5148list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} /cmake)
49+ list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} /cmake/sanitizers-cmake/cmake)
5250list (APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX} )
5351
52+ include (FindSanitizers)
53+
5454# external dependencies
5555find_package (PkgConfig REQUIRED)
5656set (ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH} :${CMAKE_INSTALL_PREFIX} /lib/pkgconfig" )
@@ -147,6 +147,7 @@ function(flux_add_plugin TargetName PluginType)
147147 )
148148 target_link_options (${TargetName} PRIVATE
149149 "LINKER:--version-script=${CMAKE_SOURCE_DIR} /flux-plugin.map" ${LinkerOpts} )
150+ add_sanitizers(${TargetName} )
150151 target_link_libraries (${TargetName} PRIVATE flux::core)
151152 if (NOT ARG_NOINSTALL)
152153 install (TARGETS ${TargetName}
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ target_link_libraries(resource PUBLIC
8787 jobspec_conv
8888 Boost::filesystem
8989 )
90+ add_sanitizers(resource )
9091
9192add_subdirectory (modules)
9293add_subdirectory (reapi)
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ add_library ( jobspec_conv STATIC
99 ${CMAKE_CURRENT_SOURCE_DIR} /rank_constraint.cpp
1010 ${CMAKE_CURRENT_SOURCE_DIR} /rank_constraint.hpp
1111 )
12+ add_sanitizers(jobspec_conv)
1213target_link_libraries (jobspec_conv PUBLIC flux::hostlist flux::idset
1314 flux::core yaml-cpp PkgConfig::JANSSON
1415 PkgConfig::UUID
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ add_library(planner_cxx STATIC
88 ./planner_internal_tree.hpp
99 ./scheduled_point_tree.hpp
1010 )
11+ add_sanitizers(planner_cxx)
1112target_link_libraries (planner_cxx yggdrasil)
1213
1314
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ add_library(planner STATIC
44 ./planner.h
55 ./planner_multi.h
66)
7+ add_sanitizers(planner)
78target_include_directories (planner PUBLIC ./)
89target_link_libraries (planner PUBLIC planner_cxx)
910
Original file line number Diff line number Diff line change 11add_executable (planner_test01 planner_test01.cpp)
2+ add_sanitizers(planner_test01)
23target_link_libraries (planner_test01 planner libtap)
34flux_add_test(NAME planner_test01 COMMAND planner_test01)
45set_property (TEST planner_test01 PROPERTY ENVIRONMENT "TESTRESRC_INPUT_FILE=$(CMAKE_SOURCE_DIR)/conf/hype.lua" )
56
67add_executable (planner_test02 planner_test02.cpp)
8+ add_sanitizers(planner_test02)
79target_link_libraries (planner_test02 planner libtap)
810flux_add_test(NAME planner_test02 COMMAND planner_test02)
911set_property (TEST planner_test02 PROPERTY ENVIRONMENT "TESTRESRC_INPUT_FILE=$(CMAKE_SOURCE_DIR)/conf/hype.lua" )
Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ add_executable(matcher_util_api_test
44target_link_libraries (matcher_util_api_test PRIVATE libtap resource
55 PkgConfig::JANSSON
66 )
7+ add_sanitizers(matcher_util_api_test)
78flux_add_test(NAME matcher_util_api_test COMMAND matcher_util_api_test)
Original file line number Diff line number Diff line change 11add_executable (grug2dot
22 grug2dot.cpp
33 )
4+ add_sanitizers(grug2dot)
45target_link_libraries (grug2dot
56 resource
67 Boost::headers
@@ -11,6 +12,7 @@ add_executable(resource-query
1112 command .cpp
1213 command .hpp
1314 )
15+ add_sanitizers(resource -query)
1416target_link_libraries (resource -query
1517 resource
1618 PkgConfig::LIBEDIT
@@ -23,6 +25,7 @@ add_executable(rq2
2325 rq2.cpp
2426 rq2.hpp
2527 )
28+ add_sanitizers(rq2)
2629target_link_libraries (rq2
2730 resource
2831 PkgConfig::LIBEDIT
You can’t perform that action at this time.
0 commit comments