From faca16db3695e902656f74b402be567ee934633c Mon Sep 17 00:00:00 2001
From: sjunges <sebastian.junges@rwth-aachen.de>
Date: Mon, 15 Feb 2016 22:27:23 +0100
Subject: [PATCH] minor refactoring of cmakecode for inclusion of tbb

Former-commit-id: 51deceb9782472199064c317bb85ad8742242e7e
---
 CMakeLists.txt    | 19 ++++++-------------
 storm-config.h.in |  2 +-
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e985841e4..422ebf915 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -565,9 +565,6 @@ endif()
 ##
 #############################################################
 
-set(gtest_force_shared_crt ON)
-add_subdirectory("${PROJECT_SOURCE_DIR}/resources/3rdparty/gtest-1.7.0")
-
 #############################################################
 ##
 ##	Log4CPlus
@@ -597,20 +594,16 @@ set(TBB_INSTALL_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/tbb42_20140122_mer
 
 
 find_package(TBB)
-if (TBB_FOUND AND STORM_USE_INTELTBB)
-	link_directories(${TBB_LIBRARY_DIRS})
-	set(STORM_CPP_INTELTBB_DEF "define")
-else()
-	set(STORM_CPP_INTELTBB_DEF "undef")
-endif()
-
 
+set(STORM_HAVE_INTELTBB 0)
 if (TBB_FOUND)
-	message(STATUS "StoRM - Found Intel TBB with interface version ${TBB_INTERFACE_VERSION}.")
+        message(STATUS "StoRM - Found Intel TBB with interface version ${TBB_INTERFACE_VERSION}.")
 	if (STORM_USE_INTELTBB)
+                set(STORM_HAVE_INTELTBB 1)
 		message(STATUS "StoRM - Linking with Intel TBB in ${TBB_LIBRARY_DIRS}.")
-		include_directories(${TBB_INCLUDE_DIRS})
-		target_link_libraries(storm tbb tbbmalloc)
+                link_directories(${TBB_LIBRARY_DIRS})
+                include_directories(${TBB_INCLUDE_DIRS})
+                list(APPEND STORM_LINK_LIBRARIES tbb tbbmalloc)	
 	endif(STORM_USE_INTELTBB)
 endif(TBB_FOUND)
 
diff --git a/storm-config.h.in b/storm-config.h.in
index 7c845458f..ec45f1445 100644
--- a/storm-config.h.in
+++ b/storm-config.h.in
@@ -33,7 +33,7 @@
 #cmakedefine STORM_HAVE_MSAT
 
 // Whether Intel Threading Building Blocks are available and to be used (define/undef)
-#@STORM_CPP_INTELTBB_DEF@ STORM_HAVE_INTELTBB
+#cmakedefine STORM_HAVE_INTELTBB
 
 // Whether support for parametric systems should be enabled
 #cmakedefine PARAMETRIC_SYSTEMS