Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 54074)
+++ CMakeLists.txt	(working copy)
@@ -13,10 +13,11 @@
   )
 
 #BRLCAD_ADDEXEC(test_density test_density.c "libanalyze;libbu" NO_INSTALL)
+add_subdirectory(tests)
 
 BRLCAD_ADDLIB(libanalyze "${LIBANALYZE_SOURCES}" "libbu;librt")
 SET_TARGET_PROPERTIES(libanalyze PROPERTIES VERSION 20.0.1 SOVERSION 20)
-CMAKEFILES(Makefile.am test_density.c)
+CMAKEFILES(Makefile.am)
 
 # Local Variables:
 # tab-width: 8
Index: test_density.c
===================================================================
--- test_density.c	(revision 54074)
+++ test_density.c	(working copy)
@@ -1,70 +0,0 @@
-/*                    T E S T _ D E N S I T Y . C
- * BRL-CAD
- *
- * Copyright (c) 2011-2012 United States Government as represented by
- * the U.S. Army Research Laboratory.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this file; see the file named COPYING for more
- * information.
- */
-
-#include "common.h"
-
-#include <sys/stat.h>
-#include "analyze.h"
-
-int
-main(int argc, char **argv)
-{
-  struct density_entry *densities = NULL;
-  static int num_densities = 1028;
-
-  struct stat sb;
-  FILE *fp = (FILE *)NULL;
-  char *buf = NULL;
-  int ret = 0;
-  int i;
-
-  if (argc < 2) {
-      bu_log("Error - please supply density file\n");
-      bu_exit(EXIT_FAILURE, NULL);
-  }
-
-  fp = fopen(argv[1], "rb");
-  if (fp == (FILE *)NULL) {
-      bu_log("Error - file %s not opened\n", argv[1]);
-      bu_exit(EXIT_FAILURE, NULL);
-  }
-
-  if (stat(argv[1], &sb)) {
-      bu_log("Error - file %s not stat successfully\n", argv[1]);
-      bu_exit(EXIT_FAILURE, NULL);
-  }
-
-  buf = bu_malloc(sb.st_size+1, "density buffer");
-  ret = fread(buf, sb.st_size, 1, fp);
-  if (ret != 1) {
-    bu_log("Error reading file %s\n", argv[1]);
-    bu_exit(EXIT_FAILURE, NULL);
-  }
-
-  densities = bu_calloc(num_densities, sizeof(struct density_entry), "density entries");
-
-  ret = parse_densities_buffer(buf, (unsigned long)sb.st_size, densities, NULL, &num_densities);
-
-  for (i = 0; i < num_densities; i++) {
-      if (densities[i].name)
-	  bu_log("densities[%i]: %s, %d\n", i, densities[i].name, densities[i].grams_per_cu_mm);
-  }
-
-}
Index: tests/CMakeLists.txt
===================================================================
--- tests/CMakeLists.txt	(revision 0)
+++ tests/CMakeLists.txt	(working copy)
@@ -0,0 +1,8 @@
+BRLCAD_ADDEXEC(tester_density density.c "libanalyze;libbu" NO_INSTALL LOCAL)
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8 textwidth=0 wrapmargin=0

Property changes on: tests/CMakeLists.txt
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: tests/density.c
===================================================================
--- tests/density.c	(revision 0)
+++ tests/density.c	(working copy)
@@ -0,0 +1,70 @@
+/*                    T E S T _ D E N S I T Y . C
+ * BRL-CAD
+ *
+ * Copyright (c) 2011-2012 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+
+#include "common.h"
+
+#include <sys/stat.h>
+#include "analyze.h"
+
+int
+main(int argc, char **argv)
+{
+  struct density_entry *densities = NULL;
+  static int num_densities = 1028;
+
+  struct stat sb;
+  FILE *fp = (FILE *)NULL;
+  char *buf = NULL;
+  int ret = 0;
+  int i;
+
+  if (argc < 2) {
+      bu_log("Error - please supply density file\n");
+      bu_exit(EXIT_FAILURE, NULL);
+  }
+
+  fp = fopen(argv[1], "rb");
+  if (fp == (FILE *)NULL) {
+      bu_log("Error - file %s not opened\n", argv[1]);
+      bu_exit(EXIT_FAILURE, NULL);
+  }
+
+  if (stat(argv[1], &sb)) {
+      bu_log("Error - file %s not stat successfully\n", argv[1]);
+      bu_exit(EXIT_FAILURE, NULL);
+  }
+
+  buf = bu_malloc(sb.st_size+1, "density buffer");
+  ret = fread(buf, sb.st_size, 1, fp);
+  if (ret != 1) {
+    bu_log("Error reading file %s\n", argv[1]);
+    bu_exit(EXIT_FAILURE, NULL);
+  }
+
+  densities = bu_calloc(num_densities, sizeof(struct density_entry), "density entries");
+
+  ret = parse_densities_buffer(buf, (unsigned long)sb.st_size, densities, NULL, &num_densities);
+
+  for (i = 0; i < num_densities; i++) {
+      if (densities[i].name)
+	  bu_log("densities[%i]: %s, %f\n", i, densities[i].name, densities[i].grams_per_cu_mm);
+  }
+
+}

Property changes on: tests/density.c
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
