Skip to content

Commit

Permalink
teca_detect_nodes: add_custom_target to build tempestextremes
Browse files Browse the repository at this point in the history
  • Loading branch information
amandasd committed Mar 10, 2023
1 parent 9c81e55 commit bbe3659
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 53 deletions.
9 changes: 8 additions & 1 deletion alg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,14 @@ endif()

add_library(teca_alg ${teca_alg_cxx_srcs} ${teca_alg_cuda_srcs} ${teca_alg_f90_srcs})

target_link_libraries(teca_alg teca_data teca_core ${teca_alg_link} "${CMAKE_SOURCE_DIR}/alg/third_party/tempestextremes/src/base/libextremesbase.a" "${CMAKE_SOURCE_DIR}/alg/third_party/tempestextremes/src/netcdf-cxx-4.2/libnetcdf_c++.a" ${NETCDF_LIBRARIES})
add_custom_target(tempestextremes
COMMAND make BUILDTEDIR=${CMAKE_BINARY_DIR}/tempestextremes -f ${CMAKE_SOURCE_DIR}/alg/third_party/tempestextremes/Makefile
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/alg/third_party/tempestextremes
COMMENT "Building target tempestextremes")

add_dependencies(teca_alg tempestextremes)

target_link_libraries(teca_alg teca_data teca_core ${teca_alg_link} "${CMAKE_BINARY_DIR}/tempestextremes/libextremesbase.a" "${CMAKE_BINARY_DIR}/tempestextremes/libnetcdf_c++.a" ${NETCDF_LIBRARIES})

target_include_directories(teca_alg
INTERFACE
Expand Down
46 changes: 0 additions & 46 deletions alg/third_party/tempestextremes/Make.defs

This file was deleted.

4 changes: 2 additions & 2 deletions alg/third_party/tempestextremes/mk/rules.make
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Rules for compiling object files

# Compilation directories
DEPDIR= $(CURDIR)/depend
BUILDDIR= $(CURDIR)/build
DEPDIR= $(BUILDTEDIR)/$(CURDIR)/depend
BUILDDIR= $(BUILDTEDIR)/$(CURDIR)/build

# Dependency file construction
MAKEDEPENDCPP= \
Expand Down
4 changes: 2 additions & 2 deletions alg/third_party/tempestextremes/src/base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ FILES= SimpleGrid.cpp \
MeshUtilities.cpp


LIB_TARGET= libextremesbase.a
LIB_TARGET= $(BUILDTEDIR)/libextremesbase.a

.PHONY: all clean

Expand All @@ -38,7 +38,7 @@ all: $(LIB_TARGET)

$(LIB_TARGET): $(FILES:%.cpp=$(BUILDDIR)/%.o)
rm -f $(LIB_TARGET)
ar -cqs $(LIB_TARGET) build/*.o
ar -cqs $(LIB_TARGET) $(BUILDDIR)/*.o

# Clean rules.
clean:
Expand Down
4 changes: 2 additions & 2 deletions alg/third_party/tempestextremes/src/netcdf-cxx-4.2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include $(TEMPESTEXTREMESDIR)/mk/framework.make

FILES= ncvalues.cpp netcdf.cpp

LIB_TARGET= libnetcdf_c++.a
LIB_TARGET= $(BUILDTEDIR)/libnetcdf_c++.a

.PHONY: all clean

Expand All @@ -21,7 +21,7 @@ all: $(LIB_TARGET)

$(LIB_TARGET): $(FILES:%.cpp=$(BUILDDIR)/%.o)
rm -f $(LIB_TARGET)
ar -cqs $(LIB_TARGET) build/*.o
ar -cqs $(LIB_TARGET) $(BUILDDIR)/*.o

# Clean rules.
clean:
Expand Down

0 comments on commit bbe3659

Please sign in to comment.