- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have used the fpp to provide a templating mechanism for some sorting subroutine - code snippet at the end. The problem is that everytime I build the project the code is recompiled. It seems that the default dependencies are not correct but I don't know where or how I should change them. If I were writing a Makefile I would write something like:
qsort_m.obj: qsort_m.f90
ifort -o qsort_m.obj -fpp qsort_m.f90
qsort_m.f90: qsort_m.fi
So how do I change the default dependencies in the vfproj file?
Thanks,
Simon
Code
qsort_m.f90
[fortran]
module qsort_m
use iso_fortran_env
implicit none
interface qsort
module procedure qsort_i2
module procedure qsort_i4
end interface
contains
#define TEMPLATE_TYPE integer(int16)
#define TEMPLATE_NAME(x) x ## _i2
#include 'qsort_m.fi'
#undef TEMPLATE_TYPE
#undef TEMPLATE_NAME
#define TEMPLATE_TYPE integer(int32)
#define TEMPLATE_NAME(x) x ## _i4
#include 'qsort_m.fi'
#undef TEMPLATE_TYPE
#undef TEMPLATE_NAME
end module qsort_m
[/fortran]
qsort_m.fi
[fortran]
#ifndef TEMPLATE_TYPE
#error "No TEMPLATE_TYPE defined - you can't use this code on its own, it has to be included in a module"
#endif
#ifndef TEMPLATE_NAME
#error "No TEMPLATE_NAME defined - you can't use this code on its own, it has to be included in a module"
#endif
subroutine TEMPLATE_NAME(qsort)(a, perm)
!DEC$ ATTRIBUTES DLLEXPORT::TEMPLATE_NAME(qsort)
TEMPLATE_TYPE, intent(inout) :: a(:)
integer, intent(inout), optional :: perm(:)
call TEMPLATE_NAME(qsort)_i(a, 1, perm)
end subroutine TEMPLATE_NAME(qsort)
[/fortran]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page