diff options
author | Magnus Lundborg <magnus.lundborg@scilifelab.se> | 2013-01-10 11:49:42 (GMT) |
---|---|---|
committer | Magnus Lundborg <magnus.lundborg@scilifelab.se> | 2013-01-10 11:49:42 (GMT) |
commit | 088a18f59edd690db51e80160a8d0b4f931dc18d (patch) | |
tree | 038093cb464e110e65e962a152345c3959cd3ed5 /src/tests/CMakeLists.txt | |
parent | c81664ad1691d02a4c331b461733cbed8f02de0d (diff) |
Fixes to make the fortran md simulation example work.
Diffstat (limited to 'src/tests/CMakeLists.txt')
-rw-r--r-- | src/tests/CMakeLists.txt | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 5ab5a55..aa0289d 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -19,12 +19,12 @@ target_link_libraries(md_openmp tng_io ${OpenMP_LIBS} m) add_executable(tng_io_read_pos tng_io_read_pos.c) target_link_libraries(tng_io_read_pos tng_io) -# enable_language(Fortran OPTIONAL) -# if(${CMAKE_Fortran_COMPILER_WORKS}) -# get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME) -# if (Fortran_COMPILER_NAME STREQUAL "gfortran") -# set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fcray-pointer ${OpenMP_C_FLAGS} -std=legacy") -# endif() -# add_executable(md_openmp_f md_openmp.f) -# target_link_libraries(md_openmp_f tng_io ${OpenMP_LIBS}) -# endif() +enable_language(Fortran OPTIONAL) +if(${CMAKE_Fortran_COMPILER_WORKS}) + get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME) + if (Fortran_COMPILER_NAME STREQUAL "gfortran") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fcray-pointer ${OpenMP_C_FLAGS} -std=legacy") + endif() + add_executable(md_openmp_f md_openmp.f) + target_link_libraries(md_openmp_f tng_io ${OpenMP_LIBS}) +endif() |