diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2019-05-11 20:29:56 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2019-05-11 20:29:56 +0000 |
commit | 5e8b580aa9eda27b39dd3137ef0668198ec9cd66 (patch) | |
tree | aad21be452d96095ffa26b47b97f6759d6b3e9aa /science/nest/files/patch-CMakeLists.txt | |
parent | e9dab3711607cbac3fc2b2d0d9078239cb4b1988 (diff) | |
download | ports-5e8b580aa9eda27b39dd3137ef0668198ec9cd66.tar.gz ports-5e8b580aa9eda27b39dd3137ef0668198ec9cd66.zip |
Notes
Diffstat (limited to 'science/nest/files/patch-CMakeLists.txt')
-rw-r--r-- | science/nest/files/patch-CMakeLists.txt | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/science/nest/files/patch-CMakeLists.txt b/science/nest/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..ac06547789ac --- /dev/null +++ b/science/nest/files/patch-CMakeLists.txt @@ -0,0 +1,53 @@ +--- CMakeLists.txt.orig 2019-04-23 07:25:32 UTC ++++ CMakeLists.txt +@@ -100,7 +100,7 @@ include( GNUInstallDirs ) + get_filename_component(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} REALPATH BASE_DIR "${CMAKE_BINARY_DIR}") + # If CMAKE_INSTALL_PREFIX is omitted CMake will set the installation prefix to its default '/usr/local'. + # This is not desired. A subdirectory is allowed, e.g. 'usr/local/nest'. +-if ( "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local" ) ++if ( FALSE AND "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local" ) + message( FATAL_ERROR "Do not install into '${CMAKE_INSTALL_PREFIX}'. Please set -DCMAKE_INSTALL_PREFIX:PATH=<install prefix>." ) + endif () + +@@ -109,7 +109,7 @@ endif () + ################################################################################ + + # needed for pynest test suite +-if ( ${with-python} STREQUAL "ON" OR ${with-python} STREQUAL "2" OR ${with-python} STREQUAL "3" ) ++if ( BUILD_PYTHON AND (${with-python} STREQUAL "ON" OR ${with-python} STREQUAL "2" OR ${with-python} STREQUAL "3") ) + find_program( NOSETESTS NAMES nosetests ) + endif () + +@@ -198,7 +198,7 @@ enable_testing() + set( TEST_LOGFILE ${PROJECT_BINARY_DIR}/reports/installcheck.log ) + file( MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/reports/ ) + +-if ( HAVE_PYTHON ) ++if ( BUILD_PYTHON AND HAVE_PYTHON ) + add_custom_target( installcheck + COMMAND ${CMAKE_COMMAND} -E env + NEST_PATH="${CMAKE_INSTALL_FULL_BINDIR}" +@@ -225,8 +225,12 @@ endif () + if ( HAVE_LIBNEUROSIM ) + add_subdirectory( conngen ) + endif () +-add_subdirectory( doc ) +-add_subdirectory( examples ) ++if (INSTALL_DOCS) ++ add_subdirectory( doc ) ++endif() ++if (INSTALL_EXAMPLES) ++ add_subdirectory( examples ) ++endif() + add_subdirectory( extras ) + add_subdirectory( lib ) + add_subdirectory( libnestutil ) +@@ -238,7 +242,7 @@ add_subdirectory( nestkernel ) + add_subdirectory( precise ) + add_subdirectory( testsuite ) + add_subdirectory( topology ) +-if ( HAVE_PYTHON ) ++if ( BUILD_PYTHON AND HAVE_PYTHON ) + add_subdirectory( pynest ) + endif () + |