summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 14 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3db52bb..2f0a9a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,10 @@
PROJECT(XTrkCAD)
+enable_testing()
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/app)
+# additional CMake modules can be found here
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/")
# Setup high-level build options ...
IF(UNIX AND NOT APPLE)
@@ -71,6 +74,14 @@ IF(XTRKCAD_USE_PACKAGEMAKER)
ENDIF(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr")
ENDIF(XTRKCAD_USE_PACKAGEMAKER)
+# Find unit testing framework
+find_package(CMocka)
+if( CMOCKA_FOUND)
+ include_directories(${CMOCKA_INCLUDE_DIR})
+ set(LIBS ${LIBS} ${CMOCKA_LIBRARIES})
+ option( XTRKCAD_TESTING "Build unittests" ON)
+endif()
+
# Test for headers and libraries for portability ...
INCLUDE (CheckIncludeFiles)
@@ -78,9 +89,9 @@ CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)
# Setup some global options for installation ...
SET(XTRKCAD_MAJOR_VERSION "4")
-SET(XTRKCAD_MINOR_VERSION "2")
-SET(XTRKCAD_RELEASE_VERSION "4")
-SET(XTRKCAD_VERSION_MODIFIER "a")
+SET(XTRKCAD_MINOR_VERSION "3")
+SET(XTRKCAD_RELEASE_VERSION "0")
+SET(XTRKCAD_VERSION_MODIFIER "")
SET(XTRKCAD_VERSION "${XTRKCAD_MAJOR_VERSION}.${XTRKCAD_MINOR_VERSION}.${XTRKCAD_RELEASE_VERSION}${XTRKCAD_VERSION_MODIFIER}")
IF(WIN32)