File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
GEOSwgcm_GridComp/GEOSwavewatch_GridComp/ww3_multi_esmf Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -73,18 +73,25 @@ set (WW3_path ${CMAKE_CURRENT_SOURCE_DIR}/${WW3_rel_path})
7373get_filename_component (aux_dir ${WW3_path} /model/aux ABSOLUTE )
7474get_filename_component (ftn_dir ${WW3_path} /model/ftn ABSOLUTE )
7575
76- message (STATUS "WW3 aux_dir ${aux_dir} " )
77- message (STATUS "WW3 ftn_dir ${ftn_dir} " )
76+ message (DEBUG "WW3 aux_dir ${aux_dir} " )
77+ message (DEBUG "WW3 ftn_dir ${ftn_dir} " )
7878
7979add_executable (w3adc "${aux_dir} /w3adc.f" )
8080
8181set (WW3ESMF_F90)
8282foreach (src_file ${WW3ESMF_FTN} )
8383 STRING (REGEX REPLACE ".ftn" ".F90" gen_src_file ${src_file} )
8484 STRING (REGEX REPLACE "/" "_" gen_log_file ${gen_src_file} )
85+ # Testing shows that we only want BYPRODUCTS here if our CMAKE_GENERATOR is Unix Makefiles
86+ # If we use Ninja, we don't want BYPRODUCTS
87+ if (CMAKE_GENERATOR STREQUAL "Unix Makefiles" )
88+ set (BYPRODUCTS ${gen_src_file} )
89+ else ()
90+ set (BYPRODUCTS "" )
91+ endif ()
8592 add_custom_command (
8693 OUTPUT ${gen_src_file}
87- BYPRODUCTS ${gen_src_file }
94+ BYPRODUCTS ${BYPRODUCTS }
8895 DEPENDS w3adc ${ftn_dir} /${src_file}
8996 COMMAND ${CMAKE_CURRENT_SOURCE_DIR} /run_w3adc.sh ${ftn_dir} ${src_file} > ${gen_log_file} .w3adc.log 2>&1
9097 COMMENT "Running w3adc ${src_file} " )
You can’t perform that action at this time.
0 commit comments