@@ -67,7 +67,7 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
67
67
else ()
68
68
set (CMAKE_USE_SYSTEM_LIBRARY_${util} OFF )
69
69
endif ()
70
- endforeach (util )
70
+ endforeach ()
71
71
if (CMAKE_BOOTSTRAP)
72
72
unset (CMAKE_USE_SYSTEM_LIBRARIES CACHE )
73
73
endif ()
@@ -87,23 +87,23 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
87
87
foreach (util ${UTILITIES} )
88
88
if (CMAKE_USE_SYSTEM_${util} )
89
89
message (STATUS "Using system-installed ${util} " )
90
- endif (CMAKE_USE_SYSTEM_ ${util} )
91
- endforeach (util )
90
+ endif ()
91
+ endforeach ()
92
92
93
93
# Inform utility library header wrappers whether to use system versions.
94
94
configure_file (${CMake_SOURCE_DIR} /Utilities/cmThirdParty.h.in
95
95
${CMake_BINARY_DIR} /Utilities/cmThirdParty.h
96
96
@ONLY)
97
97
98
- endmacro (CMAKE_HANDLE_SYSTEM_LIBRARIES )
98
+ endmacro ()
99
99
100
100
101
101
102
102
103
103
set (CMAKE_BUILD_ON_VISUAL_STUDIO 0)
104
104
if (WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
105
105
set (CMAKE_BUILD_ON_VISUAL_STUDIO 1)
106
- endif (WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
106
+ endif ()
107
107
108
108
109
109
#-----------------------------------------------------------------------
@@ -113,7 +113,7 @@ endif(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
113
113
macro (CMAKE_SETUP_TESTING)
114
114
if (NOT DART_ROOT)
115
115
set (MAKEPROGRAM ${CMAKE_MAKE_PROGRAM} )
116
- endif (NOT DART_ROOT )
116
+ endif ()
117
117
118
118
if (BUILD_TESTING)
119
119
set (CMAKE_TEST_GENERATOR "" CACHE STRING
@@ -123,28 +123,28 @@ macro(CMAKE_SETUP_TESTING)
123
123
if (NOT CMAKE_TEST_GENERATOR)
124
124
set (CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR} " )
125
125
set (CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM} " )
126
- else (NOT CMAKE_TEST_GENERATOR )
126
+ else ()
127
127
set (CMAKE_TEST_DIFFERENT_GENERATOR TRUE )
128
- endif (NOT CMAKE_TEST_GENERATOR )
128
+ endif ()
129
129
130
130
# Are we testing with the MSVC compiler?
131
131
set (CMAKE_TEST_MSVC 0)
132
132
if (MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
133
133
set (CMAKE_TEST_MSVC 1)
134
- else (MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR )
134
+ else ()
135
135
if ("${CMAKE_TEST_GENERATOR} " MATCHES "NMake" OR
136
136
"${CMAKE_TEST_GENERATOR} " MATCHES "Visual Studio" )
137
137
set (CMAKE_TEST_MSVC 1)
138
138
endif ("${CMAKE_TEST_GENERATOR} " MATCHES "NMake" OR
139
139
"${CMAKE_TEST_GENERATOR} " MATCHES "Visual Studio" )
140
- endif (MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR )
140
+ endif ()
141
141
142
142
set (CMAKE_TEST_SYSTEM_LIBRARIES 0)
143
143
foreach (util CURL EXPAT XMLRPC ZLIB)
144
144
if (CMAKE_USE_SYSTEM_${util} )
145
145
set (CMAKE_TEST_SYSTEM_LIBRARIES 1)
146
- endif (CMAKE_USE_SYSTEM_ ${util} )
147
- endforeach (util )
146
+ endif ()
147
+ endforeach ()
148
148
149
149
# This variable is set by cmake, however to
150
150
# test cmake we want to make sure that
@@ -154,7 +154,7 @@ macro(CMAKE_SETUP_TESTING)
154
154
set (CMAKE_CTEST_COMMAND "${CMake_BIN_DIR} /ctest" )
155
155
set (CMAKE_CMAKE_COMMAND "${CMake_BIN_DIR} /cmake" )
156
156
set (CMAKE_CPACK_COMMAND "${CMake_BIN_DIR} /cpack" )
157
- endif (BUILD_TESTING )
157
+ endif ()
158
158
159
159
# configure some files for testing
160
160
configure_file ("${CMAKE_CURRENT_SOURCE_DIR} /Templates/CTestScript.cmake.in"
@@ -171,10 +171,10 @@ macro(CMAKE_SETUP_TESTING)
171
171
if (BUILD_TESTING AND DART_ROOT)
172
172
configure_file (${CMake_SOURCE_DIR} /CMakeLogo.gif
173
173
${CMake_BINARY_DIR} /Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY )
174
- endif (BUILD_TESTING AND DART_ROOT )
174
+ endif ()
175
175
mark_as_advanced (DART_ROOT)
176
176
mark_as_advanced (CURL_TESTING)
177
- endmacro (CMAKE_SETUP_TESTING )
177
+ endmacro ()
178
178
179
179
180
180
# Provide a way for Visual Studio Express users to turn OFF the new FOLDER
@@ -205,7 +205,7 @@ macro(CMAKE_SET_TARGET_FOLDER tgt folder)
205
205
else ()
206
206
set_property (GLOBAL PROPERTY USE_FOLDERS OFF )
207
207
endif ()
208
- endmacro (CMAKE_SET_TARGET_FOLDER )
208
+ endmacro ()
209
209
210
210
211
211
#-----------------------------------------------------------------------
@@ -266,15 +266,15 @@ macro (CMAKE_BUILD_UTILITIES)
266
266
if (NOT ZLIB_FOUND)
267
267
message (FATAL_ERROR
268
268
"CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!" )
269
- endif (NOT ZLIB_FOUND )
269
+ endif ()
270
270
set (CMAKE_ZLIB_INCLUDES ${ZLIB_INCLUDE_DIR} )
271
271
set (CMAKE_ZLIB_LIBRARIES ${ZLIB_LIBRARIES} )
272
- else (CMAKE_USE_SYSTEM_ZLIB )
272
+ else ()
273
273
set (CMAKE_ZLIB_INCLUDES ${CMake_SOURCE_DIR} /Utilities)
274
274
set (CMAKE_ZLIB_LIBRARIES cmzlib)
275
275
add_subdirectory (Utilities/cmzlib)
276
276
CMAKE_SET_TARGET_FOLDER(cmzlib "Utilities/3rdParty" )
277
- endif (CMAKE_USE_SYSTEM_ZLIB )
277
+ endif ()
278
278
279
279
#---------------------------------------------------------------------
280
280
# Build Curl library for CTest.
@@ -283,26 +283,26 @@ macro (CMAKE_BUILD_UTILITIES)
283
283
if (NOT CURL_FOUND)
284
284
message (FATAL_ERROR
285
285
"CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!" )
286
- endif (NOT CURL_FOUND )
286
+ endif ()
287
287
set (CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS} )
288
288
set (CMAKE_CURL_LIBRARIES ${CURL_LIBRARIES} )
289
- else (CMAKE_USE_SYSTEM_CURL )
289
+ else ()
290
290
set (CURL_SPECIAL_ZLIB_H ${CMAKE_ZLIB_HEADER} )
291
291
set (CURL_SPECIAL_LIBZ_INCLUDES ${CMAKE_ZLIB_INCLUDES} )
292
292
set (CURL_SPECIAL_LIBZ ${CMAKE_ZLIB_LIBRARIES} )
293
293
option (CMAKE_BUILD_CURL_SHARED "Should curl be built shared" FALSE )
294
294
if (NOT CMAKE_BUILD_CURL_SHARED)
295
295
add_definitions (-DCURL_STATICLIB)
296
- endif (NOT CMAKE_BUILD_CURL_SHARED )
296
+ endif ()
297
297
set (CMAKE_CURL_INCLUDES)
298
298
set (CMAKE_CURL_LIBRARIES cmcurl)
299
299
if (CMAKE_TESTS_CDASH_SERVER)
300
300
set (CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER} /user.php" )
301
- endif (CMAKE_TESTS_CDASH_SERVER )
301
+ endif ()
302
302
add_subdirectory (Utilities/cmcurl)
303
303
CMAKE_SET_TARGET_FOLDER(cmcurl "Utilities/3rdParty" )
304
304
CMAKE_SET_TARGET_FOLDER(LIBCURL "Utilities/3rdParty" )
305
- endif (CMAKE_USE_SYSTEM_CURL )
305
+ endif ()
306
306
307
307
#---------------------------------------------------------------------
308
308
# Build Compress library for CTest.
@@ -334,7 +334,7 @@ macro (CMAKE_BUILD_UTILITIES)
334
334
endif ()
335
335
set (CMAKE_TAR_INCLUDES ${LibArchive_INCLUDE_DIRS} )
336
336
set (CMAKE_TAR_LIBRARIES ${LibArchive_LIBRARIES} )
337
- else (CMAKE_USE_SYSTEM_LIBARCHIVE )
337
+ else ()
338
338
set (ZLIB_INCLUDE_DIR ${CMAKE_ZLIB_INCLUDES} )
339
339
set (ZLIB_LIBRARY ${CMAKE_ZLIB_LIBRARIES} )
340
340
add_definitions (-DLIBARCHIVE_STATIC)
@@ -346,7 +346,7 @@ macro (CMAKE_BUILD_UTILITIES)
346
346
add_subdirectory (Utilities/cmlibarchive)
347
347
CMAKE_SET_TARGET_FOLDER(cmlibarchive "Utilities/3rdParty" )
348
348
set (CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES} )
349
- endif (CMAKE_USE_SYSTEM_LIBARCHIVE )
349
+ endif ()
350
350
351
351
#---------------------------------------------------------------------
352
352
# Build expat library for CMake and CTest.
@@ -355,15 +355,15 @@ macro (CMAKE_BUILD_UTILITIES)
355
355
if (NOT EXPAT_FOUND)
356
356
message (FATAL_ERROR
357
357
"CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!" )
358
- endif (NOT EXPAT_FOUND )
358
+ endif ()
359
359
set (CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS} )
360
360
set (CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES} )
361
- else (CMAKE_USE_SYSTEM_EXPAT )
361
+ else ()
362
362
set (CMAKE_EXPAT_INCLUDES)
363
363
set (CMAKE_EXPAT_LIBRARIES cmexpat)
364
364
add_subdirectory (Utilities/cmexpat)
365
365
CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty" )
366
- endif (CMAKE_USE_SYSTEM_EXPAT )
366
+ endif ()
367
367
368
368
#---------------------------------------------------------------------
369
369
# Build XMLRPC library for CMake and CTest.
@@ -372,10 +372,10 @@ macro (CMAKE_BUILD_UTILITIES)
372
372
if (NOT XMLRPC_FOUND)
373
373
message (FATAL_ERROR
374
374
"CTEST_USE_XMLRPC is ON but xmlrpc is not found!" )
375
- endif (NOT XMLRPC_FOUND )
375
+ endif ()
376
376
set (CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS} )
377
377
set (CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES} )
378
- endif (CTEST_USE_XMLRPC )
378
+ endif ()
379
379
380
380
#---------------------------------------------------------------------
381
381
# Use curses?
@@ -386,20 +386,20 @@ macro (CMAKE_BUILD_UTILITIES)
386
386
find_package (Curses QUIET )
387
387
if (CURSES_LIBRARY)
388
388
option (BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON )
389
- else (CURSES_LIBRARY )
389
+ else ()
390
390
message ("Curses libraries were not found. Curses GUI for CMake will not be built." )
391
391
set (BUILD_CursesDialog 0)
392
- endif (CURSES_LIBRARY )
393
- else (NOT " ${CMAKE_SYSTEM_NAME} " MATCHES syllable )
392
+ endif ()
393
+ else ()
394
394
set (BUILD_CursesDialog 0)
395
- endif (NOT " ${CMAKE_SYSTEM_NAME} " MATCHES syllable )
396
- else (UNIX )
395
+ endif ()
396
+ else ()
397
397
set (BUILD_CursesDialog 0)
398
- endif (UNIX )
398
+ endif ()
399
399
if (BUILD_CursesDialog)
400
400
add_subdirectory (Source /CursesDialog/form)
401
- endif (BUILD_CursesDialog )
402
- endmacro (CMAKE_BUILD_UTILITIES )
401
+ endif ()
402
+ endmacro ()
403
403
404
404
#-----------------------------------------------------------------------
405
405
if (CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD" )
@@ -509,7 +509,7 @@ CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
509
509
#
510
510
if ("x${CMAKE_TESTS_CDASH_SERVER} " STREQUAL "x" )
511
511
set (CMAKE_TESTS_CDASH_SERVER "http://www.cdash.org/CDash" )
512
- endif ("x ${CMAKE_TESTS_CDASH_SERVER} " STREQUAL "x" )
512
+ endif ()
513
513
514
514
# build the utilities (a macro defined in this file)
515
515
CMAKE_BUILD_UTILITIES()
@@ -524,8 +524,8 @@ if(BUILD_CursesDialog)
524
524
set (CURSES_NEED_RPATH FALSE )
525
525
if (NOT "${_CURSES_DIR} " STREQUAL "/lib" AND NOT "${_CURSES_DIR} " STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR} " STREQUAL "/lib64" AND NOT "${_CURSES_DIR} " STREQUAL "/usr/lib64" )
526
526
set (CURSES_NEED_RPATH TRUE )
527
- endif (NOT " ${_CURSES_DIR} " STREQUAL "/lib" AND NOT " ${_CURSES_DIR} " STREQUAL "/usr/lib" AND NOT " ${_CURSES_DIR} " STREQUAL "/lib64" AND NOT " ${_CURSES_DIR} " STREQUAL "/usr/lib64" )
528
- endif (BUILD_CursesDialog )
527
+ endif ()
528
+ endif ()
529
529
530
530
if (BUILD_QtDialog)
531
531
if (APPLE )
@@ -538,16 +538,16 @@ if(BUILD_QtDialog)
538
538
string (SUBSTRING "${CMAKE_INSTALL_PREFIX} " ${LEN} 1 ENDCH)
539
539
if (NOT "${ENDCH} " STREQUAL "/" )
540
540
set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX} /" )
541
- endif (NOT " ${ENDCH} " STREQUAL "/" )
541
+ endif ()
542
542
set (CMAKE_INSTALL_PREFIX
543
543
"${CMAKE_INSTALL_PREFIX}${CMAKE_BUNDLE_NAME} .app/Contents" )
544
- endif (APPLE )
544
+ endif ()
545
545
546
546
set (QT_NEED_RPATH FALSE )
547
547
if (NOT "${QT_LIBRARY_DIR} " STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR} " STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR} " STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR} " STREQUAL "/usr/lib64" )
548
548
set (QT_NEED_RPATH TRUE )
549
- endif (NOT " ${QT_LIBRARY_DIR} " STREQUAL "/lib" AND NOT " ${QT_LIBRARY_DIR} " STREQUAL "/usr/lib" AND NOT " ${QT_LIBRARY_DIR} " STREQUAL "/lib64" AND NOT " ${QT_LIBRARY_DIR} " STREQUAL "/usr/lib64" )
550
- endif (BUILD_QtDialog )
549
+ endif ()
550
+ endif ()
551
551
552
552
553
553
# The same might be true on other systems for other libraries.
@@ -563,7 +563,7 @@ if (UNIX)
563
563
set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE )
564
564
endif (CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB
565
565
OR CMAKE_USE_SYSTEM_EXPAT OR CTEST_USE_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH)
566
- endif (UNIX )
566
+ endif ()
567
567
568
568
569
569
# add the uninstall support
0 commit comments