Skip to content

Commit

Permalink
Merge pull request #1912 from heplesser/update-2-20-cmake
Browse files Browse the repository at this point in the history
Update NEST 2.20.x CMake configuration to support OpenMP fully on OSX
  • Loading branch information
abigailm authored Feb 4, 2021
2 parents 63efc43 + c0f8a9b commit 2dc4195
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
# You should have received a copy of the GNU General Public License
# along with NEST. If not, see <http://www.gnu.org/licenses/>

cmake_minimum_required( VERSION 3.1 )
# Version range from minimum required (3.12 for macOS OpenMP)
# up to newest version tested, see https://cliutils.gitlab.io/modern-cmake/chapters/basics.html
cmake_minimum_required( VERSION 3.12...3.19 )

# add cmake modules: for all `include(...)` first look here
list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
Expand Down
6 changes: 3 additions & 3 deletions sli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,19 @@ set( sli_sources
)

add_library( sli_lib ${sli_sources} )
target_link_libraries( sli_lib nestutil )
target_link_libraries( sli_lib nestutil OpenMP::OpenMP_CXX )

# Make a separate target for linking against readline, so that
# pynestkernel does not need to link against readline and make
# loading different readlines a problem for Python. See this
# pull request for more information:
# https://github.com/nest/nest-simulator/pull/323
add_library( sli_readline gnureadline.cc gnureadline.h )
target_link_libraries( sli_readline sli_lib nestutil ${READLINE_LIBRARIES} )
target_link_libraries( sli_readline sli_lib nestutil ${READLINE_LIBRARIES} OpenMP::OpenMP_CXX )

# add the executable
add_executable( sli puresli.cc )
target_link_libraries( sli sli_lib sli_readline ${GSL_LIBRARIES} )
target_link_libraries( sli sli_lib sli_readline ${GSL_LIBRARIES} OpenMP::OpenMP_CXX )

target_include_directories( sli PRIVATE
${PROJECT_SOURCE_DIR}/libnestutil
Expand Down

0 comments on commit 2dc4195

Please sign in to comment.