Skip to content

Commit

Permalink
fixed error in cmake for shared library build
Browse files Browse the repository at this point in the history
  • Loading branch information
rikigigi committed Mar 15, 2021
1 parent 2cb23a4 commit 3c28023
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
17 changes: 11 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,22 @@ if (BUILD_TESTS)
add_library(test_fixtures INTERFACE)
target_include_directories(test_fixtures INTERFACE tests/src/)
add_executable(test_sh tests/src/test_sh.cpp)
target_link_libraries(test_sh ${PROJECT_NAME}_lib boost test_fixtures)
if (SYSTEM_BOOST)
set(BOOST_LIB "")
else()
set(BOOST_LIB boost)
endif()
target_link_libraries(test_sh ${PROJECT_NAME}_lib ${BOOST_LIB} test_fixtures)
add_executable(test_2loop tests/src/test_double_loop_splitter.cpp)
target_link_libraries(test_2loop ${PROJECT_NAME}_lib boost test_fixtures)
target_link_libraries(test_2loop ${PROJECT_NAME}_lib ${BOOST_LIB} test_fixtures)
add_executable(test_calcBuffer tests/src/test_calc_buffer.cpp)
target_link_libraries(test_calcBuffer ${PROJECT_NAME}_lib boost test_fixtures)
target_link_libraries(test_calcBuffer ${PROJECT_NAME}_lib ${BOOST_LIB} test_fixtures)
add_executable(test_gk tests/src/test_gk.cpp)
target_link_libraries(test_gk ${PROJECT_NAME}_lib boost test_fixtures)
target_link_libraries(test_gk ${PROJECT_NAME}_lib ${BOOST_LIB} test_fixtures)
add_executable(test_ph tests/src/test_position_histogram.cpp)
target_link_libraries(test_ph ${PROJECT_NAME}_lib boost test_fixtures)
target_link_libraries(test_ph ${PROJECT_NAME}_lib ${BOOST_LIB} test_fixtures)
add_executable(test_lammps2020 tests/src/test_lammps2020.cpp)
target_link_libraries(test_lammps2020 ${PROJECT_NAME}_lib boost test_fixtures)
target_link_libraries(test_lammps2020 ${PROJECT_NAME}_lib ${BOOST_LIB} test_fixtures)

enable_testing()
add_test(NAME sh COMMAND test_sh)
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ make test
## additional cmake options

- `-DBUILD_TESTS=OFF` skips the building of the C++ tests
- `-DSYSTEM_FFTW3=ON` try to detect system's FFTW3 library
- `-DSYSTEM_FFTW3=ON` use system's FFTW3 library
- `-DSYSTEM_EIGEN3=ON` use installed system's eigen3 library
- `-DSYSTEM_BOOST=ON` use detected system's boost library
- `-DSYSTEM_XDRFILE` use detected system's xdrfile library
- `-DPYTHON_EXECUTABLE=/path/to/python` use this python installation to build the python interface
- `-DPYTHON_INTERFACE=OFF` don't build any python interface (the building process will not depend on python)

Expand Down
2 changes: 1 addition & 1 deletion config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const static char * _info_msg=
#ifdef XDR_FILE
"\nWith gromacs XDR file conversion support"
#endif
"\nv0.1.9"
"\nv0.1.10"
;


Expand Down

0 comments on commit 3c28023

Please sign in to comment.