From 4cc8442b770beefbf77df899b9662296f495ffe8 Mon Sep 17 00:00:00 2001
From: sjunges <sebastian.junges@rwth-aachen.de>
Date: Sat, 13 Feb 2016 01:24:44 +0100
Subject: [PATCH 1/7] Fixed warning about superfluous semicolon after a method
 def.

Former-commit-id: 22fa68a4059498480de59477d5cc00371c18e217
---
 src/storage/prism/Program.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/storage/prism/Program.cpp b/src/storage/prism/Program.cpp
index 7947b4c78..bf8caf4a8 100644
--- a/src/storage/prism/Program.cpp
+++ b/src/storage/prism/Program.cpp
@@ -1217,7 +1217,7 @@ namespace storm {
             }
             return res;
 
-        };
+        }
         
         Command Program::synchronizeCommands(uint_fast64_t newCommandIndex, uint_fast64_t actionIndex, uint_fast64_t firstUpdateIndex, std::string const& actionName, std::vector<std::reference_wrapper<Command const>> const& commands) const {
             // To construct the synchronous product of the commands, we need to store a list of its updates.

From f20d479328f9f53461ecd6294dc91c485b44d114 Mon Sep 17 00:00:00 2001
From: sjunges <sebastian.junges@rwth-aachen.de>
Date: Mon, 15 Feb 2016 17:51:57 +0100
Subject: [PATCH 2/7] we dont need log4cplus tests and logging server

Former-commit-id: 88df479584029a6c310dab529462e3de6a1556c9
---
 resources/3rdparty/log4cplus-1.1.3-rc1/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/resources/3rdparty/log4cplus-1.1.3-rc1/CMakeLists.txt b/resources/3rdparty/log4cplus-1.1.3-rc1/CMakeLists.txt
index 269960827..fdd3b55a0 100644
--- a/resources/3rdparty/log4cplus-1.1.3-rc1/CMakeLists.txt
+++ b/resources/3rdparty/log4cplus-1.1.3-rc1/CMakeLists.txt
@@ -24,9 +24,9 @@ message("-- Generating build for Log4cplus version ${log4cplus_version_major}.${
 set (log4cplus_soversion 9)
 set (log4cplus_postfix "")
 
-option(LOG4CPLUS_BUILD_TESTING "Build the test suite." ON)
+option(LOG4CPLUS_BUILD_TESTING "Build the test suite." OFF)
 
-option(LOG4CPLUS_BUILD_LOGGINGSERVER "Build the logging server." ON)
+option(LOG4CPLUS_BUILD_LOGGINGSERVER "Build the logging server." OFF)
 
 option(LOG4CPLUS_DEFINE_INSTALL_TARGET "Whether the install target should be generated." OFF)
 

From 471ae19438488d265490fe13d9a1372d809736aa Mon Sep 17 00:00:00 2001
From: sjunges <sebastian.junges@rwth-aachen.de>
Date: Mon, 15 Feb 2016 17:55:56 +0100
Subject: [PATCH 3/7] refactored further parts of the external library building

Former-commit-id: 81ab395bb11e67d62fb6b62b97c75fcf3f3a761e
---
 resources/3rdparty/CMakeLists.txt | 42 +++++++++++++++++++++++++++++--
 src/CMakeLists.txt                |  3 +--
 test/CMakeLists.txt               |  8 +++---
 3 files changed, 46 insertions(+), 7 deletions(-)

diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt
index cf7053498..f2099eb11 100644
--- a/resources/3rdparty/CMakeLists.txt
+++ b/resources/3rdparty/CMakeLists.txt
@@ -1,20 +1,58 @@
+add_custom_target(resources) 
+add_custom_target(test-resources)
+
 include(ExternalProject)
 ExternalProject_Add(
         xercesc
         SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2
-        CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2
+        CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2 CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-O3 CXXFLAGS=-O3
         PREFIX ${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2
         BUILD_COMMAND make
         BUILD_IN_SOURCE 0
+        LOG_CONFIGURE ON
+        LOG_BUILD ON
+        LOG_INSTALL ON
 )
+add_dependencies(resources xercesc)
 
 ExternalProject_Add(
     glpk
     DOWNLOAD_COMMAND ""
     PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57
     SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/glpk-4.57
-    CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR}/glpk-4.57/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57
+    CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/glpk-4.57/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57 CC=${CMAKE_C_COMPILER}
     BUILD_COMMAND make "CFLAGS=-O2 -w"
     INSTALL_COMMAND make install
     BUILD_IN_SOURCE 0
+    LOG_CONFIGURE ON
+    LOG_BUILD ON
+    LOG_INSTALL ON
 )
+add_dependencies(resources glpk)
+
+
+ExternalProject_Add(
+        googletest
+        #For downloads (may be useful later!)
+        #SVN_REPOSITORY http://googletest.googlecode.com/svn/trunk/
+        #TIMEOUT 10
+        DOWNLOAD_COMMAND ""
+        SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.7.0"
+        # Force separate output paths for debug and release builds to allow easy
+        # identification of correct lib in subsequent TARGET_LINK_LIBRARIES 
+        CMAKE_ARGS  -Dgtest_force_shared_crt=ON
+        # Disable install step
+        INSTALL_COMMAND ""
+        # Wrap download, configure and build steps in a script to log output
+        LOG_CONFIGURE ON
+        LOG_BUILD ON)
+
+# Specify include dir
+ExternalProject_Get_Property(googletest source_dir)
+set(GTEST_INCLUDE_DIR ${source_dir}/include PARENT_SCOPE)
+# Specify MainTest's link libraries
+ExternalProject_Get_Property(googletest binary_dir)
+set(GTEST_LIBRARIES ${binary_dir}/libgtest.a ${binary_dir}/libgtest_main.a PARENT_SCOPE)
+
+add_dependencies(test-resources googletest)
+    
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 78a65a203..398571b27 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -107,9 +107,8 @@ endif(ADDITIONAL_LINK_DIRS)
 ##                                                                            #
 ###############################################################################
 add_library(storm ${STORM_LIB_SOURCES} ${STORM_LIB_HEADERS} ${STORM_GENERATED_SOURCES}) # Adding headers for xcode
-add_dependencies(storm xercesc)
 add_dependencies(storm sylvan)
-add_dependencies(storm glpk)
+add_dependencies(storm resources)
 add_executable(storm-main ${STORM_MAIN_SOURCES} ${STORM_MAIN_HEADERS})
 target_link_libraries(storm-main storm) # Adding headers for xcode
 set_target_properties(storm-main PROPERTIES OUTPUT_NAME "storm")
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 42771c858..1d60c395b 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -12,11 +12,13 @@ add_executable(storm-functional-tests ${STORM_FUNCTIONAL_TEST_MAIN_FILE} ${STORM
 target_link_libraries(storm-functional-tests storm)
 add_executable(storm-performance-tests ${STORM_PERFORMANCE_TEST_MAIN_FILE} ${STORM_PERFORMANCE_TEST_FILES})
 target_link_libraries(storm-performance-tests storm)
+add_dependencies(storm-functional-tests test-resources)
+add_dependencies(storm-performance-tests test-resources)
 
-include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/gtest-1.7.0/include")
+include_directories(${GTEST_INCLUDE_DIR})
 enable_testing()
-target_link_libraries(storm-functional-tests gtest)
-target_link_libraries(storm-performance-tests gtest)
+target_link_libraries(storm-functional-tests ${GTEST_LIBRARIES})
+target_link_libraries(storm-performance-tests ${GTEST_LIBRARIES})
 add_test(NAME storm-functional-tests COMMAND storm-functional-tests)
 add_test(NAME storm-performance-tests COMMAND storm-performance-tests)
 

From 845d9f60edf7e9baafa43cd6ebf980c153ffc9b4 Mon Sep 17 00:00:00 2001
From: sjunges <sebastian.junges@rwth-aachen.de>
Date: Mon, 15 Feb 2016 22:18:47 +0100
Subject: [PATCH 4/7] support for platforms with libtool using a different
 standard lib folder and gtest is built with the same compiler as the project
 now

Former-commit-id: 22d32c55a0dcebc5ff75a766e39e656e0714d3c1
---
 resources/3rdparty/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt
index f2099eb11..b602d4682 100644
--- a/resources/3rdparty/CMakeLists.txt
+++ b/resources/3rdparty/CMakeLists.txt
@@ -5,7 +5,7 @@ include(ExternalProject)
 ExternalProject_Add(
         xercesc
         SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2
-        CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2 CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-O3 CXXFLAGS=-O3
+        CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2 --libdir=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-O3 CXXFLAGS=-O3
         PREFIX ${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2
         BUILD_COMMAND make
         BUILD_IN_SOURCE 0
@@ -20,7 +20,7 @@ ExternalProject_Add(
     DOWNLOAD_COMMAND ""
     PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57
     SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/glpk-4.57
-    CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/glpk-4.57/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57 CC=${CMAKE_C_COMPILER}
+    CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/glpk-4.57/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57  --libdir=${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57/lib CC=${CMAKE_C_COMPILER}
     BUILD_COMMAND make "CFLAGS=-O2 -w"
     INSTALL_COMMAND make install
     BUILD_IN_SOURCE 0
@@ -40,7 +40,7 @@ ExternalProject_Add(
         SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.7.0"
         # Force separate output paths for debug and release builds to allow easy
         # identification of correct lib in subsequent TARGET_LINK_LIBRARIES 
-        CMAKE_ARGS  -Dgtest_force_shared_crt=ON
+        CMAKE_ARGS  -Dgtest_force_shared_crt=ON -DCXX=${CMAKE_CXX_COMPILER}
         # Disable install step
         INSTALL_COMMAND ""
         # Wrap download, configure and build steps in a script to log output

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 5/7] 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

From d2d71960fcfd6d951f48abb05e64699b69943762 Mon Sep 17 00:00:00 2001
From: sjunges <sebastian.junges@rwth-aachen.de>
Date: Mon, 15 Feb 2016 22:36:15 +0100
Subject: [PATCH 6/7] slightly better cmake output

Former-commit-id: 796d0a652d1f41faf37316214ae7c303dcf8ac5d
---
 CMakeLists.txt | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 422ebf915..63043f1a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,12 +42,11 @@ else()
     set (CMAKE_BUILD_TYPE "RELEASE")
 endif()
 message(STATUS "StoRM - Building ${CMAKE_BUILD_TYPE} version.")
-message(STATUS "StoRM - CMAKE_BUILD_TYPE (ENV): $ENV{CMAKE_BUILD_TYPE}")
 
 if(STORM_COMPILE_WITH_CCACHE)
 	find_program(CCACHE_FOUND ccache)
 	if(CCACHE_FOUND)
-		message(STATUS "SToRM - Using ccache")
+		message(STATUS "StoRM - Using ccache")
 		set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
 		set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
 	else()
@@ -458,7 +457,6 @@ endif()
 
 if(STORM_HAVE_CARL)
     message(STATUS "StoRM - Linking with carl.")
-	message("${carl_INCLUDE_DIR}")
     include_directories("${carl_INCLUDE_DIR}")
     list(APPEND STORM_LINK_LIBRARIES ${carl_LIBRARIES})
 endif()
@@ -515,7 +513,7 @@ endif(ENABLE_MSAT)
 
 find_package(Xerces)
 if(NOT XERCES_FOUND)
-	message("Use shipped version of xerces")
+	message(STATUS "Use shipped version of xerces")
 	set(XERCES_ROOT ${CMAKE_BINARY_DIR}/resources/3rdparty/xercesc-3.1.2)
 	set(XERCESC_INCLUDE ${XERCES_ROOT}/include)
 	set(XERCES_LIBRARY_PATH ${XERCES_ROOT}/lib)

From 50c0df75d82cfba8c750fa88add950e2a01a7a43 Mon Sep 17 00:00:00 2001
From: sjunges <sebastian.junges@rwth-aachen.de>
Date: Mon, 15 Feb 2016 23:16:31 +0100
Subject: [PATCH 7/7] towards supporting xcode generator again

Former-commit-id: 9a3142f242721585ee6763c30620853ea6c89ba6
---
 resources/3rdparty/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt
index b602d4682..694ab7265 100644
--- a/resources/3rdparty/CMakeLists.txt
+++ b/resources/3rdparty/CMakeLists.txt
@@ -43,6 +43,8 @@ ExternalProject_Add(
         CMAKE_ARGS  -Dgtest_force_shared_crt=ON -DCXX=${CMAKE_CXX_COMPILER}
         # Disable install step
         INSTALL_COMMAND ""
+        BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0"
+        INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0"
         # Wrap download, configure and build steps in a script to log output
         LOG_CONFIGURE ON
         LOG_BUILD ON)