diff --git a/FORTRAN/CMakeLists.txt b/FORTRAN/CMakeLists.txt index 064c7d45..b2d7f4fa 100644 --- a/FORTRAN/CMakeLists.txt +++ b/FORTRAN/CMakeLists.txt @@ -1,6 +1,6 @@ # include the paths for header files +include_directories(${CMAKE_BINARY_DIR}/FORTRAN) include_directories(${SuperLU_SOURCE_DIR}/SRC) -include_directories(${SuperLU_BINARY_DIR}/FORTRAN) # build examples for target "all" only if enable_examples is set if(NOT enable_examples) @@ -52,7 +52,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN *.mod ) -install(FILES superlu_config.fh +install(FILES ${CMAKE_BINARY_DIR}/FORTRAN/superlu_config.fh DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) @@ -92,10 +92,9 @@ endif() # enable_example # Format superlu_config.fh from superlu_config.h in C add_custom_command( - OUTPUT superlu_config.fh - COMMAND sed;'/^\\//;d';<;superlu_config.h;>;temp.fh + OUTPUT ${CMAKE_BINARY_DIR}/FORTRAN/superlu_config.fh + COMMAND sed;'s/\\/.*$$//';<;superlu_config.h;>;temp.fh COMMAND sed;'/typedef/;d';<;temp.fh;>;superlu_config.fh - COMMAND cp;superlu_config.fh;${SuperLU_SOURCE_DIR}/FORTRAN/. WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/FORTRAN ) -add_custom_target(config_f DEPENDS superlu_config.fh) +add_custom_target(config_f DEPENDS ${CMAKE_BINARY_DIR}/FORTRAN/superlu_config.fh) diff --git a/FORTRAN/Makefile b/FORTRAN/Makefile index 50077c0f..35fec081 100644 --- a/FORTRAN/Makefile +++ b/FORTRAN/Makefile @@ -19,6 +19,11 @@ ZFEXMOBJ = z_f_main.o zhbcode1.o c_fortran_zgssv.o all: dfexm zfexm test_omp +superlu_config.fh: ../SRC/superlu_config.h + sed 's/\/.*$$//' < $< > temp.fh + sed '/typedef/ d' < temp.fh > $@ + rm temp.fh + dfexm: $(DFEXMOBJ) $(SUPERLULIB) $(FORTRAN) $(LOADOPTS) $(DFEXMOBJ) $(LIBS) -o $@ diff --git a/FORTRAN/superlu_config.fh b/FORTRAN/superlu_config.fh deleted file mode 100644 index 0f99068e..00000000 --- a/FORTRAN/superlu_config.fh +++ /dev/null @@ -1,15 +0,0 @@ - -#ifndef SUPERLU_CONFIG_H -#define SUPERLU_CONFIG_H - - - - -#if (XSDK_INDEX_SIZE == 64) -#include -#define _LONGINT 1 -#else -#endif - -#endif /* SUPERLU_CONFIG_H */ -