[packmol] Initial import.

Jussi Lehtola jussilehtola at fedoraproject.org
Mon Jan 23 13:32:05 UTC 2012


commit 9045b916ac31b98d44288fd3af3e2663176e7252
Author: Jussi Lehtola <jussilehtola at fedoraproject.org>
Date:   Mon Jan 23 15:32:01 2012 +0200

    Initial import.

 packmol-CMakeLists.txt |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/packmol-CMakeLists.txt b/packmol-CMakeLists.txt
new file mode 100644
index 0000000..2571483
--- /dev/null
+++ b/packmol-CMakeLists.txt
@@ -0,0 +1,45 @@
+cmake_minimum_required(VERSION 2.6)
+enable_language (Fortran)
+project(packmol)
+
+# Build for release or debug purposes?
+SET(CMAKE_BUILD_TYPE release)
+#SET(CMAKE_BUILD_TYPE debug)
+
+# Default flags for release and debug
+set(CMAKE_Fortran_FLAGS_RELEASE "-Wall -O2")
+set(CMAKE_Fortran_FLAGS_DEBUG "-Werror -g -O2")
+
+
+# Common sources
+SET(srcall cenmass.f gencan.f initial.f io.f fgcommon.f packmolnew.f
+polartocart.f heuristics.f)
+# Common headers
+SET(headers sizes.i gencan.i molpa.i)
+# Serial-only sources
+SET(srcserial feasy.f geasy.f)
+# Parallel-only sources
+SET(srcparallel feasyparallel.f geasyparallel.f compindexes.f)
+
+
+# Compile SMP version?
+# Find_package doesn't currently support Fortran, so we need to do things by hand.
+#find_package( OpenMP )
+
+option(USE_OPENMP "Compile OpenMP enabled version?" OFF)
+if(USE_OPENMP)
+ # Determine necessary flags
+ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+  set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fopenmp")
+ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
+  set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -openmp")
+ else(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+  message(SEND_ERROR "Makefile does not support the chosen Fortran compiler \"${CMAKE_Fortran_COMPILER_NAME}\" using OpenMP.")
+ endif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+
+ # Compile
+ add_executable(ppackmol ${srcall} ${srcparallel})
+else(USE_OPENMP)
+ # Build the serial executable.
+ add_executable(packmol ${srcall} ${srcserial})
+endif(USE_OPENMP)


More information about the scm-commits mailing list