* VS2015 compilation fixes audio

Wed, 23 Sep 2015 12:33:44 +0300

author
cemkalyoncu
date
Wed, 23 Sep 2015 12:33:44 +0300
branch
audio
changeset 771
ad38c4217456
parent 770
53b9a3c68872

* VS2015 compilation fixes

CMakeLists.txt file | annotate | diff | comparison | revisions
Scripts/Compiler.cmake file | annotate | diff | comparison | revisions
Scripts/Testing.cmake file | annotate | diff | comparison | revisions
Testing/Source/Manual/Filesystem.cpp file | annotate | diff | comparison | revisions
Testing/Source/Manual/Generic.cpp file | annotate | diff | comparison | revisions
Testing/Source/Unit/Enum.cpp file | annotate | diff | comparison | revisions
Testing/Source/Unit/Event.cpp file | annotate | diff | comparison | revisions
Testing/Source/Unit/Filesystem.cpp file | annotate | diff | comparison | revisions
Testing/Source/Unit/GarbageCollection.cpp file | annotate | diff | comparison | revisions
Testing/Source/Unit/Geometry.cpp file | annotate | diff | comparison | revisions
Testing/Source/Unit/Hashmap.cpp file | annotate | diff | comparison | revisions
Testing/Source/Unit/String.cpp file | annotate | diff | comparison | revisions
--- a/CMakeLists.txt	Wed Sep 23 12:22:55 2015 +0300
+++ b/CMakeLists.txt	Wed Sep 23 12:33:44 2015 +0300
@@ -33,7 +33,7 @@
 
 INCLUDE(Scripts/Macros.cmake)
 
-StartSource(Source)
+StartSource(Source/Gorgon)
 
 INCLUDE(Scripts/Testing.cmake)
 
--- a/Scripts/Compiler.cmake	Wed Sep 23 12:22:55 2015 +0300
+++ b/Scripts/Compiler.cmake	Wed Sep 23 12:33:44 2015 +0300
@@ -44,7 +44,25 @@
 #make sure 64bits cannot be activated
 IF(MSVC)
 	ADD_DEFINITIONS(-D_SBCS -D_CRT_SECURE_NO_WARNINGS)
-	IF(${CMAKE_CL_64})
+	
+	SET(configs
+      CMAKE_C_FLAGS_DEBUG
+      CMAKE_C_FLAGS_MINSIZEREL
+      CMAKE_C_FLAGS_RELEASE
+      CMAKE_C_FLAGS_RELWITHDEBINFO
+      CMAKE_CXX_FLAGS_DEBUG
+      CMAKE_CXX_FLAGS_MINSIZEREL
+      CMAKE_CXX_FLAGS_RELEASE
+      CMAKE_CXX_FLAGS_RELWITHDEBINFO
+    )
+	
+	FOREACH(config ${configs})
+      IF(${config} MATCHES "/MD")
+        STRING(REGEX REPLACE "/MD" "/MT" ${config} "${${config}}")
+      ENDIF()
+    ENDFOREACH()
+	
+	IF(${CMAKE_CL_64} AND NOT(${ENABLE_64_BIT}))
 		MESSAGE(FATAL_ERROR "Gorgon Library works only 32bits")
 	ENDIF()
-ENDIF()
+ENDIF()
\ No newline at end of file
--- a/Scripts/Testing.cmake	Wed Sep 23 12:22:55 2015 +0300
+++ b/Scripts/Testing.cmake	Wed Sep 23 12:33:44 2015 +0300
@@ -18,7 +18,7 @@
 	SET_TARGET_PROPERTIES(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_TESTING_DIRECTORY}/Tests/Unit")
 	SET_TARGET_PROPERTIES(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_TESTING_DIRECTORY}/Tests/Unit")
 	SET_TARGET_PROPERTIES(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_TESTING_DIRECTORY}/Tests/Unit")
-	SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_FLAGS "-I${CMAKE_TESTING_DIRECTORY}/Source -I${CMAKE_SOURCE_DIR} -DTESTDIR=\"\\\"${CMAKE_TESTING_DIRECTORY}/Runtime\\\"\"")
+	SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_FLAGS "-I${CMAKE_TESTING_DIRECTORY}/Source -I${CMAKE_SOURCE_DIR}/Source -DTESTDIR=\"\\\"${CMAKE_TESTING_DIRECTORY}/Runtime\\\"\"")
 	TARGET_LINK_LIBRARIES(${target} Gorgon)
 	
 	ADD_TEST(NAME ${file} WORKING_DIRECTORY ${CMAKE_TESTING_DIRECTORY}/Runtime COMMAND  ${CMAKE_TESTING_DIRECTORY}/Tests/Unit/${target})
@@ -42,7 +42,7 @@
 		SET_TARGET_PROPERTIES(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_TESTING_DIRECTORY}/Tests/Manual")
 		SET_TARGET_PROPERTIES(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_TESTING_DIRECTORY}/Tests/Manual")
 		SET_TARGET_PROPERTIES(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_TESTING_DIRECTORY}/Tests/Manual")
-		SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_FLAGS "-I${CMAKE_TESTING_DIRECTORY}/Source -I${CMAKE_SOURCE_DIR} -DTESTDIR=\"\\\"${CMAKE_TESTING_DIRECTORY}/Runtime\\\"\"")
+		SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_FLAGS "-I${CMAKE_TESTING_DIRECTORY}/Source -I${CMAKE_SOURCE_DIR}/Source -DTESTDIR=\"\\\"${CMAKE_TESTING_DIRECTORY}/Runtime\\\"\"")
 		TARGET_LINK_LIBRARIES(${target} Gorgon)
 		
 		ADD_CUSTOM_COMMAND(TARGET manualtest COMMAND ${CMAKE_TESTING_DIRECTORY}/Tests/Manual/${target})
--- a/Testing/Source/Manual/Filesystem.cpp	Wed Sep 23 12:22:55 2015 +0300
+++ b/Testing/Source/Manual/Filesystem.cpp	Wed Sep 23 12:33:44 2015 +0300
@@ -1,6 +1,6 @@
  
 
-#include <Source/Filesystem.h>
+#include <Gorgon/Filesystem.h>
 
 #include <string>
 #include <iostream>
--- a/Testing/Source/Manual/Generic.cpp	Wed Sep 23 12:22:55 2015 +0300
+++ b/Testing/Source/Manual/Generic.cpp	Wed Sep 23 12:33:44 2015 +0300
@@ -1,6 +1,6 @@
-#include <Source/Utils/Assert.h>
+#include <Gorgon/Utils/Assert.h>
 #include <thread>
-#include "../../../Source/Containers/Collection.h"
+#include <Gorgon/Containers/Collection.h>
 
 void testassert() {
 	int a=5;
--- a/Testing/Source/Unit/Enum.cpp	Wed Sep 23 12:22:55 2015 +0300
+++ b/Testing/Source/Unit/Enum.cpp	Wed Sep 23 12:33:44 2015 +0300
@@ -4,8 +4,8 @@
 
 #include <catch.h>
 
-#include <Source/Enum.h>
-#include <Source/String.h>
+#include <Gorgon/Enum.h>
+#include <Gorgon/String.h>
 
 namespace String = Gorgon::String;
 
--- a/Testing/Source/Unit/Event.cpp	Wed Sep 23 12:22:55 2015 +0300
+++ b/Testing/Source/Unit/Event.cpp	Wed Sep 23 12:33:44 2015 +0300
@@ -1,12 +1,12 @@
 #include <iostream>
 
-#include <Source/Event.h>
-#include <Source/WindowManager.h>
-#include <Source/Window.h>
-#include <Source/OS.h>
-#include <Source/Resource/GID.h>
-#include <Source/SGuid.h>
-#include <Source/Resource/Folder.h>
+#include <Gorgon/Event.h>
+#include <Gorgon/OS.h>
+#include <Gorgon/WindowManager.h>
+#include <Gorgon/Window.h>
+#include <Gorgon/Resource/GID.h>
+#include <Gorgon/SGuid.h>
+#include <Gorgon/Resource/Folder.h>
 
 class A {
 public:
--- a/Testing/Source/Unit/Filesystem.cpp	Wed Sep 23 12:22:55 2015 +0300
+++ b/Testing/Source/Unit/Filesystem.cpp	Wed Sep 23 12:33:44 2015 +0300
@@ -4,8 +4,8 @@
 
 #undef CreateDirectory
 
-#include <Source/Filesystem.h>
-#include <Source/Filesystem/Iterator.h>
+#include <Gorgon/Filesystem.h>
+#include <Gorgon/Filesystem/Iterator.h>
 
 #include <iostream>
 #include <string>
--- a/Testing/Source/Unit/GarbageCollection.cpp	Wed Sep 23 12:22:55 2015 +0300
+++ b/Testing/Source/Unit/GarbageCollection.cpp	Wed Sep 23 12:33:44 2015 +0300
@@ -1,7 +1,7 @@
 #define CATCH_CONFIG_MAIN
 #include <catch.h>
 
-#include <Source/Containers/GarbageCollection.h>
+#include <Gorgon/Containers/GarbageCollection.h>
 #include <stdint.h>
 #include <vector>
 #include <algorithm>
--- a/Testing/Source/Unit/Geometry.cpp	Wed Sep 23 12:22:55 2015 +0300
+++ b/Testing/Source/Unit/Geometry.cpp	Wed Sep 23 12:33:44 2015 +0300
@@ -3,11 +3,11 @@
 #define WINDOWS_LEAN_AND_MEAN
 
 #include <catch.h>
-#include <Source/Geometry/Point.h>
-#include <Source/Geometry/Size.h>
-#include <Source/Geometry/Bounds.h>
-#include <Source/Geometry/Rectangle.h>
-#include <Source/String.h>
+#include <Gorgon/Geometry/Point.h>
+#include <Gorgon/Geometry/Size.h>
+#include <Gorgon/Geometry/Bounds.h>
+#include <Gorgon/Geometry/Rectangle.h>
+#include <Gorgon/String.h>
 
 #undef Rectangle
 
--- a/Testing/Source/Unit/Hashmap.cpp	Wed Sep 23 12:22:55 2015 +0300
+++ b/Testing/Source/Unit/Hashmap.cpp	Wed Sep 23 12:33:44 2015 +0300
@@ -1,7 +1,7 @@
 #define CATCH_CONFIG_MAIN
 #include <catch.h>
 
-#include <Source/Containers/Hashmap.h>
+#include <Gorgon/Containers/Hashmap.h>
 #include <stdint.h>
 #include <vector>
 #include <algorithm>
--- a/Testing/Source/Unit/String.cpp	Wed Sep 23 12:22:55 2015 +0300
+++ b/Testing/Source/Unit/String.cpp	Wed Sep 23 12:33:44 2015 +0300
@@ -4,9 +4,9 @@
 
 #include <catch.h>
 
-#include <Source/String.h>
-#include <Source/String/Tokenizer.h>
-#include <Source/Types.h>
+#include <Gorgon/String.h>
+#include <Gorgon/String/Tokenizer.h>
+#include <Gorgon/Types.h>
 
 using namespace Gorgon;
 

mercurial