added 32/64-bit architecture detection
[unres.git] / CMakeLists.txt
index 71105b2..a343543 100644 (file)
@@ -90,10 +90,25 @@ if (MPIF_FOUND)
   message("MPIF_INCLUDE_DIRECTORIES=${MPIF_INCLUDE_DIRECTORIES}" )
 endif(MPIF_FOUND) 
 
+
+
+#======================================
+# Detect system architecture
+#
+
+if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+  set(architektura "32")
+else (CMAKE_SIZEOF_VOID_P EQUAL 4)
+  set(architektura "64")
+endif( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+
+message("Detected ${architektura}-bit architecture")   
+
+
 #=======================================
 #  Create diractories for build targets
 #=======================================
-execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/unres/MD )
+#execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/unres/MD )
 
 #=======================================
 # Add source files