[sword-svn] r3558 - in trunk: . tests/testsuite utilities utilities/diatheke

greg.hellings at crosswire.org greg.hellings at crosswire.org
Wed Jan 3 22:39:40 MST 2018


Author: greg.hellings
Date: 2018-01-03 22:39:39 -0700 (Wed, 03 Jan 2018)
New Revision: 3558

Added:
   trunk/utilities/diatheke/CMakeLists.txt
Modified:
   trunk/CMakeLists.txt
   trunk/tests/testsuite/CMakeLists.txt
   trunk/utilities/CMakeLists.txt
Log:
Enable CMake's tests target


Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt	2018-01-01 21:56:29 UTC (rev 3557)
+++ trunk/CMakeLists.txt	2018-01-04 05:39:39 UTC (rev 3558)
@@ -5,8 +5,8 @@
 #
 # NOTES: Defaults to build type of Shared
 #        Forces out-of-source tree build
-#        
 #
+#
 # This file started on 18 January 2010 by Gregory Hellings
 # It is ceded to The SWORD Library developers and CrossWire under the terms
 # of their own GPLv2 license and all copyright is transferred to them for
@@ -106,7 +106,7 @@
 	# same exact name.  In other systems, the .a and .so suffixes suffice
 	# to keep them separate
 	IF(NOT MSVC OR NOT LIBSWORD_LIBRARY_TYPE MATCHES ".*Shared.*")
-		SET_TARGET_PROPERTIES(sword_static PROPERTIES 
+		SET_TARGET_PROPERTIES(sword_static PROPERTIES
 			OUTPUT_NAME "sword")
 		#MESSAGE(STATUS "Building Static library with name sword")
 	ELSE(NOT MSVC OR NOT LIBSWORD_LIBRARY_TYPE MATCHES ".*Shared.*")
@@ -263,7 +263,7 @@
 #############################################################################################
 # Platform-specifc bits that I will eventually refactor out into their own files, once I am happy
 # with the stuff that is here.
-# 
+#
 IF(APPLE OR iPhone)
 	ADD_DEFINITIONS(-Dunix)
 ENDIF(APPLE OR iPhone)
@@ -281,7 +281,7 @@
 
 ##############################################################################################
 # Installing the library, headers, utilies, etc
-# 
+#
 
 INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/cmake/install.cmake")
 
@@ -295,7 +295,7 @@
 
 ##############################################################################################
 # Utilities are hawt
-# 
+#
 
 IF(NOT SWORD_BUILD_UTILS STREQUAL "No")
 	ADD_SUBDIRECTORY("${CMAKE_CURRENT_SOURCE_DIR}/utilities")
@@ -303,7 +303,7 @@
 
 ##############################################################################################
 # Demos are also hawt
-# 
+#
 
 IF(SWORD_BUILD_EXAMPLES STREQUAL "Yes")
 	ADD_SUBDIRECTORY("${CMAKE_CURRENT_SOURCE_DIR}/examples/cmdline")

Modified: trunk/tests/testsuite/CMakeLists.txt
===================================================================
--- trunk/tests/testsuite/CMakeLists.txt	2018-01-01 21:56:29 UTC (rev 3557)
+++ trunk/tests/testsuite/CMakeLists.txt	2018-01-04 05:39:39 UTC (rev 3558)
@@ -1,12 +1,12 @@
 #############################################################################
 # This file will actually be responsible for running the tests
-# 
+#
 
+FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/sword.conf" "[Install]\nLocalePath=${CMAKE_CURRENT_SOURCE_DIR}/../../")
+
 ADD_CUSTOM_TARGET(
 	tests_configure
-	COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_BINARY_DIR}
-	COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/*.good ${CMAKE_CURRENT_BINARY_DIR}
-	COMMAND echo \"[Install]\\nLocalePath=${CMAKE_CURRENT_SOURCE_DIR}/../../\" > ${CMAKE_CURRENT_BINARY_DIR}/sword.conf
+	COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/*.{sh,good,imp,txt,xml}" "${CMAKE_CURRENT_BINARY_DIR}"
 	DEPENDS ${test_PROGRAMS}
 	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )

Modified: trunk/utilities/CMakeLists.txt
===================================================================
--- trunk/utilities/CMakeLists.txt	2018-01-01 21:56:29 UTC (rev 3557)
+++ trunk/utilities/CMakeLists.txt	2018-01-04 05:39:39 UTC (rev 3558)
@@ -4,12 +4,12 @@
 # The general assumption is that each of these utilities is built from
 # a single source file, which shares its name with the utility itself (appended with .cpp),
 # and then linked against the SWORD library.
-# 
+#
 # This list will be built and installed, if so chosen
 #
 # These are in alphbetical order now - please keep them that way
 # if you edit this list in the future.
-# 
+#
 SET(install_UTILITIES
 	addld
 	emptyvss
@@ -35,7 +35,7 @@
 
 ######################################################################
 # These utilities will be built, but they will not be installed
-# 
+#
 # Again, I have gone to great lengths of travail to make this list
 # alphabetical.  If you add utilities to this list, please do so in a
 # way that maintains this.
@@ -53,7 +53,7 @@
 #####################################################################
 # This will loop over both of the above utility lists and add build targets
 # to the system for each one of them.
-# 
+#
 
 FOREACH(UTIL ${install_UTILITIES} ${noinstall_UTILITIES})
 	ADD_EXECUTABLE("${UTIL}"	"${UTIL}.cpp")
@@ -67,7 +67,7 @@
 ####################################################################
 # Just to be difficult, we have a single C file that is a utility
 # and, therefore, needs its own treatment.
-# 
+#
 
 ADD_EXECUTABLE(lexdump	lexdump.c)
 IF(BUILDING_SHARED)
@@ -84,7 +84,7 @@
 # is limited to CMake files in this directory and below, so rather than
 # replicate the above list in another place, we'll just handle our
 # own install, since this whole directory is optional, anyway.
-# 
+#
 FOREACH(UTIL ${install_UTILITIES})
 	INSTALL(TARGETS ${UTIL}
         RUNTIME DESTINATION "${BINDIR}"
@@ -92,27 +92,4 @@
 	)
 ENDFOREACH(UTIL ${install_UTILITIES})
 
-####################################################################
-# And, of course, diatheke is a beast unto itself
-#
-# Let's go!
-#
-ADD_EXECUTABLE(diatheke
-	diatheke/diatheke.cpp
-	diatheke/corediatheke.cpp
-	diatheke/diathekemgr.cpp
-	diatheke/diafiltmgr.cpp
-	diatheke/thmlcgi.cpp
-	diatheke/gbfcgi.cpp
-	diatheke/osiscgi.cpp
-)
-IF(BUILDING_SHARED)
-	TARGET_LINK_LIBRARIES(diatheke sword)
-ELSE(BUILDING_SHARED)
-	TARGET_LINK_LIBRARIES(diatheke sword_static)
-ENDIF(BUILDING_SHARED)
-INSTALL(TARGETS diatheke
-	DESTINATION "${BINDIR}"
-	COMPONENT utilities
-)
-
+ADD_SUBDIRECTORY("${CMAKE_CURRENT_SOURCE_DIR}/diatheke")

Added: trunk/utilities/diatheke/CMakeLists.txt
===================================================================
--- trunk/utilities/diatheke/CMakeLists.txt	                        (rev 0)
+++ trunk/utilities/diatheke/CMakeLists.txt	2018-01-04 05:39:39 UTC (rev 3558)
@@ -0,0 +1,24 @@
+####################################################################
+# And, of course, diatheke is a beast unto itself
+#
+# Let's go!
+#
+ADD_EXECUTABLE(diatheke
+	diatheke.cpp
+	corediatheke.cpp
+	diathekemgr.cpp
+	diafiltmgr.cpp
+	thmlcgi.cpp
+	gbfcgi.cpp
+	osiscgi.cpp
+)
+IF(BUILDING_SHARED)
+	TARGET_LINK_LIBRARIES(diatheke sword)
+ELSE(BUILDING_SHARED)
+	TARGET_LINK_LIBRARIES(diatheke sword_static)
+ENDIF(BUILDING_SHARED)
+INSTALL(TARGETS diatheke
+	DESTINATION "${BINDIR}"
+	COMPONENT utilities
+)
+




More information about the sword-cvs mailing list