diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cdca35..1294878 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,7 +116,6 @@ endif() if(ENABLE_OPENMP) find_package( OpenMP REQUIRED ) - include(FindOpenMP) if(OPENMP_FOUND) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") message(STATUS "found OpenMP, compiling with flags: " ${OpenMP_CXX_FLAGS} ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4f277f5..45dab94 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -80,7 +80,8 @@ include_directories( ${PNG_PNG_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} - ${MIMALLOC_INCLUDE_DIR}) + ${MIMALLOC_INCLUDE_DIR} + ${OpenMP_CXX_INCLUDE_DIRS}) if(Backtrace_FOUND) include_directories( diff --git a/src/confscreen.cpp b/src/confscreen.cpp index 07c42b7..c7e2815 100644 --- a/src/confscreen.cpp +++ b/src/confscreen.cpp @@ -5,6 +5,9 @@ // Copyright 2008-2013 Jonathan Westhues. //----------------------------------------------------------------------------- #include "solvespace.h" +#if defined(_OPENMP) +#include +#endif void TextWindow::ScreenChangeLightDirection(int link, uint32_t v) { SS.TW.ShowEditControl(8, ssprintf("%.2f, %.2f, %.2f", CO(SS.lightDir[v]))); @@ -389,6 +392,11 @@ void TextWindow::ShowConfiguration() { Printf(false, " %Ft renderer %E%s", gl_renderer); Printf(false, " %Ft version %E%s", gl_version); } + + #if defined(_OPENMP) + Printf(false, " %FtOpenMP enabled"); + Printf(false, " %Ft threads %E%d", omp_get_max_threads()); + #endif } bool TextWindow::EditControlDoneForConfiguration(const std::string &s) {