Merge branch 'devel' into AFM
[unres.git] / source / maxlik / src_CSA / CMakeLists.txt
diff --git a/source/maxlik/src_CSA/CMakeLists.txt b/source/maxlik/src_CSA/CMakeLists.txt
new file mode 100644 (file)
index 0000000..a990836
--- /dev/null
@@ -0,0 +1,62 @@
+#
+# CMake project file for UNRES with MD for single chains
+# 
+cmake_minimum_required(VERSION 2.8)
+enable_language (Fortran)
+
+
+#================================
+# Set source file lists
+#================================
+set(MAXLIK_SRC0
+       cored.f
+       maxlik-opt-multprot.f
+       minsumsl.f
+       rmdd.f
+       sumsld.f
+) 
+
+
+#================================================
+# Set comipiler flags for different sourcefiles  
+#================================================
+ if (Fortran_COMPILER_NAME STREQUAL "ifort")
+   set(FFLAGS0 "-c -g -fbounds-check -I." ) 
+   set(FFLAGS1 "-c -I." ) 
+ elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
+   set(FFLAGS0 "-std=legacy -c -g -fbounds-check -I." ) 
+   set(FFLAGS1 "-std=legacy -c -I." ) 
+endif (Fortran_COMPILER_NAME STREQUAL "ifort")
+
+#=========================================
+# System specific flags
+#=========================================
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+  set(CPPFLAGS "${CPPFLAGS} -DLINUX") 
+endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+
+#=========================================
+# Set binary name 
+#=========================================
+set(MAXLIK_BIN "maxlik_CSA")
+
+
+#=========================================
+# Build the binary
+#=========================================
+set(MAXLIK_SRCS ${MAXLIK_SRC0} )
+
+
+#=========================================
+# Build the binary
+#=========================================
+add_executable(MAXLIK ${MAXLIK_SRCS} )
+set_target_properties(MAXLIK PROPERTIES OUTPUT_NAME ${MAXLIK_BIN})
+set_property(TARGET MAXLIK PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
+
+#=========================================
+# Install maxlik binary (used by "make install")
+#=========================================
+install(TARGETS MAXLIK DESTINATION ${CMAKE_INSTALL_PREFIX})
+
+install(TARGETS MAXLIK RUNTIME DESTINATION unrespack/bin)