/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Gustav Hartvigsson
  • Date: 2016-02-01 14:29:35 UTC
  • mfrom: (121.1.4 simpletypesystem_gc)
  • Revision ID: gustav.hartvigsson@gmail.com-20160201142935-tz7ef63id2g3yfof
* Merged GC branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
cmake_minimum_required (VERSION 2.8)
2
2
project(SuperSimpleTypeSystem)
3
3
 
4
 
option (DEBUG "Enable debug flags and macros in project" TRUE)
 
4
# Set so it finds the cmake directory.
 
5
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
 
6
 
 
7
option (DEBUG "Enable debug flags and macros in project." ON)
 
8
option (S_USE_GC "Enable/disable the LibGC garbage colletor." FALSE)
5
9
 
6
10
find_package (Threads REQUIRED)
 
11
if (S_USE_GC)
 
12
  find_package (GC REQUIRED)
 
13
endif ()
7
14
 
8
15
if (CMAKE_USE_WIN32_THREADS_INIT)
9
16
  set (HAVE_MTHREAD ON)
70
77
 
71
78
set_target_properties (ssts PROPERTIES COMPILE_DEFINITIONS "SSTS_BUILDING=1")
72
79
 
 
80
# If we found the GC...
 
81
if (S_USE_GC)
 
82
  if (BOEHM_GC_FOUND)
 
83
    target_include_directories (ssts PUBLIC ${BOEHM_GC_INCLUDE_DIR})
 
84
    target_link_libraries (ssts PUBLIC ${BOEHM_GC_LIBRARIES})
 
85
  endif ()
 
86
endif ()
 
87
 
73
88
enable_testing()
74
89
add_test (test tests/ssts_test )
75
90
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --extra-verbose)