Flexible I/O Tester development
 help / color / mirror / Atom feed
* build from cmake
@ 2014-06-09 20:51 George Dowding
  2014-06-10  2:04 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: George Dowding @ 2014-06-09 20:51 UTC (permalink / raw)
  To: fio

[-- Attachment #1: Type: text/plain, Size: 696 bytes --]

I spent a few hours on this. Might save someone else some time.

I'm working in a larger project that uses cmake for its builds. cmake
supports adding external projects using the ExternalProject_Add
function.

But, there is some issue in the fio Makefile that causes a problem
when run from cmake. I could never reproduce it from the command line.

I was able to get the build to happen by changing the implicit rule
.c.o to use pattern notation. Not sure if this will work in all cases
or has other side effects.

Without this change, I was getting this error.

make[4]: *** No rule to make target `gettime.o', needed by `fio'.  Stop.


-- 
George Dowding
http://www.nutanix.com/
(669) 200 6682

[-- Attachment #2: cmake.patch --]
[-- Type: application/octet-stream, Size: 358 bytes --]

diff --git a/Makefile b/Makefile
index a0f0f71..0321a6d 100644
--- a/Makefile
+++ b/Makefile
@@ -213,7 +213,7 @@ FIO-VERSION-FILE: FORCE
 
 override CFLAGS += -DFIO_VERSION='"$(FIO_VERSION)"'
 
-.c.o: FORCE FIO-VERSION-FILE
+%.o : %.c
 	$(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $<
 	@$(CC) -MM $(CFLAGS) $(CPPFLAGS) $*.c > $*.d
 	@mv -f $*.d $*.d.tmp

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-10  2:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-09 20:51 build from cmake George Dowding
2014-06-10  2:04 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox