* 64bit compilation support 3.x-dev

Sat, 22 Feb 2020 18:53:25 +0200

author
cemkalyoncu
date
Sat, 22 Feb 2020 18:53:25 +0200
branch
3.x-dev
changeset 1347
8cd590791791
parent 1344
ec31083b86f6

* 64bit compilation support

CMakeLists.txt file | annotate | diff | comparison | revisions
Examples/Empty window/CMakeLists.txt file | annotate | diff | comparison | revisions
Scripts/Compiler.cmake file | annotate | diff | comparison | revisions
Scripts/Gorgon3Config.cmake.in file | annotate | diff | comparison | revisions
--- a/CMakeLists.txt	Thu Feb 20 14:58:49 2020 +0200
+++ b/CMakeLists.txt	Sat Feb 22 18:53:25 2020 +0200
@@ -1,7 +1,9 @@
-cmake_minimum_required(VERSION 2.8.3)
+cmake_minimum_required(VERSION 3.1)
 
 project(Gorgon3)
 
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+
 set(GORGON_MAJOR_VERSION 3)
 set(GORGON_MINOR_VERSION 9)
 set(GORGON_PATCH_VERSION 11)
--- a/Examples/Empty window/CMakeLists.txt	Thu Feb 20 14:58:49 2020 +0200
+++ b/Examples/Empty window/CMakeLists.txt	Sat Feb 22 18:53:25 2020 +0200
@@ -8,11 +8,11 @@
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/Bin)
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/Bin)
 
-find_package(Gorgon REQUIRED)
+find_package(Gorgon3 REQUIRED)
 
 add_executable(${PROJECT_NAME} WIN32 Main.cpp)
 
-linkgorgon(${PROJECT_NAME})
+linkgorgon3(${PROJECT_NAME})
 
 IF(WIN32)
 	FILE(COPY "${CMAKE_SOURCE_DIR}/settings.vcxproj.user" DESTINATION "${CMAKE_BINARY_DIR}/")
--- a/Scripts/Compiler.cmake	Thu Feb 20 14:58:49 2020 +0200
+++ b/Scripts/Compiler.cmake	Sat Feb 22 18:53:25 2020 +0200
@@ -37,21 +37,11 @@
 #enable C++11 and 32-bit compilation
 INCLUDE(CheckCXXCompilerFlag)
 IF(CMAKE_COMPILER_IS_GNUCXX)
-	IF(${ENABLE_64_BIT})
-		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-	ELSE()
-		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -m32")
-		SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
-	ENDIF()
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 ENDIF()
 
 IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-	IF(${ENABLE_64_BIT})
-		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-	ELSE()
-		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -m32")
-		SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
-	ENDIF()
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 ENDIF()
 
 #MACRO(FixProject) 
@@ -77,8 +67,4 @@
         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()
--- a/Scripts/Gorgon3Config.cmake.in	Thu Feb 20 14:58:49 2020 +0200
+++ b/Scripts/Gorgon3Config.cmake.in	Sat Feb 22 18:53:25 2020 +0200
@@ -56,26 +56,14 @@
 		ENDIF()
 	ENDIF()
 
-	OPTION(ENABLE_64_BIT "Enable 64 bit compilation" OFF)
-
 	#enable C++11 and 32-bit compilation
 	INCLUDE(CheckCXXCompilerFlag)
 	IF(CMAKE_COMPILER_IS_GNUCXX)
-		IF(${ENABLE_64_BIT})
-			SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-		ELSE()
-			SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -m32")
-			SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
-		ENDIF()
+        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 	ENDIF()
 
 	IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-		IF(${ENABLE_64_BIT})
-			SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-		ELSE()
-			SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -m32")
-			SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
-		ENDIF()
+        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 	ENDIF()
 
 	#MACRO(FixProject) 

mercurial