Removed possibility of compiling with GSL.
[alexxy/gromacs.git] / src / programs / CreateLinks.cmake.cmakein
1 #
2 # This file is part of the GROMACS molecular simulation package.
3 #
4 # Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
5 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6 # and including many others, as listed in the AUTHORS file in the
7 # top-level source directory and at http://www.gromacs.org.
8 #
9 # GROMACS is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public License
11 # as published by the Free Software Foundation; either version 2.1
12 # of the License, or (at your option) any later version.
13 #
14 # GROMACS is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # Lesser General Public License for more details.
18 #
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with GROMACS; if not, see
21 # http://www.gnu.org/licenses, or write to the Free Software Foundation,
22 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
23 #
24 # If you want to redistribute modifications to GROMACS, please
25 # consider that scientific software is very special. Version
26 # control is crucial - bugs must be traceable. We will be happy to
27 # consider code for inclusion in the official distribution, but
28 # derived work must not be called official GROMACS. Details are found
29 # in the README & COPYING files - if they are missing, get the
30 # official version at http://www.gromacs.org.
31 #
32 # To help us fund GROMACS development, we humbly ask that you cite
33 # the research papers on the package. Check out http://www.gromacs.org.
34
35 # TODO: It would be nicer to have the list generated from the binary,
36 # but this has some complications.  As the same list is also needed for
37 # man page generation, this can wait for now.
38 set(SYMLINK_NAMES
39     mdrun
40     gmxcheck
41     gmxdump
42     grompp
43     pdb2gmx
44     tpbconv
45     g_protonate
46     g_x2top
47     do_dssp
48     editconf
49     eneconv
50     genbox
51     genconf
52     genion
53     genrestr
54     make_edi
55     make_ndx
56     mk_angndx
57     trjcat
58     trjconv
59     trjorder
60     xpm2ps
61     g_anadock
62     g_anaeig
63     g_analyze
64     g_angle
65     g_bar
66     g_bond
67     g_bundle
68     g_chi
69     g_cluster
70     g_clustsize
71     g_confrms
72     g_covar
73     g_current
74     g_density
75     g_densmap
76     g_densorder
77     g_dielectric
78     g_dipoles
79     g_disre
80     g_dist
81     g_dos
82     g_dyecoupl
83     g_dyndom
84     g_enemat
85     g_energy
86     g_filter
87     g_gyrate
88     g_h2order
89     g_hbond
90     g_helix
91     g_helixorient
92     g_hydorder
93     g_lie
94     g_mdmat
95     g_mindist
96     g_morph
97     g_msd
98     g_nmeig
99     g_nmens
100     g_nmtraj
101     g_options
102     g_order
103     g_pme_error
104     g_polystat
105     g_potential
106     g_principal
107     g_rama
108     g_rdf
109     g_rms
110     g_rmsdist
111     g_rmsf
112     g_rotacf
113     g_rotmat
114     g_saltbr
115     g_sans
116     g_sas
117     g_saxs
118     g_select
119     g_sgangle
120     g_sham
121     g_sigeps
122     g_sorient
123     g_spatial
124     g_spol
125     g_tcaf
126     g_traj
127     g_tune_pme
128     g_vanhove
129     g_velacc
130     g_wham
131     g_wheel
132     )
133
134 if (NOT DEFINED BINARY_DIRECTORY)
135     set(BINARY_DIRECTORY "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/@BIN_INSTALL_DIR@")
136 endif ()
137 set(BINARY_SUFFIX "@GMX_BINARY_SUFFIX@@CMAKE_EXECUTABLE_SUFFIX@")
138 set(GMX_NATIVE_WINDOWS "@GMX_NATIVE_WINDOWS@")
139
140 foreach (linkname ${SYMLINK_NAMES})
141     set(linkpath ${BINARY_DIRECTORY}/${linkname}${BINARY_SUFFIX})
142     # Based on documentation, CMake only supports symbolic links on Unix,
143     # although NTFS also has those (since Windows Vista; they require admin
144     # permissions to create).
145     if (GMX_NATIVE_WINDOWS)
146         if (NOT QUIETLY)
147             message(STATUS "Installing: Creating alias binary ${linkpath}")
148         endif ()
149         execute_process(
150             COMMAND ${CMAKE_COMMAND} -E copy_if_different
151                 ${BINARY_DIRECTORY}/gmx${BINARY_SUFFIX} ${linkpath})
152     else()
153         if (NOT QUIETLY)
154             message(STATUS "Installing: Creating symbolic link ${linkpath}")
155         endif ()
156         if (EXISTS ${linkpath})
157             FILE(REMOVE ${linkpath})
158         endif ()
159         execute_process(
160             COMMAND ${CMAKE_COMMAND} -E create_symlink
161                 gmx${BINARY_SUFFIX} ${linkpath})
162     endif()
163 endforeach ()