diff options
Diffstat (limited to 'src/tests/CMakeLists.txt')
-rw-r--r-- | src/tests/CMakeLists.txt | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 6320769..303035e 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -12,7 +12,10 @@ configure_file(${TRAJECTORY_SOURCE_DIR}/include/tng_io_testing.h.in ${CMAKE_BINA include_directories(${CMAKE_BINARY_DIR}/generated/) add_executable(tng_testing tng_io_testing.c) -target_link_libraries(tng_testing tng_io m) +target_link_libraries(tng_testing tng_io) +if(UNIX) +target_link_libraries(tng_testing m) +endif() if(HAVE_INTTYPES_H) set_target_properties(tng_testing PROPERTIES COMPILE_DEFINITIONS USE_STD_INTTYPES_H=1) @@ -20,14 +23,23 @@ endif() if(OPENMP_FOUND) add_executable(md_openmp md_openmp.c) - target_link_libraries(md_openmp tng_io ${OpenMP_LIBS} m) + target_link_libraries(md_openmp tng_io ${OpenMP_LIBS}) + if(UNIX) + target_link_libraries(md_openmp m) + endif() endif() add_executable(tng_io_read_pos tng_io_read_pos.c) -target_link_libraries(tng_io_read_pos tng_io m) +target_link_libraries(tng_io_read_pos tng_io) +if(UNIX) +target_link_libraries(tng_io_read_pos m) +endif() add_executable(tng_parallel_read tng_parallel_read.c) -target_link_libraries(tng_parallel_read tng_io m) +target_link_libraries(tng_parallel_read tng_io) +if(UNIX) +target_link_libraries(tng_parallel_read m) +endif() if(BUILD_FORTRAN) # This does not work due to a bug in CMake. Remove lines below if no fortran compiler is found. |