commit 7b498bcd8e549ee40a4c682a3c5dee1bb821c6ed
Author: David Sorber <david.sorber@gmail.com>
Date:   Mon Sep 10 19:52:17 2018 -0400

    Reformat CMakeLists.txt, use gold linker, reformat several error
    messages to remove extra double quotes, and confirm path is regular file
    before adding to the input file list.

diff --git a/software/photo_compress_archiver/CMakeLists.txt b/software/photo_compress_archiver/CMakeLists.txt
index d2e16dc..58cd5ff 100644
--- a/software/photo_compress_archiver/CMakeLists.txt
+++ b/software/photo_compress_archiver/CMakeLists.txt
@@ -1,37 +1,38 @@
-project("Photo Compress Archiver")
-cmake_minimum_required(VERSION 3.2)
+PROJECT("Photo Compress Archiver")
+CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
 
-set(CMAKE_CXX_STANDARD 11)
+SET(CMAKE_CXX_STANDARD 11)
 
-include_directories(.)
-include_directories(/usr/include/)
+INCLUDE_DIRECTORIES(.)
+INCLUDE_DIRECTORIES(/usr/include/)
 
-set(EXTERNAL_LIBS)
+SET(EXTERNAL_LIBS)
 
-find_package(Threads)
+FIND_PACKAGE(Threads)
 
-find_package(Boost 1.58.0 COMPONENTS system regex program_options filesystem REQUIRED)
-if (Boost_FOUND)
-   include_directories(${Boost_INCLUDE_DIRS})
-   set(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${Boost_LIBRARIES})
-endif()
+FIND_PACKAGE(Boost 1.58.0 COMPONENTS system regex program_options filesystem REQUIRED)
+IF (Boost_FOUND)
+   INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+   SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${Boost_LIBRARIES})
+ENDIF()
 
 # NOTE: PCA now uses the libpackjpg that I created instead of the executable
 # Not sure why this is required... but doesn't seem to work otherwise
 SET(LIBPACKJPG)
-find_library(LIBPACKJPG packjpg REQUIRED)
+FIND_LIBRARY(LIBPACKJPG packjpg REQUIRED)
 #~ message(STATUS LIBPACKJPG: ${LIBPACKJPG})
-set(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${LIBPACKJPG})
+SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${LIBPACKJPG})
 #~ message(STATUS LIBS: ${EXTERNAL_LIBS})
 
 # PCA sources
-set(pca_sources
+SET(pca_sources
     ../PhotoCompressArchiver.cc
 )
 
 # Build the PCA executable
-add_definitions("-std=c++11 -g -O3 -march=native")
-add_executable(pca
+#~ ADD_DEFINITIONS("-std=c++11 -g -O3 -march=native")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -O3 -march=native -fuse-ld=gold")
+ADD_EXECUTABLE(pca
     ${pca_sources}
     ../main.cc)
-target_link_libraries(pca ${CMAKE_THREAD_LIBS_INIT} ${EXTERNAL_LIBS} stdc++fs)
+TARGET_LINK_LIBRARIES(pca ${CMAKE_THREAD_LIBS_INIT} ${EXTERNAL_LIBS} stdc++fs)
diff --git a/software/photo_compress_archiver/PhotoCompressArchiver.cc b/software/photo_compress_archiver/PhotoCompressArchiver.cc
index 52a4549..a5a5961 100644
--- a/software/photo_compress_archiver/PhotoCompressArchiver.cc
+++ b/software/photo_compress_archiver/PhotoCompressArchiver.cc
@@ -219,7 +219,8 @@ void PhotoCompressArchiver::find_files(
             // Found directory recurse
             find_files(dir_iter->path(), file_regex);
         }
-        else if (boost::regex_match(dir_iter->path().filename().string(), file_regex))
+        else if (boost::regex_match(dir_iter->path().filename().string(), file_regex) &&
+                 bfs::is_regular_file(dir_iter->path()))
         {
             // Found file match
             
@@ -280,8 +281,7 @@ void PhotoCompressArchiver::worker_thread_body(uint32_t tid)
                                    std::ios::binary | std::ios::in);
         if (! input_stream)
         {
-            WRKR_OUT_ERR("unable to read from \"" << work_unit->m_path 
-                          << "\"\n")
+            WRKR_OUT_ERR("unable to read from " << work_unit->m_path << "\n")
             m_errors.push_back(work_unit);
             continue;
         }
@@ -302,8 +302,8 @@ void PhotoCompressArchiver::worker_thread_body(uint32_t tid)
             }
             else
             {
-                WRKR_OUT_ERR("the input file \""  << work_unit->m_path 
-                              << "\" does not appear to be a valid "
+                WRKR_OUT_ERR("the input file "  << work_unit->m_path
+                              << " does not appear to be a valid "
                              "packjpg (.pjg) file even though its filename "
                              "suggests it is!")
                 m_errors.push_back(work_unit);
@@ -319,8 +319,8 @@ void PhotoCompressArchiver::worker_thread_body(uint32_t tid)
             }
             else
             {
-                WRKR_OUT_ERR("the input file \""  << work_unit->m_path 
-                              << "\" does not appear to be a valid "
+                WRKR_OUT_ERR("the input file "  << work_unit->m_path
+                              << " does not appear to be a valid "
                              "JPEG (.jpg) file even though its filename "
                              "suggests it is!")
                 m_errors.push_back(work_unit);
diff --git a/software/photo_compress_archiver/PhotoCompressArchiver.hh b/software/photo_compress_archiver/PhotoCompressArchiver.hh
index 984cb2f..7e1e7a5 100644
--- a/software/photo_compress_archiver/PhotoCompressArchiver.hh
+++ b/software/photo_compress_archiver/PhotoCompressArchiver.hh
@@ -24,7 +24,7 @@ const std::string RED("\033[31m");
 const std::string YELLOW("\033[33m");
 const std::string PURPLE("\033[35m");
 
-const std::string version("v0.3.3");
+const std::string version("v0.3.4");
 
 const boost::regex JPEG_REGEX("^.+\\.(jpg)|(jpeg)$", boost::regex::icase);
 const boost::regex PJG_REGEX("^.+\\.pjg$", boost::regex::icase);
