[cig-commits] [commit] devel, master: Correct definition of Fortran preprocessor macros. (ab8a7ce)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Thu Nov 6 08:20:43 PST 2014
Repository : https://github.com/geodynamics/specfem3d_globe
On branches: devel,master
Link : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f
>---------------------------------------------------------------
commit ab8a7ced6a36de9453eab7e8045ead27c9261991
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date: Sun Jun 1 22:48:47 2014 -0400
Correct definition of Fortran preprocessor macros.
We need to use FC_DEFINE, because the compiler option to define a macro
is not "-D" everywhere. Notable, IBM's xlf does not use it, but instead
"-WF,-D" and "-D" treats the name of the macro as a bunch of short
arguments, enabling completely unrelated options.
>---------------------------------------------------------------
ab8a7ced6a36de9453eab7e8045ead27c9261991
Makefile.in | 1 +
src/auxiliaries/rules.mk | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 7eda335..ad2ef05 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -31,6 +31,7 @@
FC = @FC@
FCFLAGS = #@FCFLAGS@
+FC_DEFINE = @FC_DEFINE@
MPIFC = @MPIFC@
MPILIBS = @MPILIBS@
diff --git a/src/auxiliaries/rules.mk b/src/auxiliaries/rules.mk
index cb1d2e6..1b685a9 100644
--- a/src/auxiliaries/rules.mk
+++ b/src/auxiliaries/rules.mk
@@ -157,10 +157,10 @@ $O/%.auxsolver.o: $S/%.F90 ${OUTPUT}/values_from_mesher.h $O/shared_par.shared_m
${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $<
$O/%.auxsolver_vtk.o: $S/%.F90 ${OUTPUT}/values_from_mesher.h $O/shared_par.shared_module.o
- ${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< -DUSE_VTK_INSTEAD_OF_MESH
+ ${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< $(FC_DEFINE)USE_VTK_INSTEAD_OF_MESH
$O/%.auxadios.o: $S/%.F90 ${OUTPUT}/values_from_mesher.h $O/shared_par.shared_module.o
- ${MPIFCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< -DADIOS_INPUT
+ ${MPIFCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< $(FC_DEFINE)ADIOS_INPUT
$O/%.auxadios_vtk.o: $S/%.F90 ${OUTPUT}/values_from_mesher.h $O/shared_par.shared_module.o
- ${MPIFCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< -DADIOS_INPUT -DUSE_VTK_INSTEAD_OF_MESH
+ ${MPIFCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< $(FC_DEFINE)ADIOS_INPUT $(FC_DEFINE)USE_VTK_INSTEAD_OF_MESH
More information about the CIG-COMMITS
mailing list