From 27a4b74521084eafdce83e3d1e2a4959fac845a1 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Fri, 13 Jul 2018 16:01:00 +0200 Subject: [PATCH] Makefile: Do not run cmake if it has already been run --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 310d162..87264b1 100644 --- a/Makefile +++ b/Makefile @@ -21,9 +21,14 @@ CMAKE_OTPS_cufft = -DFFT=cuFFT CMAKE_OTPS_cufft_big = -DFFT=cuFFT -DBIG_BATCH=ON CMAKE_OTPS_cufft_big_openmp = -DFFT=cuFFT -DBIG_BATCH=ON -DOPENMP=ON -build-%/kcf_vot: $(shell git ls-files) +.SECONDARY: $(BUILDS:%=build-%/build.ninja) + +build-%/build.ninja: mkdir -p $(@D) cd $(@D) && cmake $(CMAKE_OPTS) $(CMAKE_OTPS_$*) .. + +.PHONY: FORCE +build-%/kcf_vot: build-%/build.ninja FORCE cmake --build $(@D) $(BUILDS): %: build-%/kcf_vot -- 2.39.2