Commit f185f183 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

Merge branch 'master' of github.com:ChimeraTK/project-template

parents 53027213 80b87687
......@@ -76,19 +76,6 @@ endif()
set(ENV{PKG_CONFIG_PATH} $ENV{PKG_CONFIG_PATH}:/export/doocs/lib/pkgconfig)
message("Using PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH}")
# Work-around #1: Link explicitly against tinemt because libDOOCSapi links against it
# but we usually don't have $DOOCS_DIR in ld.so search path and the meson build process
# does not set a rpath (rt #979328)
#
# Work-around #2: dev-libtine is missing the pkg-config file so use find-library if
# pkg-config fails, otherwise append it to DOOCS_FIND_COMPONENTS (rt #979516)
pkg_check_modules(tinemt tinemt)
if(tinemt_FOUND)
list(APPEND DOOCS_FIND_COMPONENTS tinemt)
else()
find_library(TINEMTLIB tinemt REQUIRED)
endif()
pkg_check_modules(DOOCS REQUIRED ${DOOCS_FIND_COMPONENTS})
string(REPLACE ";" " " DOOCS_CFLAGS "${DOOCS_CFLAGS}")
......
......@@ -23,17 +23,25 @@
include(cmake/enable_latest_cxx_support.cmake)
option(BUILD_COVERAGE_ON_DEBUG "Generate coverage information when compiling in debug mode" ON)
if (BUILD_COVERAGE_ON_DEBUG)
set(CTK_COVERAGE_FLAGS "--coverage")
else()
set(CTK_COVERAGE_FLAGS "")
endif()
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo;asan;tsan")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${PROJECT_NAME}_CXX_FLAGS} -Wall -Wextra -Wshadow -pedantic -Wuninitialized")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3 -g")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 --coverage")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 ${CTK_COVERAGE_FLAGS}")
set(CMAKE_CXX_FLAGS_TSAN "${CMAKE_CXX_FLAGS} -g -O1 -fsanitize=thread")
set(CMAKE_CXX_FLAGS_ASAN "${CMAKE_CXX_FLAGS} -g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=leak")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${PROJECT_NAME}_C_FLAGS} -Wall -Wextra -Wshadow -pedantic -Wuninitialized")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O3 -g")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0 --coverage")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0 ${CTK_COVERAGE_FLAGS}")
set(CMAKE_C_FLAGS_TSAN "${CMAKE_C_FLAGS} -g -O1 -fsanitize=thread")
set(CMAKE_C_FLAGS_ASAN "${CMAKE_C_FLAGS} -g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=leak")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment