6971
by ceejatec
Undoing accidental check-in |
1 |
# Copyright 2006-2008 The FLWOR Foundation. |
3360
by brantmat at ETHZ
added the apache license |
2 |
# |
3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
|
4 |
# you may not use this file except in compliance with the License. |
|
5 |
# You may obtain a copy of the License at |
|
6 |
# |
|
7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
|
8 |
# |
|
9 |
# Unless required by applicable law or agreed to in writing, software |
|
10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
|
11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
12 |
# See the License for the specific language governing permissions and |
|
7360
by spungi
No actual change, this is just a test to see if the remote queue is |
13 |
# limitations under the License. |
3360
by brantmat at ETHZ
added the apache license |
14 |
|
8482
by davidagraf
fixed dirname and basename in the file module on Windows |
15 |
|
16 |
IF (${CMAKE_CXX_COMPILER} MATCHES "clang") |
|
17 |
SET (CLANG 1) |
|
18 |
ELSE (${CMAKE_CXX_COMPILER} MATCHES "clang") |
|
19 |
SET (CLANG 0) |
|
20 |
ENDIF(${CMAKE_CXX_COMPILER} MATCHES "clang") |
|
21 |
||
2340
by dagraf at ETHZ
Waring level increased for visual studio and gcc compiler |
22 |
#----------------------------------------------------------------------------- |
23 |
# Let's use the highest warning level. |
|
24 |
#----------------------------------------------------------------------------- |
|
8670
by danielturcanu
Removed Wp64 for Visual Studio 2010. |
25 |
MESSAGE(STATUS "CMAKE_BUILD_TOOL = ${CMAKE_BUILD_TOOL}") |
26 |
IF(NOT CLANG AND CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake|MSBuild)") |
|
8292
by markosza
STRING BRANCH MERGE |
27 |
# Use only the second highest warning level for the Visual Studio |
28 |
# compiler: /W3. This is because /W4 is too strict and generates too many |
|
29 |
# warnings. This would make much of the code non-portable or too many |
|
30 |
# ifdef pragma expressions would be necessary. |
|
31 |
# See: http://digipen1.xmmg.com:8181/dpweb/docs/CompilingWarningLevel4.html |
|
32 |
||
33 |
# for C++ |
|
34 |
IF(CMAKE_CXX_FLAGS MATCHES "/W[0-2]") |
|
35 |
STRING(REGEX REPLACE "/W[0-2]" "/W3" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") |
|
36 |
ELSE(CMAKE_CXX_FLAGS MATCHES "/W[0-2]") |
|
37 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3") |
|
38 |
ENDIF(CMAKE_CXX_FLAGS MATCHES "/W[0-2]") |
|
39 |
# and for C |
|
40 |
IF(CMAKE_C_FLAGS MATCHES "/W[0-2]") |
|
41 |
STRING(REGEX REPLACE "/W[0-2]" "/W3" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") |
|
42 |
ELSE(CMAKE_C_FLAGS MATCHES "/W[0-2]") |
|
43 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3") |
|
44 |
ENDIF(CMAKE_C_FLAGS MATCHES "/W[0-2]") |
|
45 |
MESSAGE(STATUS "Increased the warning level to level 3: /W3. New flags:") |
|
46 |
MESSAGE(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") |
|
47 |
MESSAGE(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") |
|
48 |
||
49 |
# For the same reasons mentioned above, disable deprecation warnings for standard C functions |
|
8946
by danielturcanu
Added UNICODE flag for Windows projects. |
50 |
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_PREFIX_ -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -DUNICODE) |
8292
by markosza
STRING BRANCH MERGE |
51 |
|
52 |
IF(NOT CMAKE_CXX_FLAGS MATCHES "/DNOMINMAX") |
|
53 |
# avoid the min/max name clash between std versions and the |
|
54 |
# ones defined in Windef.h on Windows. Disable the latter. |
|
55 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DNOMINMAX") |
|
56 |
MESSAGE(STATUS "Added /DNOMINMAX compiler flag to CMAKE_CXX_FLAGS. New flags:") |
|
57 |
MESSAGE(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") |
|
58 |
ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "/DNOMINMAX") |
|
8544
by danielturcanu
Added support for multicore compilation of zorba in Visual Studio. |
59 |
|
60 |
SET(ZORBA_PROCESSORS_FOR_COMPILE $ENV{NUMBER_OF_PROCESSORS} CACHE STRING "Number of processors for compiling") |
|
61 |
MESSAGE(STATUS "Number of processors/cores used for compiling ZORBA_PROCESSORS_FOR_COMPILE = ${ZORBA_PROCESSORS_FOR_COMPILE}") |
|
62 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP${ZORBA_PROCESSORS_FOR_COMPILE}") |
|
8831
by danielturcanu
Removed warning about Wp64 in VS2010. |
63 |
GET_FILENAME_COMPONENT(COMPILER_FULL_PATH ${CMAKE_C_COMPILER} PROGRAM) |
8833
by danielturcanu
Set /Wp64 flag only for Visual Studio 2005. |
64 |
IF(COMPILER_FULL_PATH MATCHES "Visual Studio 8") |
8594
by danielturcanu
Added check for 64 bit portability issues in Visual Studio. |
65 |
#to detect 64 bit portability issues |
66 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wp64") |
|
8833
by danielturcanu
Set /Wp64 flag only for Visual Studio 2005. |
67 |
ENDIF(COMPILER_FULL_PATH MATCHES "Visual Studio 8") |
8831
by danielturcanu
Removed warning about Wp64 in VS2010. |
68 |
|
69 |
ENDIF(NOT CLANG AND CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake|MSBuild)") |
|
2340
by dagraf at ETHZ
Waring level increased for visual studio and gcc compiler |
70 |
|
8482
by davidagraf
fixed dirname and basename in the file module on Windows |
71 |
IF(CLANG AND WIN32) |
72 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-integrated-as") |
|
73 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-integrated-as") |
|
74 |
ENDIF() |
|
8428
by davidagraf
- Fixed some stuff that was not C++ specification compliant. |
75 |
|
7221
by ceejatec
Bug 2936209: skip -Werror=declaration-after-statement with gcc 4.0.1 |
76 |
SET(ZORBA_GNUCOMPILER_VERSION) |
6297
by mbrantner
Committing David's work: Reenabled the -fvisibility=hidden option for g++ compilers. This required |
77 |
SET(ZORBA_GNUCOMPILER_MAJOR_VERSION) |
8428
by davidagraf
- Fixed some stuff that was not C++ specification compliant. |
78 |
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CLANG) |
6297
by mbrantner
Committing David's work: Reenabled the -fvisibility=hidden option for g++ compilers. This required |
79 |
EXEC_PROGRAM(${CMAKE_CXX_COMPILER} |
80 |
ARGS --version |
|
7221
by ceejatec
Bug 2936209: skip -Werror=declaration-after-statement with gcc 4.0.1 |
81 |
OUTPUT_VARIABLE ZORBA_GNUCOMPILER_VERSION |
6297
by mbrantner
Committing David's work: Reenabled the -fvisibility=hidden option for g++ compilers. This required |
82 |
) |
7221
by ceejatec
Bug 2936209: skip -Werror=declaration-after-statement with gcc 4.0.1 |
83 |
STRING(REGEX REPLACE ".*([0-9]\\.[0-9]\\.[0-9]).*" "\\1" |
84 |
ZORBA_GNUCOMPILER_VERSION ${ZORBA_GNUCOMPILER_VERSION}) |
|
6413
by davidagraf
fixed gcc major version computation for linux |
85 |
STRING(REGEX REPLACE ".*([0-9])\\.[0-9]\\.[0-9].*" "\\1" |
7221
by ceejatec
Bug 2936209: skip -Werror=declaration-after-statement with gcc 4.0.1 |
86 |
ZORBA_GNUCOMPILER_MAJOR_VERSION ${ZORBA_GNUCOMPILER_VERSION}) |
87 |
MESSAGE(STATUS "Detected GNU compiler version ${ZORBA_GNUCOMPILER_VERSION} (major version ${ZORBA_GNUCOMPILER_MAJOR_VERSION})") |
|
8428
by davidagraf
- Fixed some stuff that was not C++ specification compliant. |
88 |
ENDIF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CLANG) |
6297
by mbrantner
Committing David's work: Reenabled the -fvisibility=hidden option for g++ compilers. This required |
89 |
|
2340
by dagraf at ETHZ
Waring level increased for visual studio and gcc compiler |
90 |
IF(CMAKE_COMPILER_IS_GNUCXX) |
2534
by brantmat at ETHZ
ability to compile zorba with gcc and code coverage information |
91 |
IF (ZORBA_WITH_CODE_COVERAGE) |
92 |
IF (NOT CMAKE_CXX_FLAGS MATCHES "profile-arcs") |
|
93 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs") |
|
94 |
ENDIF (NOT CMAKE_CXX_FLAGS MATCHES "profile-arcs") |
|
95 |
IF (NOT CMAKE_CXX_FLAGS MATCHES "test-coverage") |
|
96 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftest-coverage") |
|
97 |
ENDIF (NOT CMAKE_CXX_FLAGS MATCHES "test-coverage") |
|
3771
by mbrantner
make it compile on the mac |
98 |
IF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "profile-arcs") |
99 |
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs") |
|
100 |
ENDIF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "profile-arcs") |
|
101 |
IF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "test-coverage") |
|
102 |
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ftest-coverage") |
|
103 |
ENDIF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "test-coverage") |
|
2534
by brantmat at ETHZ
ability to compile zorba with gcc and code coverage information |
104 |
ENDIF (ZORBA_WITH_CODE_COVERAGE) |
2340
by dagraf at ETHZ
Waring level increased for visual studio and gcc compiler |
105 |
IF(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") |
106 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") |
|
107 |
ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") |
|
108 |
IF(NOT CMAKE_CXX_FLAGS MATCHES "-Wextra") |
|
109 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") |
|
110 |
ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Wextra") |
|
3587
by mbrantner
moved linker option to CMakeCompiler.txt and make it work on Apple |
111 |
IF (UNIX AND NOT APPLE) |
112 |
IF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "as-needed") |
|
113 |
SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--as-needed") |
|
114 |
ENDIF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "as-needed") |
|
115 |
ENDIF (UNIX AND NOT APPLE) |
|
2340
by dagraf at ETHZ
Waring level increased for visual studio and gcc compiler |
116 |
# # Wabi (Warn when G++ generates code that is probably not compatible with the vendor-neutral C++ ABI.) |
117 |
# IF(NOT CMAKE_CXX_FLAGS MATCHES "-Wabi") |
|
118 |
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wabi") |
|
119 |
# ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Wabi") |
|
120 |
# Warn when a class seems unusable because all the constructors or destructors in that class are private, and it has neither friends nor public static member functions. |
|
121 |
IF(NOT CMAKE_CXX_FLAGS MATCHES "-Wctor-dtor-privacy") |
|
2406
by brantmat at ETHZ
some cleanup and suppress some warnings on mac |
122 |
IF (NOT APPLE) # apple g++ throws to many of these warnings for boost |
123 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wctor-dtor-privacy") |
|
124 |
ENDIF (NOT APPLE) |
|
2340
by dagraf at ETHZ
Waring level increased for visual studio and gcc compiler |
125 |
ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Wctor-dtor-privacy") |
8544
by danielturcanu
Added support for multicore compilation of zorba in Visual Studio. |
126 |
# # Warn about violations of the following style guidelines from Scott MeyersÂ’ Effective C++ book (Problem: std header do not obey this guideline) |
2340
by dagraf at ETHZ
Waring level increased for visual studio and gcc compiler |
127 |
# IF(NOT CMAKE_CXX_FLAGS MATCHES "-Weffc++") |
128 |
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weffc++") |
|
129 |
# ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Weffc++") |
|
130 |
# # Warn if an old-style (C-style) cast to a non-void type is used within a C++ program. |
|
131 |
# IF(NOT CMAKE_CXX_FLAGS MATCHES "-Wold-style-cast") |
|
132 |
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wold-style-cast") |
|
133 |
# ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Wold-style-cast") |
|
134 |
# Warn when a function declaration hides virtual functions from a base class. |
|
135 |
IF(NOT CMAKE_CXX_FLAGS MATCHES "-Woverloaded-virtual") |
|
136 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual") |
|
137 |
ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Woverloaded-virtual") |
|
138 |
# Warn when overload resolution chooses a promotion from unsigned or enumerated type to a signed type, over a conversion to an unsigned type of the same size. |
|
139 |
IF(NOT CMAKE_CXX_FLAGS MATCHES "-Wsign-promo") |
|
140 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-promo") |
|
141 |
ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Wsign-promo") |
|
142 |
# Warn about uninitialized variables which are initialized with themselves. |
|
143 |
IF(NOT CMAKE_CXX_FLAGS MATCHES "-Winit-self") |
|
144 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Winit-self") |
|
145 |
ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Winit-self") |
|
146 |
# # Warn if a user-supplied include directory does not exist. |
|
147 |
# IF(NOT CMAKE_CXX_FLAGS MATCHES "-Wmissing-include-dirs") |
|
148 |
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wmissing-include-dirs") |
|
149 |
# ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Wmissing-include-dirs") |
|
2343
by dagraf at ETHZ
unused parameter warning supressed temporarly to increase clarity |
150 |
# Temporarly supresses the unused parameter warning |
151 |
IF(NOT CMAKE_CXX_FLAGS MATCHES "-Wno-unused-parameter") |
|
152 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") |
|
153 |
ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Wno-unused-parameter") |
|
3633
by mbrantner
-fPIC for g++ and gcc on unix (and not apple) |
154 |
IF(NOT CMAKE_CXX_FLAGS MATCHES "-fPIC") |
4294
by nbrinza
Removed unecessary -fPIC option from the cygwin build |
155 |
IF (UNIX AND NOT APPLE AND NOT CYGWIN) # not for mach libraries |
3633
by mbrantner
-fPIC for g++ and gcc on unix (and not apple) |
156 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") |
4294
by nbrinza
Removed unecessary -fPIC option from the cygwin build |
157 |
ENDIF (UNIX AND NOT APPLE AND NOT CYGWIN) |
3633
by mbrantner
-fPIC for g++ and gcc on unix (and not apple) |
158 |
ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-fPIC") |
6297
by mbrantner
Committing David's work: Reenabled the -fvisibility=hidden option for g++ compilers. This required |
159 |
IF ( ZORBA_GNUCOMPILER_MAJOR_VERSION GREATER 3 ) |
160 |
IF (NOT CMAKE_CXX_FLAGS MATCHES "-fvisibility") |
|
161 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") |
|
162 |
ENDIF (NOT CMAKE_CXX_FLAGS MATCHES "-fvisibility") |
|
163 |
ENDIF ( ZORBA_GNUCOMPILER_MAJOR_VERSION GREATER 3 ) |
|
2340
by dagraf at ETHZ
Waring level increased for visual studio and gcc compiler |
164 |
ENDIF(CMAKE_COMPILER_IS_GNUCXX) |
165 |
||
3771
by mbrantner
make it compile on the mac |
166 |
|
2340
by dagraf at ETHZ
Waring level increased for visual studio and gcc compiler |
167 |
IF(CMAKE_COMPILER_IS_GNUCC) |
2586
by brantmat at ETHZ
hashset for nodes based on node ids and some untested iterators for union, except, and intersect |
168 |
IF (ZORBA_WITH_CODE_COVERAGE) |
169 |
IF (NOT CMAKE_CXX_FLAGS MATCHES "profile-arcs") |
|
170 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs") |
|
171 |
ENDIF (NOT CMAKE_CXX_FLAGS MATCHES "profile-arcs") |
|
172 |
IF (NOT CMAKE_CXX_FLAGS MATCHES "test-coverage") |
|
173 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftest-coverage") |
|
174 |
ENDIF (NOT CMAKE_CXX_FLAGS MATCHES "test-coverage") |
|
3771
by mbrantner
make it compile on the mac |
175 |
IF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "profile-arcs") |
176 |
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs") |
|
177 |
ENDIF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "profile-arcs") |
|
178 |
IF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "test-coverage") |
|
179 |
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_FLAGS} -ftest-coverage") |
|
180 |
ENDIF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "test-coverage") |
|
2586
by brantmat at ETHZ
hashset for nodes based on node ids and some untested iterators for union, except, and intersect |
181 |
ENDIF (ZORBA_WITH_CODE_COVERAGE) |
2340
by dagraf at ETHZ
Waring level increased for visual studio and gcc compiler |
182 |
IF(NOT CMAKE_C_FLAGS MATCHES "-Wall") |
183 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") |
|
184 |
ENDIF(NOT CMAKE_C_FLAGS MATCHES "-Wall") |
|
185 |
IF(NOT CMAKE_C_FLAGS MATCHES "-Wextra") |
|
186 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra") |
|
187 |
ENDIF(NOT CMAKE_C_FLAGS MATCHES "-Wextra") |
|
3486
by davidagraf
first part of C API code added |
188 |
IF(NOT CMAKE_C_FLAGS MATCHES "-Wno-unused-parameter") |
189 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter") |
|
190 |
ENDIF(NOT CMAKE_C_FLAGS MATCHES "-Wno-unused-parameter") |
|
2340
by dagraf at ETHZ
Waring level increased for visual studio and gcc compiler |
191 |
# Warn about uninitialized variables which are initialized with themselves. |
192 |
IF(NOT CMAKE_C_FLAGS MATCHES "-Winit-self") |
|
193 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Winit-self") |
|
194 |
ENDIF(NOT CMAKE_C_FLAGS MATCHES "-Winit-self") |
|
7966
by nbrinza
Increased the GCC version requirement for the -Werror=declaration-after-statement option to 4.2.4 |
195 |
# Bug 2936209 - apparently this option doesn't work in 4.0.1 . It seems it doesn't work before 4.2.4 either. |
196 |
COMPARE_VERSION_STRINGS("${ZORBA_GNUCOMPILER_VERSION}" "4.2.4" ZORBA_GNUCOMPILER_COMPARISON) |
|
7239
by wcandillon
Fix build with gcc 4.0.1 |
197 |
IF (ZORBA_GNUCOMPILER_COMPARISON GREATER 0) |
198 |
MESSAGE(STATUS "GNU Compiler version greater than 4.0.1") |
|
199 |
IF(NOT CMAKE_C_FLAGS MATCHES "-Werror=declaration-after-statement") |
|
200 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=declaration-after-statement") |
|
201 |
ENDIF(NOT CMAKE_C_FLAGS MATCHES "-Werror=declaration-after-statement") |
|
202 |
ENDIF (ZORBA_GNUCOMPILER_COMPARISON GREATER 0) |
|
203 |
||
204 |
||
205 |
#IF (ZORBA_GNUCOMPILER_VERSION STREQUAL "4.0.1") |
|
206 |
# IF(NOT CMAKE_C_FLAGS MATCHES "-Werror=declaration-after-statement") |
|
207 |
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=declaration-after-statement") |
|
208 |
# ENDIF(NOT CMAKE_C_FLAGS MATCHES "-Werror=declaration-after-statement") |
|
209 |
#ENDIF(ZORBA_GNUCOMPILER_VERSION STREQUAL "4.0.1") |
|
2555
by vborky at ETHZ
Added cake option for code profiling |
210 |
IF (ZORBA_WITH_CODE_COVERAGE) |
211 |
IF (NOT CMAKE_C_FLAGS MATCHES "profile-arcs") |
|
212 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs") |
|
213 |
ENDIF (NOT CMAKE_C_FLAGS MATCHES "profile-arcs") |
|
214 |
IF (NOT CMAKE_C_FLAGS MATCHES "test-coverage") |
|
215 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftest-coverage") |
|
216 |
ENDIF (NOT CMAKE_C_FLAGS MATCHES "test-coverage") |
|
217 |
ENDIF (ZORBA_WITH_CODE_COVERAGE) |
|
3587
by mbrantner
moved linker option to CMakeCompiler.txt and make it work on Apple |
218 |
IF (UNIX AND NOT APPLE) |
219 |
IF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "as-needed") |
|
220 |
SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--as-needed") |
|
221 |
ENDIF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "as-needed") |
|
222 |
ENDIF (UNIX AND NOT APPLE) |
|
3633
by mbrantner
-fPIC for g++ and gcc on unix (and not apple) |
223 |
IF(NOT CMAKE_C_FLAGS MATCHES "-fPIC") |
4294
by nbrinza
Removed unecessary -fPIC option from the cygwin build |
224 |
IF (UNIX AND NOT APPLE AND NOT CYGWIN) # not for mach libraries |
3633
by mbrantner
-fPIC for g++ and gcc on unix (and not apple) |
225 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") |
4294
by nbrinza
Removed unecessary -fPIC option from the cygwin build |
226 |
ENDIF (UNIX AND NOT APPLE AND NOT CYGWIN) |
3633
by mbrantner
-fPIC for g++ and gcc on unix (and not apple) |
227 |
ENDIF(NOT CMAKE_C_FLAGS MATCHES "-fPIC") |
6297
by mbrantner
Committing David's work: Reenabled the -fvisibility=hidden option for g++ compilers. This required |
228 |
IF ( ZORBA_GNUCOMPILER_MAJOR_VERSION GREATER 3 ) |
229 |
IF (NOT CMAKE_C_FLAGS MATCHES "-fvisibility") |
|
230 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") |
|
231 |
ENDIF (NOT CMAKE_C_FLAGS MATCHES "-fvisibility") |
|
232 |
ENDIF ( ZORBA_GNUCOMPILER_MAJOR_VERSION GREATER 3 ) |
|
2340
by dagraf at ETHZ
Waring level increased for visual studio and gcc compiler |
233 |
ENDIF(CMAKE_COMPILER_IS_GNUCC) |