Skip to content

Commit

Permalink
Merge branch 'release/18.02.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvierjahn committed Feb 7, 2018
2 parents aecc590 + cb8e039 commit c7fe9ee
Show file tree
Hide file tree
Showing 98 changed files with 4,285 additions and 1,042 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build*
BUILD*
.dir-locals.el
*.pyc
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-------------------------------------------------------------------------------
# nest in situ vis
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualisation Group.
#-------------------------------------------------------------------------------
# License
Expand All @@ -27,6 +27,15 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_CXX_STANDARD 17)

find_package(Boost REQUIRED COMPONENTS python)
find_library(Boost_PYTHON_NUMPY_LIBRARY
boost_numpy
PATHS ${Boost_LIBRARY_DIRS}
NO_DEFAULT_PATH
)
set(Boost_LIBRARIES
${Boost_LIBRARIES}
${Boost_PYTHON_NUMPY_LIBRARY}
)

find_package(PythonInterp)
find_package(PythonLibs)
Expand All @@ -46,7 +55,7 @@ include(py.test)

include(WarningLevels)

find_package(conduit)
find_package(Conduit)
set_target_properties(conduit
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CONDUIT_INCLUDE_DIRS}/..")

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--------------------------------------------------------------------------------
nest in situ vis

Copyright (c) 2017 RWTH Aachen University, Germany,
Copyright (c) 2017-2018 RWTH Aachen University, Germany,
Virtual Reality & Immersive Visualisation Group.
--------------------------------------------------------------------------------
Contact Information
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# nest in situ vis

*nest in situ vis* is Copyright (c) 2017 RWTH Aachen University, Germany,
*nest in situ vis* is Copyright (c) 2017-2018 RWTH Aachen University, Germany,
Virtual Reality & Immersive Visualization Group.


Expand Down
2 changes: 1 addition & 1 deletion cmake/ConfigureFiles.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-------------------------------------------------------------------------------
# nest in situ vis
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualisation Group.
#-------------------------------------------------------------------------------
# License
Expand Down
2 changes: 1 addition & 1 deletion cmake/WarningLevels.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-------------------------------------------------------------------------------
# nest in situ vis
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualisation Group.
#-------------------------------------------------------------------------------
# License
Expand Down
23 changes: 19 additions & 4 deletions cmake/catch.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-------------------------------------------------------------------------------
# nest in situ vis
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualisation Group.
#-------------------------------------------------------------------------------
# License
Expand Down Expand Up @@ -39,8 +39,14 @@ endfunction()

function(ADD_TEST_CATCH_INTERNAL_
NAME SOURCES HEADERS INCLUDE_DIRECTORIES LINK_LIBRARIES PATH_TO_ADD)
STRING(REGEX REPLACE
"^__" ""
NAME "${NAME}"
)
add_executable(${NAME} ${SOURCES} ${HEADERS})
target_include_directories(${NAME} PRIVATE ${INCLUDE_DIRECTORIES})
target_include_directories(${NAME}
PRIVATE ${INCLUDE_DIRECTORIES}
)
target_link_libraries(${NAME} ${LINK_LIBRARIES})
add_test(NAME ${NAME} COMMAND ${NAME})
set_warning_levels_RWTH(${NAME})
Expand Down Expand Up @@ -83,13 +89,22 @@ function(ADD_TEST_CATCH)

# add test for each test source file
foreach(TEST_SOURCE_FILE ${ADD_TEST_CATCH_SOURCES})
get_filename_component(TEST_SUBDIR ${TEST_SOURCE_FILE} DIRECTORY)
STRING(REGEX REPLACE
"^${CMAKE_CURRENT_SOURCE_DIR}" ""
TEST_SUBDIR "${TEST_SUBDIR}"
)
STRING(REGEX REPLACE
"[/|\\]" "__"
TEST_SUBDIR "${TEST_SUBDIR}"
)
get_filename_component(TEST_NAME ${TEST_SOURCE_FILE} NAME_WE)
ADD_TEST_CATCH_INTERNAL_("${TEST_NAME}"
ADD_TEST_CATCH_INTERNAL_("${TEST_SUBDIR}__${TEST_NAME}"
"${TEST_SOURCE_FILE}"
""
"${ADD_TEST_CATCH_INCLUDE_DIRECTORIES}"
"${ADD_TEST_CATCH_LINK_LIBRARIES};${ADD_TEST_CATCH_NAME}_catch_main"
"${ADD_TEST_CATCH_PATH_TO_ADD}"
)
)
endforeach()
endfunction()
4 changes: 2 additions & 2 deletions cmake/cpplint.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-------------------------------------------------------------------------------
# nest in situ vis
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualisation Group.
#-------------------------------------------------------------------------------
# License
Expand All @@ -27,7 +27,7 @@ if(NOT PYTHON_EXECUTABLE)
CMake will not generate the project without it. ")
endif()

find_file(CPPLINT_COMMAND cpplint.py
find_file(CPPLINT_COMMAND cpplint.py cpplint
PATHS $ENV{PATH} $ENV{CPPLINT_DIR}
)
if(NOT CPPLINT_COMMAND)
Expand Down
2 changes: 1 addition & 1 deletion cmake/niv-config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-------------------------------------------------------------------------------
# nest in situ vis
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualisation Group.
#-------------------------------------------------------------------------------
# License
Expand Down
6 changes: 3 additions & 3 deletions cmake/py.test.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-------------------------------------------------------------------------------
# nest in situ vis
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualisation Group.
#-------------------------------------------------------------------------------
# License
Expand All @@ -27,15 +27,15 @@ if(NOT PYTHON_EXECUTABLE)
CMake will not generate the project without it. ")
endif()

find_file(PY_TEST_COMMAND py.test
find_file(PY_TEST_COMMAND py.test pytest
PATHS $ENV{PATH} $ENV{PY_TEST_DIR}
)
if(NOT PY_TEST_COMMAND)
message(SEND_ERROR
" ERROR: Could not find py.test.
Having py.test is a mandatory requirement.
CMake will not generate the project without it.
Add its location to the environments variables PATH or CPPLINT_DIR.")
Add its location to the environments variables PATH or PY_TEST_DIR.")
endif()

function(ADD_TEST_PY_TEST)
Expand Down
49 changes: 42 additions & 7 deletions cmake/suppress_warnings.hpp.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// nest in situ vis
//
// Copyright (c) 2017 RWTH Aachen University, Germany,
// Copyright (c) 2017-2018 RWTH Aachen University, Germany,
// Virtual Reality & Immersive Visualisation Group.
//------------------------------------------------------------------------------
// License
Expand All @@ -22,23 +22,58 @@
#ifndef NEST_IN_SITU_VIS_SUPPRESS_WARNINGS_
#define NEST_IN_SITU_VIS_SUPPRESS_WARNINGS_

// clang-format off
#if defined __clang__
#define SUPPRESS_WARNINGS_BEGIN \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wall\"") \
_Pragma("clang diagnostic ignored \"-Wextra\"") \
_Pragma("clang diagnostic ignored \"-Wc++98-compat-pedantic\"")
#define SUPPRESS_WARNINGS_BEGIN \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wall\"") \
_Pragma("clang diagnostic ignored \"-Wextra\"") \
_Pragma("clang diagnostic ignored \"-Wc++98-compat-pedantic\"") \
_Pragma("clang diagnostic ignored \"-Wundefined-func-template\"") \
_Pragma("clang diagnostic ignored \"-Wold-style-cast\"") \
_Pragma("clang diagnostic ignored \"-Wreserved-id-macro\"") \
_Pragma("clang diagnostic ignored \"-Wdocumentation-unknown-command\"") \
_Pragma("clang diagnostic ignored \"-Wdeprecated-dynamic-exception-spec\"") \
_Pragma("clang diagnostic ignored \"-Wpadded\"") \
_Pragma("clang diagnostic ignored \"-Wdocumentation\"") \
_Pragma("clang diagnostic ignored \"-Wswitch-enum\"") \
_Pragma("clang diagnostic ignored \"-Wextra-semi\"") \
_Pragma("clang diagnostic ignored \"-Wundef\"") \
_Pragma("clang diagnostic ignored \"-Wcovered-switch-default\"") \
_Pragma("clang diagnostic ignored \"-Wglobal-constructors\"") \
_Pragma("clang diagnostic ignored \"-Wdeprecated\"") \
_Pragma("clang diagnostic ignored \"-Wmissing-noreturn\"") \
_Pragma("clang diagnostic ignored \"-Wdouble-promotion\"") \
_Pragma("clang diagnostic ignored \"-Wdouble-promotion\"") \
_Pragma("clang diagnostic ignored \"-Wdisabled-macro-expansion\"") \
_Pragma("clang diagnostic ignored \"-Wsign-conversion\"") \
_Pragma("clang diagnostic ignored \"-Wcomma\"") \
_Pragma("clang diagnostic ignored \"-Wconversion\"") \
_Pragma("clang diagnostic ignored \"-Wshadow\"") \
_Pragma("clang diagnostic ignored \"-Wexit-time-destructors\"") \
_Pragma("clang diagnostic ignored \"-Wcast-align\"")
// clang-format on

#define SUPPRESS_WARNINGS_BEGIN_PADDED \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wpadded\"")

#define SUPPRESS_WARNINGS_END _Pragma("clang diagnostic pop")

#elif defined _MSC_VER
#define NOMINMAX
#define SUPPRESS_WARNINGS_BEGIN __pragma(warning(push, 0));
#define SUPPRESS_WARNINGS_BEGIN_PADDED

#define SUPPRESS_WARNINGS_END __pragma(warning(pop));

#elif defined __GNUC__
#define SUPPRESS_WARNINGS_BEGIN \
_Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wall\"") \
_Pragma("GCC diagnostic ignored \"-Wextra\"")
_Pragma("GCC diagnostic ignored \"-Wextra\"") \
_Pragma("GCC diagnostic ignored \"-Wunused-local-typedefs\"") \
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
#define SUPPRESS_WARNINGS_BEGIN_PADDED
#define SUPPRESS_WARNINGS_END _Pragma("GCC diagnostic pop")

#endif
Expand Down
3 changes: 2 additions & 1 deletion demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-------------------------------------------------------------------------------
# nest in situ vis
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualisation Group.
#-------------------------------------------------------------------------------
# License
Expand All @@ -20,3 +20,4 @@
#-------------------------------------------------------------------------------

add_subdirectory(nest_python_vis)
add_subdirectory(brunel_example)
39 changes: 39 additions & 0 deletions demo/brunel_example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#-------------------------------------------------------------------------------
# nest in situ vis
#
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualisation Group.
#-------------------------------------------------------------------------------
# License
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-------------------------------------------------------------------------------

set(NEST_PYTHON_VIS_SOURCE nest_python_vis.py)
set(NEST_SIM_SOURCE nest_sim.py)

if(NOT CMAKE_MAKE_PROGRAM STREQUAL "/usr/bin/xcodebuild")

file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/run_vis.sh
CONTENT "PYTHONPATH=$<TARGET_FILE_DIR:pyniv>:$<TARGET_FILE_DIR:pytest_utilities> ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${NEST_PYTHON_VIS_SOURCE}"
)

set(NEST_DIR
CACHE PATH "Path to installed nest")
file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/run_sim.sh
CONTENT
"source ${NEST_DIR}/bin/nest_vars.sh
PYTHONPATH=$<TARGET_FILE_DIR:pyniv>:$PYTHONPATH ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${NEST_SIM_SOURCE}"
)

endif()
Loading

0 comments on commit c7fe9ee

Please sign in to comment.