Commit 194520fa authored by Niklas Eiling's avatar Niklas Eiling Committed by Markus Mirz
Browse files

add profiling option to CMakeLists.txt

to use it call cmake with -DWITH_PROFILING=ON
parent 2a7922f8
......@@ -56,6 +56,7 @@ else()
endif()
endif()
include(CheckSymbolExists)
check_symbol_exists(pipe unistd.h HAVE_PIPE)
check_symbol_exists(timerfd_create sys/timerfd.h HAVE_TIMERFD)
......@@ -68,6 +69,7 @@ GetVersion(${PROJECT_SOURCE_DIR} "DPSIM")
option(WITH_EIGEN_SUBMODULE "Build with Eigen as submodule" OFF)
option(WITH_SPDLOG_SUBMODULE "Build with Spdlog as submodule" OFF)
option(WITH_CIM_SUBMODULE "Build with CIMpp as submodule" OFF)
option(WITH_PROFILING "Add `-pg` profiling flag to compiliation" OFF)
find_package(Threads REQUIRED)
......@@ -90,6 +92,10 @@ else()
find_package(CIMpp)
endif()
if (WITH_PROFILING)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
endif()
find_package(Sundials)
find_package(OpenMP)
find_package(CUDA)
......
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