Skip to content

Commit

Permalink
Pass GSL vars to make.
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed Apr 21, 2020
1 parent f97d2b2 commit d0bf14f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tools/stdhep-tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ foreach (stdhep_program_source ${stdhep_program_sources})
endforeach()

add_custom_command(OUTPUT ${stdhep_programs}
COMMAND make BIN=${STDHEP_TOOLS_BIN_DIR} SRC_DIR=${CMAKE_BINARY_DIR}/stdhep-tools-src/ STDHEP_DIR=${STDHEP_DIR}
COMMAND make BIN=${STDHEP_TOOLS_BIN_DIR} SRC_DIR=${CMAKE_BINARY_DIR}/stdhep-tools-src/ STDHEP_DIR=${STDHEP_DIR} GSL_INCLUDE_DIRS=${GSL_INCLUDE_DIRS} GSL_LIBRARY=${GSL_LIBRARY}
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/stdhep-tools-src"
DEPENDS "${CMAKE_BINARY_DIR}/stdhep-tools-src")

add_custom_target(stdhep_tools_build ALL DEPENDS ${stdhep_programs})

5 changes: 3 additions & 2 deletions tools/stdhep-tools/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
#STDHEP_DIR := $(SRC_DIR)/stdhep-5-06-01
STDHEP_C := $(STDHEP_DIR)/lib/libstdhepC.a
MCFIO := $(STDHEP_DIR)/lib/libFmcfio.a
LOADLIBS=-L$(STDHEP_DIR)/lib
LOADLIBS=-L$(STDHEP_DIR)/lib -L$(dir $(GSL_LIBRARY))
#LOADLIBS=-L/usr/local/lib/stdhep -L/afs/slac.stanford.edu/package/cernlib/@sys/cern/2002/lib
LDLIBS=-lstdhepC -lFmcfio -lgsl -lgslcblas
INCFILES=-I$(STDHEP_DIR)/src/inc -I$(SRC_DIR)
#-l$(GSL_CBLAS_LIBRARY) -l$(GSL_LIBRARY)
INCFILES=-I$(STDHEP_DIR)/src/inc -I$(SRC_DIR) -I$(GSL_INCLUDE_DIRS)
CPP=g++
CPPFLAGS=$(LOADLIBS) $(LDLIBS) -g -std=c++11
TARGETS := $(patsubst $(SRC_DIR)/%.cc,$(BIN)/%,$(wildcard $(SRC_DIR)/*.cc))
Expand Down

0 comments on commit d0bf14f

Please sign in to comment.