Skip to content
Snippets Groups Projects
Unverified Commit 28b02023 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer Committed by GitHub
Browse files

Merge pull request #311 from ChimeraTK/update-project-template

update project template
parents ecffe22e 588f7fa4
No related branches found
No related tags found
No related merge requests found
......@@ -45,16 +45,18 @@ set(DOOCS_noAsNeededFlag 1)
# note, helper functions and variables should also be prefixed with DOOCS_, since everything is exported to
# project calling find_package(DOOCS)
function (DOOCS_addToPkgConfPath newPath)
function (DOOCS_prependToPkgConfPath newPath)
if (NOT (":$ENV{PKG_CONFIG_PATH}:" MATCHES ":${newPath}:"))
set(ENV{PKG_CONFIG_PATH} $ENV{PKG_CONFIG_PATH}:${newPath})
set(ENV{PKG_CONFIG_PATH} ${newPath}:$ENV{PKG_CONFIG_PATH})
endif()
endfunction()
DOOCS_prependToPkgConfPath(/export/doocs/lib/pkgconfig)
if(DOOCS_DIR)
DOOCS_addToPkgConfPath(${DOOCS_DIR}/pkgconfig)
# prepend pkgconfig for user-set doocs dir; this makes sure system-installed DOOCS is overwritten
DOOCS_prependToPkgConfPath(${DOOCS_DIR}/x86_64-linux-gnu/pkgconfig)
DOOCS_prependToPkgConfPath(${DOOCS_DIR}/pkgconfig)
endif()
DOOCS_addToPkgConfPath(/export/doocs/lib/pkgconfig)
if (NOT DOOCS_FIND_QUIETLY)
message("FindDOOCS: Using PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH}")
endif()
......
......@@ -31,6 +31,8 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
set(CMAKE_CXX_FLAGS_TSAN "${CMAKE_CXX_FLAGS} -g -O1 -fsanitize=thread -fno-inline")
set(CMAKE_CXX_FLAGS_ASAN "${CMAKE_CXX_FLAGS} -g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=leak")
add_compile_definitions("$<$<CONFIG:Debug>:_GLIBCXX_ASSERTIONS>")
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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment