Skip to content

Commit

Permalink
Merge pull request #16 from wschenck/nestio
Browse files Browse the repository at this point in the history
Fix handling of sionlib defines within CMake system
  • Loading branch information
jougs committed Feb 4, 2019
2 parents 89fc900 + 8dfc45f commit 52f441e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@ if ( with-defines )
set( ALL_CXXFLAGS "${def} ${ALL_CXXFLAGS}" )
endforeach ()
endif ()
# add sionlib defines
foreach ( def ${SIONLIB_DEFINES} )
set( ALL_CFLAGS "${ALL_CFLAGS} ${def}" )
set( ALL_CXXFLAGS "${ALL_CXXFLAGS} ${def}" )
endforeach ()

# all libraries
set( ALL_LIBS
Expand All @@ -289,7 +294,8 @@ set( ALL_LIBS
"${LIBNEUROSIM_LIBRARIES}"
"${MUSIC_LIBRARIES}"
"${MPI_CXX_LIBRARIES}"
"${SIONLIB_LIBS}" )
"${SIONLIB_LIBRARIES}" )

if ( with-libraries )
set( ALL_LIBS "${ALL_LIBS};${with-libraries}" )
endif ()
Expand Down
2 changes: 2 additions & 0 deletions cmake/FindSIONlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ if ( NOT SIONLIB_CONFIG STREQUAL "SIONLIB_CONFIG-NOTFOUND" )
if ( "${def}" MATCHES "^-D.*" )
# add to defines
set( SIONLIB_DEFINES ${SIONLIB_DEFINES} "${def}" CACHE INTERNAL "cmake sucks" )
# add current definition at CMake level
add_definitions( "${def}" )
endif ()
endforeach ()
endif ()
Expand Down

0 comments on commit 52f441e

Please sign in to comment.