diff --git a/CMakeLists.txt b/CMakeLists.txt index 1710249..39bd776 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.0) project(paraBEM) MESSAGE(STATUS "python version set: ${py}") @@ -7,6 +7,7 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) set(CMAKE_POSITION_INDEPENDENT_CODE ON) # OPTIONS +set (CMAKE_CXX_STANDARD 11) OPTION(BUILD_PYTHON_BINDINGS "create python bindings" ON) if (BUILD_PYTHON_BINDINGS) @@ -29,6 +30,11 @@ find_package(OpenMP) ## OPENMP if(OPENMP_FOUND) + + if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + LINK_LIBRARIES(${OpenMP_libomp_LIBRARY}) + LINK_LIBRARIES(${OpenMP_libomp_LIBRARY}) + endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") endif() diff --git a/README.md b/README.md index 010dac5..316ce6c 100755 --- a/README.md +++ b/README.md @@ -26,9 +26,11 @@ the c++ code is wrapped with pybind11 to python. This allows fast computation (e ```bash mkdir build && cd build cmake .. -use cmake-gui to fix not found packages or wrong versions (eg. python, pybind11, ...) +cmake -DPYTHON_EXECUTABLE=/usr/local/bin/python3 .. ``` +use cmake-gui to fix not found packages or wrong versions (eg. python, pybind11, ...) + ### build and install if cmake doesn't complain, install the package. (the number at the end is the number of compile jobs) ``` diff --git a/src/panel2.cpp b/src/panel2.cpp index 70abeb7..cea31ba 100755 --- a/src/panel2.cpp +++ b/src/panel2.cpp @@ -47,7 +47,7 @@ Panel2* Panel2::get_neigbour(int nr, Panel2* pan1) pan = pan1->points[nr]->panels[1]; if (pan == this){ pan = pan1->points[1 - nr]->panels[0]; - if (pan = pan1){ + if (pan == pan1){ pan = pan1->points[1 - nr]->panels[1]; } }