1 | # Suppress warnings on cygwin |
---|
2 | # win32 is not anymore equal to 1 on cygwin |
---|
3 | # with newer cmake. We still assume so though.. |
---|
4 | # Note: |
---|
5 | # - In cygwin, the boolean CYGWIN is defined and 1 |
---|
6 | # - On Windows, WIN32 bool is defined, but |
---|
7 | # after cmake 2.8.4 it's normally zero when using |
---|
8 | # cygwin. |
---|
9 | set(CMAKE_LEGACY_CYGWIN_WIN32 0) |
---|
10 | |
---|
11 | cmake_minimum_required(VERSION 2.6) |
---|
12 | |
---|
13 | PROJECT(madX C CXX Fortran) |
---|
14 | #add name of languages used in the project as well |
---|
15 | |
---|
16 | # Some policies regarding configure |
---|
17 | # warnings we do not want.. |
---|
18 | if(COMMAND cmake_policy) |
---|
19 | cmake_policy(SET CMP0003 NEW) |
---|
20 | endif(COMMAND cmake_policy) |
---|
21 | |
---|
22 | # add source dir as a place for CMake modules (e.g. FindGSL.cmake) |
---|
23 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") |
---|
24 | |
---|
25 | # When we don't need to support cmake <2.8.3 anymore, remove these three lines: |
---|
26 | if(CMAKE_VERSION VERSION_LESS "2.8.3") |
---|
27 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/compilers") |
---|
28 | endif() |
---|
29 | |
---|
30 | # Some initializations specific for Mad-X |
---|
31 | include(madxInit) |
---|
32 | |
---|
33 | # predefined macros... |
---|
34 | include(install_macros) |
---|
35 | |
---|
36 | # Defining project options: |
---|
37 | include(setupOptions) |
---|
38 | |
---|
39 | # |
---|
40 | # we call a subscript that sets up our compiler specific flags... |
---|
41 | # |
---|
42 | include(setupCompilerSpecifics) |
---|
43 | |
---|
44 | |
---|
45 | # we call a subscript that will set up additional flags depending on |
---|
46 | # architecture chosen. |
---|
47 | include(setupArchSpecifics) |
---|
48 | |
---|
49 | |
---|
50 | # Add sources subdirectory: |
---|
51 | add_subdirectory(libs) |
---|
52 | add_subdirectory(src) |
---|
53 | add_subdirectory(tools) |
---|
54 | add_subdirectory(syntax) |
---|
55 | |
---|
56 | # External projects... |
---|
57 | include(setupExternalProjects) |
---|
58 | |
---|
59 | # Setting up testing: |
---|
60 | include(setupTesting) |
---|
61 | # Add test folders: |
---|
62 | include(numdifftests) |
---|