File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -127,20 +127,18 @@ if (BUILD_STATIC_LIBS)
127127endif  ()
128128
129129#----------------------------------------------------------------------------- 
130- if (CMAKE_CROSSCOMPILING  AND  CMAKE_C_COMPILER_FOR_BUILD)
131-     add_executable  (H5match_types
132-         ${HDF5_F90_BINARY_DIR} /H5fort_type_defines.h
133-         ${HDF5_F90_SRC_SOURCE_DIR} /H5match_types.c
134-     )
135-     set_target_properties (H5match_types PROPERTIES
136-         C_COMPILER ${CMAKE_C_COMPILER_FOR_BUILD} 
137-     )
138-     message (STATUS  "Using build compiler ${CMAKE_C_COMPILER_FOR_BUILD}  for H5match_types" )
139- else ()
140-     add_executable  (H5match_types
141-         ${HDF5_F90_BINARY_DIR} /H5fort_type_defines.h
142-         ${HDF5_F90_SRC_SOURCE_DIR} /H5match_types.c
143-     )
130+ add_executable  (H5match_types
131+     ${HDF5_F90_BINARY_DIR} /H5fort_type_defines.h
132+     ${HDF5_F90_SRC_SOURCE_DIR} /H5match_types.c
133+ )
134+ if (CMAKE_CROSSCOMPILING )
135+     set (H5MATCH_TYPES_COMPILER "$ENV{H5MATCH_TYPES_COMPILER} "  CACHE  STRING  "compiler for build system" )
136+     if  (H5MATCH_TYPES_COMPILER)
137+       set_target_properties (H5match_types PROPERTIES
138+           C_COMPILER ${H5MATCH_TYPES_COMPILER} 
139+       )
140+       message (STATUS  "Using build compiler ${H5MATCH_TYPES_COMPILER}  for H5match_types" )
141+     endif ()
144142endif ()
145143target_include_directories  (H5match_types PRIVATE  "${HDF5_SRC_BINARY_DIR} ;${HDF5_SRC_INCLUDE_DIRS} ;${HDF5_F90_BINARY_DIR} ;$<$<BOOL:${HDF5_ENABLE_PARALLEL} >:${MPI_C_INCLUDE_DIRS} >" )
146144
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments