fixes for unres/src_MIN build in ifort
[unres.git] / CMakeLists.txt
index 71105b2..ccb41f8 100644 (file)
@@ -55,6 +55,9 @@ option(UNRES_WITH_MPI "Choose whether or not to use MPI library" ON )
 # MPI stuff
 #=================================
 
+# Note for the future - use finde package to get MPI 
+#find_package(MPI)
+
 if(MPIF_LOCAL_DIR)
   find_library(MPIF_LIBRARY NAMES libmpich.a  NO_DEFAULT_PATH  PATHS  ${MPIF_LOCAL_DIR}/lib)
   find_path( MPIF_INCLUDE_DIRECTORIES  NAMES mpif.h  NO_DEFAULT_PATH  PATHS  ${MPIF_LOCAL_DIR}/include  )
@@ -90,10 +93,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
@@ -105,4 +123,5 @@ if(UNRES_WITH_MPI)
   add_subdirectory(source/unres/src_MD-M)
 endif()
 
+add_subdirectory(source/unres/src_MIN)