Remove CMake-language block-end command arguments

Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
This commit is contained in:
Kitware Robot 2012-08-13 13:50:14 -04:00 committed by Brad King
parent 77543bde41
commit 9db3116226
385 changed files with 4107 additions and 4107 deletions

View File

@ -23,7 +23,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
endif()
include(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake)
endif(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
endif()
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
set(CPACK_PACKAGE_VENDOR "Kitware")
@ -56,17 +56,17 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# cygwin is good for the system name
if("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
set(CPACK_SYSTEM_NAME Cygwin)
else("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
else()
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
endif("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
endif(NOT DEFINED CPACK_SYSTEM_NAME)
endif()
endif()
if(${CPACK_SYSTEM_NAME} MATCHES Windows)
if(CMAKE_CL_64)
set(CPACK_SYSTEM_NAME win64-x64)
else(CMAKE_CL_64)
else()
set(CPACK_SYSTEM_NAME win32-x86)
endif(CMAKE_CL_64)
endif(${CPACK_SYSTEM_NAME} MATCHES Windows)
endif()
endif()
if(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
# if the CPACK_PACKAGE_FILE_NAME is not defined by the cache
@ -74,11 +74,11 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# needed
if(CYGWIN)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
else(CYGWIN)
else()
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
endif(CYGWIN)
endif(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
endif()
endif()
set(CPACK_PACKAGE_CONTACT "cmake@cmake.org")
@ -86,7 +86,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
set(CPACK_STRIP_FILES "bin/ccmake;bin/cmake;bin/cpack;bin/ctest")
set(CPACK_SOURCE_STRIP_FILES "")
set(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake")
endif(UNIX)
endif()
# cygwin specific packaging stuff
if(CYGWIN)
@ -110,7 +110,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# configures some files and adds some install targets
# this file uses some of the package file name variables
include(Utilities/Release/Cygwin/CMakeLists.txt)
endif(CYGWIN)
endif()
# Set the options file that needs to be included inside CMakeCPackOptions.cmake
set(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake)
@ -120,4 +120,4 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# include CPack model once all variables are set
include(CPack)
endif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
endif()

View File

@ -32,7 +32,7 @@ if(CPACK_GENERATOR MATCHES "NSIS")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.kitware.com")
set(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@)
set(CPACK_NSIS_MODIFY_PATH ON)
endif(CPACK_GENERATOR MATCHES "NSIS")
endif()
# include the cpack options for qt dialog if they exisit
# they might not if qt was not enabled for the build
@ -42,12 +42,12 @@ if(CPACK_GENERATOR MATCHES "CygwinSource")
# when packaging source make sure the .build directory is not included
set(CPACK_SOURCE_IGNORE_FILES
"/CVS/" "/\\.build/" "/\\.svn/" "\\.swp$" "\\.#" "/#" "~$")
endif(CPACK_GENERATOR MATCHES "CygwinSource")
endif()
if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
if(CMAKE_PACKAGE_QTGUI)
set(CPACK_PACKAGE_DEFAULT_LOCATION "/Applications")
else(CMAKE_PACKAGE_QTGUI)
else()
set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
endif(CMAKE_PACKAGE_QTGUI)
endif("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
endif()
endif()

View File

@ -67,7 +67,7 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
else()
set(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
endif()
endforeach(util)
endforeach()
if(CMAKE_BOOTSTRAP)
unset(CMAKE_USE_SYSTEM_LIBRARIES CACHE)
endif()
@ -87,15 +87,15 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
foreach(util ${UTILITIES})
if(CMAKE_USE_SYSTEM_${util})
message(STATUS "Using system-installed ${util}")
endif(CMAKE_USE_SYSTEM_${util})
endforeach(util)
endif()
endforeach()
# Inform utility library header wrappers whether to use system versions.
configure_file(${CMake_SOURCE_DIR}/Utilities/cmThirdParty.h.in
${CMake_BINARY_DIR}/Utilities/cmThirdParty.h
@ONLY)
endmacro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
endmacro()
@ -103,7 +103,7 @@ endmacro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
set(CMAKE_BUILD_ON_VISUAL_STUDIO 0)
if(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
set(CMAKE_BUILD_ON_VISUAL_STUDIO 1)
endif(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
endif()
#-----------------------------------------------------------------------
@ -113,7 +113,7 @@ endif(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
macro(CMAKE_SETUP_TESTING)
if (NOT DART_ROOT)
set(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM})
endif (NOT DART_ROOT)
endif ()
if(BUILD_TESTING)
set(CMAKE_TEST_GENERATOR "" CACHE STRING
@ -123,28 +123,28 @@ macro(CMAKE_SETUP_TESTING)
if(NOT CMAKE_TEST_GENERATOR)
set(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
set(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}")
else(NOT CMAKE_TEST_GENERATOR)
else()
set(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
endif(NOT CMAKE_TEST_GENERATOR)
endif()
# Are we testing with the MSVC compiler?
set(CMAKE_TEST_MSVC 0)
if(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
set(CMAKE_TEST_MSVC 1)
else(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
else()
if("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
"${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio")
set(CMAKE_TEST_MSVC 1)
endif("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
"${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio")
endif(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
endif()
set(CMAKE_TEST_SYSTEM_LIBRARIES 0)
foreach(util CURL EXPAT XMLRPC ZLIB)
if(CMAKE_USE_SYSTEM_${util})
set(CMAKE_TEST_SYSTEM_LIBRARIES 1)
endif(CMAKE_USE_SYSTEM_${util})
endforeach(util)
endif()
endforeach()
# This variable is set by cmake, however to
# test cmake we want to make sure that
@ -154,7 +154,7 @@ macro(CMAKE_SETUP_TESTING)
set(CMAKE_CTEST_COMMAND "${CMake_BIN_DIR}/ctest")
set(CMAKE_CMAKE_COMMAND "${CMake_BIN_DIR}/cmake")
set(CMAKE_CPACK_COMMAND "${CMake_BIN_DIR}/cpack")
endif(BUILD_TESTING)
endif()
# configure some files for testing
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Templates/CTestScript.cmake.in"
@ -171,10 +171,10 @@ macro(CMAKE_SETUP_TESTING)
if(BUILD_TESTING AND DART_ROOT)
configure_file(${CMake_SOURCE_DIR}/CMakeLogo.gif
${CMake_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY)
endif(BUILD_TESTING AND DART_ROOT)
endif()
mark_as_advanced(DART_ROOT)
mark_as_advanced(CURL_TESTING)
endmacro(CMAKE_SETUP_TESTING)
endmacro()
# 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)
else()
set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
endif()
endmacro(CMAKE_SET_TARGET_FOLDER)
endmacro()
#-----------------------------------------------------------------------
@ -266,15 +266,15 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT ZLIB_FOUND)
message(FATAL_ERROR
"CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!")
endif(NOT ZLIB_FOUND)
endif()
set(CMAKE_ZLIB_INCLUDES ${ZLIB_INCLUDE_DIR})
set(CMAKE_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
else(CMAKE_USE_SYSTEM_ZLIB)
else()
set(CMAKE_ZLIB_INCLUDES ${CMake_SOURCE_DIR}/Utilities)
set(CMAKE_ZLIB_LIBRARIES cmzlib)
add_subdirectory(Utilities/cmzlib)
CMAKE_SET_TARGET_FOLDER(cmzlib "Utilities/3rdParty")
endif(CMAKE_USE_SYSTEM_ZLIB)
endif()
#---------------------------------------------------------------------
# Build Curl library for CTest.
@ -283,26 +283,26 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT CURL_FOUND)
message(FATAL_ERROR
"CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!")
endif(NOT CURL_FOUND)
endif()
set(CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS})
set(CMAKE_CURL_LIBRARIES ${CURL_LIBRARIES})
else(CMAKE_USE_SYSTEM_CURL)
else()
set(CURL_SPECIAL_ZLIB_H ${CMAKE_ZLIB_HEADER})
set(CURL_SPECIAL_LIBZ_INCLUDES ${CMAKE_ZLIB_INCLUDES})
set(CURL_SPECIAL_LIBZ ${CMAKE_ZLIB_LIBRARIES})
option(CMAKE_BUILD_CURL_SHARED "Should curl be built shared" FALSE)
if(NOT CMAKE_BUILD_CURL_SHARED)
add_definitions(-DCURL_STATICLIB)
endif(NOT CMAKE_BUILD_CURL_SHARED)
endif()
set(CMAKE_CURL_INCLUDES)
set(CMAKE_CURL_LIBRARIES cmcurl)
if(CMAKE_TESTS_CDASH_SERVER)
set(CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER}/user.php")
endif(CMAKE_TESTS_CDASH_SERVER)
endif()
add_subdirectory(Utilities/cmcurl)
CMAKE_SET_TARGET_FOLDER(cmcurl "Utilities/3rdParty")
CMAKE_SET_TARGET_FOLDER(LIBCURL "Utilities/3rdParty")
endif(CMAKE_USE_SYSTEM_CURL)
endif()
#---------------------------------------------------------------------
# Build Compress library for CTest.
@ -334,7 +334,7 @@ macro (CMAKE_BUILD_UTILITIES)
endif()
set(CMAKE_TAR_INCLUDES ${LibArchive_INCLUDE_DIRS})
set(CMAKE_TAR_LIBRARIES ${LibArchive_LIBRARIES})
else(CMAKE_USE_SYSTEM_LIBARCHIVE)
else()
set(ZLIB_INCLUDE_DIR ${CMAKE_ZLIB_INCLUDES})
set(ZLIB_LIBRARY ${CMAKE_ZLIB_LIBRARIES})
add_definitions(-DLIBARCHIVE_STATIC)
@ -346,7 +346,7 @@ macro (CMAKE_BUILD_UTILITIES)
add_subdirectory(Utilities/cmlibarchive)
CMAKE_SET_TARGET_FOLDER(cmlibarchive "Utilities/3rdParty")
set(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES})
endif(CMAKE_USE_SYSTEM_LIBARCHIVE)
endif()
#---------------------------------------------------------------------
# Build expat library for CMake and CTest.
@ -355,15 +355,15 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT EXPAT_FOUND)
message(FATAL_ERROR
"CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!")
endif(NOT EXPAT_FOUND)
endif()
set(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS})
set(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES})
else(CMAKE_USE_SYSTEM_EXPAT)
else()
set(CMAKE_EXPAT_INCLUDES)
set(CMAKE_EXPAT_LIBRARIES cmexpat)
add_subdirectory(Utilities/cmexpat)
CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty")
endif(CMAKE_USE_SYSTEM_EXPAT)
endif()
#---------------------------------------------------------------------
# Build XMLRPC library for CMake and CTest.
@ -372,10 +372,10 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT XMLRPC_FOUND)
message(FATAL_ERROR
"CTEST_USE_XMLRPC is ON but xmlrpc is not found!")
endif(NOT XMLRPC_FOUND)
endif()
set(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS})
set(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES})
endif(CTEST_USE_XMLRPC)
endif()
#---------------------------------------------------------------------
# Use curses?
@ -386,20 +386,20 @@ macro (CMAKE_BUILD_UTILITIES)
find_package(Curses QUIET)
if (CURSES_LIBRARY)
option(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON)
else (CURSES_LIBRARY)
else ()
message("Curses libraries were not found. Curses GUI for CMake will not be built.")
set(BUILD_CursesDialog 0)
endif (CURSES_LIBRARY)
else(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable)
endif ()
else()
set(BUILD_CursesDialog 0)
endif(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable)
else (UNIX)
endif()
else ()
set(BUILD_CursesDialog 0)
endif (UNIX)
endif ()
if(BUILD_CursesDialog)
add_subdirectory(Source/CursesDialog/form)
endif(BUILD_CursesDialog)
endmacro (CMAKE_BUILD_UTILITIES)
endif()
endmacro ()
#-----------------------------------------------------------------------
if(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
@ -509,7 +509,7 @@ CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
#
if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x")
set(CMAKE_TESTS_CDASH_SERVER "http://www.cdash.org/CDash")
endif("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x")
endif()
# build the utilities (a macro defined in this file)
CMAKE_BUILD_UTILITIES()
@ -524,8 +524,8 @@ if(BUILD_CursesDialog)
set(CURSES_NEED_RPATH FALSE)
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")
set(CURSES_NEED_RPATH TRUE)
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")
endif(BUILD_CursesDialog)
endif()
endif()
if(BUILD_QtDialog)
if(APPLE)
@ -538,16 +538,16 @@ if(BUILD_QtDialog)
string(SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH)
if(NOT "${ENDCH}" STREQUAL "/")
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
endif(NOT "${ENDCH}" STREQUAL "/")
endif()
set(CMAKE_INSTALL_PREFIX
"${CMAKE_INSTALL_PREFIX}${CMAKE_BUNDLE_NAME}.app/Contents")
endif(APPLE)
endif()
set(QT_NEED_RPATH FALSE)
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")
set(QT_NEED_RPATH TRUE)
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")
endif(BUILD_QtDialog)
endif()
endif()
# The same might be true on other systems for other libraries.
@ -563,7 +563,7 @@ if (UNIX)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
endif(CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB
OR CMAKE_USE_SYSTEM_EXPAT OR CTEST_USE_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH)
endif (UNIX)
endif ()
# add the uninstall support

View File

@ -61,14 +61,14 @@ if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
"XCode"
)
endif (NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
endif ()
if(NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop")
set(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
"Kdevelop"
)
endif (NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop")
endif ()
set(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE}

View File

@ -15,10 +15,10 @@
#
if(CMAKE_GENERATOR MATCHES "Visual Studio 7")
set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
endif(CMAKE_GENERATOR MATCHES "Visual Studio 7")
endif()
if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
endif(CMAKE_GENERATOR MATCHES "Visual Studio 6")
endif()
include (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
if(WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
@ -38,27 +38,27 @@ endif()
if(CMAKE_SYSTEM MATCHES "AIX.*")
if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ")
endif(NOT CMAKE_COMPILER_IS_GNUCXX)
endif(CMAKE_SYSTEM MATCHES "AIX.*")
endif()
endif()
if(CMAKE_SYSTEM MATCHES "IRIX.*")
if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15")
endif(NOT CMAKE_COMPILER_IS_GNUCXX)
endif(CMAKE_SYSTEM MATCHES "IRIX.*")
endif()
endif()
if(CMAKE_SYSTEM MATCHES "OSF1-V.*")
if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
endif(NOT CMAKE_COMPILER_IS_GNUCXX)
endif(CMAKE_SYSTEM MATCHES "OSF1-V.*")
endif()
endif()
# use the ansi CXX compile flag for building cmake
if (CMAKE_ANSI_CXXFLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
endif (CMAKE_ANSI_CXXFLAGS)
endif ()
if (CMAKE_ANSI_CFLAGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
endif (CMAKE_ANSI_CFLAGS)
endif ()

View File

@ -20,10 +20,10 @@ macro(ADD_FILE_DEPENDENCIES _file)
get_source_file_property(_deps ${_file} OBJECT_DEPENDS)
if (_deps)
set(_deps ${_deps} ${ARGN})
else (_deps)
else ()
set(_deps ${ARGN})
endif (_deps)
endif ()
set_source_files_properties(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}")
endmacro(ADD_FILE_DEPENDENCIES)
endmacro()

View File

@ -184,17 +184,17 @@ function(get_bundle_main_executable bundle result_var)
if(line_is_main_executable)
string(REGEX REPLACE "^.*<string>(.*)</string>.*$" "\\1" bundle_executable "${line}")
break()
endif(line_is_main_executable)
endif()
if(line MATCHES "^.*<key>CFBundleExecutable</key>.*$")
set(line_is_main_executable 1)
endif(line MATCHES "^.*<key>CFBundleExecutable</key>.*$")
endforeach(line)
endif()
endforeach()
if(NOT "${bundle_executable}" STREQUAL "")
if(EXISTS "${bundle}/Contents/MacOS/${bundle_executable}")
set(result "${bundle}/Contents/MacOS/${bundle_executable}")
else(EXISTS "${bundle}/Contents/MacOS/${bundle_executable}")
else()
# Ultimate goal:
# If not in "Contents/MacOS" then scan the bundle for matching files. If
@ -207,9 +207,9 @@ function(get_bundle_main_executable bundle result_var)
# for the bundle to be in Contents/MacOS, it's an error if it's not:
#
set(result "error: '${bundle}/Contents/MacOS/${bundle_executable}' does not exist")
endif(EXISTS "${bundle}/Contents/MacOS/${bundle_executable}")
endif(NOT "${bundle_executable}" STREQUAL "")
else(EXISTS "${bundle}/Contents/Info.plist")
endif()
endif()
else()
#
# More inclusive technique... (This one would work on Windows and Linux
# too, if a developer followed the typical Mac bundle naming convention...)
@ -217,10 +217,10 @@ function(get_bundle_main_executable bundle result_var)
# If there is no Info.plist file, try to find an executable with the same
# base name as the .app directory:
#
endif(EXISTS "${bundle}/Contents/Info.plist")
endif()
set(${result_var} "${result}" PARENT_SCOPE)
endfunction(get_bundle_main_executable)
endfunction()
function(get_dotapp_dir exe dotapp_dir_var)
@ -240,9 +240,9 @@ function(get_dotapp_dir exe dotapp_dir_var)
if(sname MATCHES "\\.app$")
set(done 1)
set(dotapp_dir "${sdir}/${sname}")
endif(sname MATCHES "\\.app$")
endwhile(NOT ${done})
else(s MATCHES "^.*/.*\\.app/.*$")
endif()
endwhile()
else()
# Otherwise use a directory containing the exe
# (typical of a non-bundle executable on Mac, Windows or Linux)
#
@ -250,14 +250,14 @@ function(get_dotapp_dir exe dotapp_dir_var)
if(is_executable)
get_filename_component(sdir "${s}" PATH)
set(dotapp_dir "${sdir}")
else(is_executable)
else()
set(dotapp_dir "${s}")
endif(is_executable)
endif(s MATCHES "^.*/.*\\.app/.*$")
endif()
endif()
set(${dotapp_dir_var} "${dotapp_dir}" PARENT_SCOPE)
endfunction(get_dotapp_dir)
endfunction()
function(get_bundle_and_executable app bundle_var executable_var valid_var)
@ -273,13 +273,13 @@ function(get_bundle_and_executable app bundle_var executable_var valid_var)
set(${executable_var} "${executable}" PARENT_SCOPE)
set(valid 1)
#message(STATUS "info: handled .app directory case...")
else(EXISTS "${app}" AND EXISTS "${executable}")
else()
message(STATUS "warning: *NOT* handled - .app directory case...")
endif(EXISTS "${app}" AND EXISTS "${executable}")
else(app MATCHES "\\.app$")
endif()
else()
message(STATUS "warning: *NOT* handled - directory but not .app case...")
endif(app MATCHES "\\.app$")
else(IS_DIRECTORY "${app}")
endif()
else()
# Is it an executable file?
is_file_executable("${app}" is_executable)
if(is_executable)
@ -296,21 +296,21 @@ function(get_bundle_and_executable app bundle_var executable_var valid_var)
set(valid 1)
#message(STATUS "info: handled executable file in any dir case...")
endif()
else(is_executable)
else()
message(STATUS "warning: *NOT* handled - not .app dir, not executable file...")
endif(is_executable)
endif(IS_DIRECTORY "${app}")
else(EXISTS "${app}")
endif()
endif()
else()
message(STATUS "warning: *NOT* handled - directory/file does not exist...")
endif(EXISTS "${app}")
endif()
if(NOT valid)
set(${bundle_var} "error: not a bundle" PARENT_SCOPE)
set(${executable_var} "error: not a bundle" PARENT_SCOPE)
endif(NOT valid)
endif()
set(${valid_var} ${valid} PARENT_SCOPE)
endfunction(get_bundle_and_executable)
endfunction()
function(get_bundle_all_executables bundle exes_var)
@ -321,11 +321,11 @@ function(get_bundle_all_executables bundle exes_var)
is_file_executable("${f}" is_executable)
if(is_executable)
set(exes ${exes} "${f}")
endif(is_executable)
endforeach(f)
endif()
endforeach()
set(${exes_var} "${exes}" PARENT_SCOPE)
endfunction(get_bundle_all_executables)
endfunction()
function(get_item_key item key_var)
@ -335,7 +335,7 @@ function(get_item_key item key_var)
endif()
string(REGEX REPLACE "\\." "_" ${key_var} "${item_name}")
set(${key_var} ${${key_var}} PARENT_SCOPE)
endfunction(get_item_key)
endfunction()
function(clear_bundle_keys keys_var)
@ -346,9 +346,9 @@ function(clear_bundle_keys keys_var)
set(${key}_EMBEDDED_ITEM PARENT_SCOPE)
set(${key}_RESOLVED_EMBEDDED_ITEM PARENT_SCOPE)
set(${key}_COPYFLAG PARENT_SCOPE)
endforeach(key)
endforeach()
set(${keys_var} PARENT_SCOPE)
endfunction(clear_bundle_keys)
endfunction()
function(set_bundle_key_values keys_var context item exepath dirs copyflag)
@ -370,12 +370,12 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag)
# opening "${item_name}.framework/" to the closing "/${item_name}":
#
string(REGEX REPLACE "^.*(${item_name}.framework/.*/${item_name}).*$" "${default_embedded_path}/\\1" embedded_item "${item}")
else(item MATCHES "[^/]+\\.framework/")
else()
# For other items, just use the same name as the original, but in the
# embedded path:
#
set(embedded_item "${default_embedded_path}/${item_name}")
endif(item MATCHES "[^/]+\\.framework/")
endif()
# Replace @executable_path and resolve ".." references:
#
@ -391,7 +391,7 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag)
#
if(NOT copyflag)
set(resolved_embedded_item "${resolved_item}")
endif(NOT copyflag)
endif()
set(${keys_var} ${${keys_var}} PARENT_SCOPE)
set(${key}_ITEM "${item}" PARENT_SCOPE)
@ -400,10 +400,10 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag)
set(${key}_EMBEDDED_ITEM "${embedded_item}" PARENT_SCOPE)
set(${key}_RESOLVED_EMBEDDED_ITEM "${resolved_embedded_item}" PARENT_SCOPE)
set(${key}_COPYFLAG "${copyflag}" PARENT_SCOPE)
else(NOT length_before EQUAL length_after)
else()
#message("warning: item key '${key}' already in the list, subsequent references assumed identical to first")
endif(NOT length_before EQUAL length_after)
endfunction(set_bundle_key_values)
endif()
endfunction()
function(get_bundle_keys app libs dirs keys_var)
@ -432,8 +432,8 @@ function(get_bundle_keys app libs dirs keys_var)
get_prerequisites("${lib}" prereqs 1 1 "${exepath}" "${dirs}")
foreach(pr ${prereqs})
set_bundle_key_values(${keys_var} "${lib}" "${pr}" "${exepath}" "${dirs}" 1)
endforeach(pr)
endforeach(lib)
endforeach()
endforeach()
# For each executable found in the bundle, accumulate keys as we go.
# The list of keys should be complete when all prerequisites of all
@ -450,8 +450,8 @@ function(get_bundle_keys app libs dirs keys_var)
get_prerequisites("${exe}" prereqs 1 1 "${exepath}" "${dirs}")
foreach(pr ${prereqs})
set_bundle_key_values(${keys_var} "${exe}" "${pr}" "${exepath}" "${dirs}" 1)
endforeach(pr)
endforeach(exe)
endforeach()
endforeach()
# Propagate values to caller's scope:
#
@ -463,9 +463,9 @@ function(get_bundle_keys app libs dirs keys_var)
set(${key}_EMBEDDED_ITEM "${${key}_EMBEDDED_ITEM}" PARENT_SCOPE)
set(${key}_RESOLVED_EMBEDDED_ITEM "${${key}_RESOLVED_EMBEDDED_ITEM}" PARENT_SCOPE)
set(${key}_COPYFLAG "${${key}_COPYFLAG}" PARENT_SCOPE)
endforeach(key)
endif(valid)
endfunction(get_bundle_keys)
endforeach()
endif()
endfunction()
function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
@ -485,10 +485,10 @@ function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${resolved_item}" "${resolved_embedded_item}")
if(UNIX AND NOT APPLE)
file(RPATH_REMOVE FILE "${resolved_embedded_item}")
endif(UNIX AND NOT APPLE)
endif()
endif()
endfunction(copy_resolved_item_into_bundle)
endfunction()
function(copy_resolved_framework_into_bundle resolved_item resolved_embedded_item)
@ -527,10 +527,10 @@ function(copy_resolved_framework_into_bundle resolved_item resolved_embedded_ite
endif()
if(UNIX AND NOT APPLE)
file(RPATH_REMOVE FILE "${resolved_embedded_item}")
endif(UNIX AND NOT APPLE)
endif()
endif()
endfunction(copy_resolved_framework_into_bundle)
endfunction()
function(fixup_bundle_item resolved_embedded_item exepath dirs)
@ -580,10 +580,10 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs)
if(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
set(changes ${changes} "-change" "${pr}" "${${rkey}_EMBEDDED_ITEM}")
else(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
else()
message("warning: unexpected reference to '${pr}'")
endif(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
endforeach(pr)
endif()
endforeach()
if(BU_CHMOD_BUNDLE_ITEMS)
execute_process(COMMAND chmod u+w "${resolved_embedded_item}")
@ -595,7 +595,7 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs)
execute_process(COMMAND install_name_tool
${changes} -id "${${ikey}_EMBEDDED_ITEM}" "${resolved_embedded_item}"
)
endfunction(fixup_bundle_item)
endfunction()
function(fixup_bundle app libs dirs)
@ -620,9 +620,9 @@ function(fixup_bundle app libs dirs)
math(EXPR i ${i}+1)
if(${${key}_COPYFLAG})
message(STATUS "${i}/${n}: copying '${${key}_RESOLVED_ITEM}'")
else(${${key}_COPYFLAG})
else()
message(STATUS "${i}/${n}: *NOT* copying '${${key}_RESOLVED_ITEM}'")
endif(${${key}_COPYFLAG})
endif()
set(show_status 0)
if(show_status)
@ -634,7 +634,7 @@ function(fixup_bundle app libs dirs)
message(STATUS "resolved_embedded_item='${${key}_RESOLVED_EMBEDDED_ITEM}'")
message(STATUS "copyflag='${${key}_COPYFLAG}'")
message(STATUS "")
endif(show_status)
endif()
if(${${key}_COPYFLAG})
set(item "${${key}_ITEM}")
@ -645,8 +645,8 @@ function(fixup_bundle app libs dirs)
copy_resolved_item_into_bundle("${${key}_RESOLVED_ITEM}"
"${${key}_RESOLVED_EMBEDDED_ITEM}")
endif()
endif(${${key}_COPYFLAG})
endforeach(key)
endif()
endforeach()
message(STATUS "fixup_bundle: fixing...")
foreach(key ${keys})
@ -654,28 +654,28 @@ function(fixup_bundle app libs dirs)
if(APPLE)
message(STATUS "${i}/${n}: fixing up '${${key}_RESOLVED_EMBEDDED_ITEM}'")
fixup_bundle_item("${${key}_RESOLVED_EMBEDDED_ITEM}" "${exepath}" "${dirs}")
else(APPLE)
else()
message(STATUS "${i}/${n}: fix-up not required on this platform '${${key}_RESOLVED_EMBEDDED_ITEM}'")
endif(APPLE)
endforeach(key)
endif()
endforeach()
message(STATUS "fixup_bundle: cleaning up...")
clear_bundle_keys(keys)
message(STATUS "fixup_bundle: verifying...")
verify_app("${app}")
else(valid)
else()
message(SEND_ERROR "error: fixup_bundle: not a valid bundle")
endif(valid)
endif()
message(STATUS "fixup_bundle: done")
endfunction(fixup_bundle)
endfunction()
function(copy_and_fixup_bundle src dst libs dirs)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${src}" "${dst}")
fixup_bundle("${dst}" "${libs}" "${dirs}")
endfunction(copy_and_fixup_bundle)
endfunction()
function(verify_bundle_prerequisites bundle result_var info_var)
@ -720,23 +720,23 @@ function(verify_bundle_prerequisites bundle result_var info_var)
set(external_prereqs ${external_prereqs} "${p}")
endif()
endif()
endforeach(p)
endforeach()
if(external_prereqs)
# Found non-system/somehow-unacceptable prerequisites:
set(result 0)
set(info ${info} "external prerequisites found:\nf='${f}'\nexternal_prereqs='${external_prereqs}'\n")
endif(external_prereqs)
endif(is_executable)
endforeach(f)
endif()
endif()
endforeach()
if(result)
set(info "Verified ${count} executable files in '${bundle}'")
endif(result)
endif()
set(${result_var} "${result}" PARENT_SCOPE)
set(${info_var} "${info}" PARENT_SCOPE)
endfunction(verify_bundle_prerequisites)
endfunction()
function(verify_bundle_symlinks bundle result_var info_var)
@ -749,7 +749,7 @@ function(verify_bundle_symlinks bundle result_var info_var)
set(${result_var} "${result}" PARENT_SCOPE)
set(${info_var} "${info}" PARENT_SCOPE)
endfunction(verify_bundle_symlinks)
endfunction()
function(verify_app app)
@ -778,9 +778,9 @@ function(verify_app app)
message(STATUS "verified='${verified}'")
message(STATUS "info='${info}'")
message(STATUS "")
endif(verified)
endif()
if(NOT verified)
message(FATAL_ERROR "error: verify_app failed")
endif(NOT verified)
endfunction(verify_app)
endif()
endfunction()

View File

@ -14,9 +14,9 @@
if(UNIX)
set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o)
else(UNIX)
else()
set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj)
endif(UNIX)
endif()
set(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I
set(CMAKE_BASE_NAME)
@ -24,36 +24,36 @@ get_filename_component(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAM
if("${CMAKE_BASE_NAME}" STREQUAL "as")
set(CMAKE_BASE_NAME gas)
endif("${CMAKE_BASE_NAME}" STREQUAL "as")
endif()
# Load compiler-specific information.
set(_INCLUDED_FILE "")
if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
include(Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
endif()
if(NOT _INCLUDED_FILE)
if("ASM${ASM_DIALECT}" STREQUAL "ASM")
message(STATUS "Warning: Did not find file Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}")
endif("ASM${ASM_DIALECT}" STREQUAL "ASM")
endif()
include(Platform/${CMAKE_BASE_NAME} OPTIONAL)
endif(NOT _INCLUDED_FILE)
endif()
if(CMAKE_SYSTEM_PROCESSOR)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
if(NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
endif(NOT _INCLUDED_FILE)
endif(CMAKE_SYSTEM_PROCESSOR)
endif()
endif()
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
if(NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
endif(NOT _INCLUDED_FILE)
endif()
# Set default assembler file extensions:
if(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm)
endif(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
endif()
# Support for CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT and friends:
@ -61,7 +61,7 @@ set(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT "$ENV{ASM${ASM_DIALECT}FLAGS} ${CMAKE_ASM
# avoid just having a space as the initial value for the cache
if(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT STREQUAL " ")
set(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT)
endif(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT STREQUAL " ")
endif()
set (CMAKE_ASM${ASM_DIALECT}_FLAGS "${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}" CACHE STRING
"Flags used by the assembler during all build types.")
@ -70,7 +70,7 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
if(NOT CMAKE_NO_BUILD_TYPE)
set (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
"Choose the type of build, options are: None, Debug Release RelWithDebInfo MinSizeRel.")
endif(NOT CMAKE_NO_BUILD_TYPE)
endif()
set (CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG "${CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the assembler during debug builds.")
set (CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL "${CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL_INIT}" CACHE STRING
@ -79,7 +79,7 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
"Flags used by the assembler during release builds.")
set (CMAKE_ASM${ASM_DIALECT}_FLAGS_RELWITHDEBINFO "${CMAKE_ASM${ASM_DIALECT}_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the assembler during Release with Debug Info builds.")
endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
endif()
mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_FLAGS
CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG
@ -91,18 +91,18 @@ mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_FLAGS
if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
endif(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
endif()
if(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
set(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
endif(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
endif()
if(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
set(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
"<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
endif(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
endif()
if(NOT CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG)
set(CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_ASM${ASM_DIALECT}_FLAG})
@ -119,11 +119,11 @@ endif()
# to be done
if(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
set(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
endif(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
endif()
if(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
set(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
endif(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
endif()
set(CMAKE_ASM${ASM_DIALECT}_INFOMATION_LOADED 1)

View File

@ -16,11 +16,11 @@
if(CMAKE_GENERATOR MATCHES "Visual Studio 7")
include(CMakeVS7BackwardCompatibility)
set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
endif(CMAKE_GENERATOR MATCHES "Visual Studio 7")
endif()
if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
include(CMakeVS6BackwardCompatibility)
set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
endif(CMAKE_GENERATOR MATCHES "Visual Studio 6")
endif()
if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
# Old CMake versions did not support OS X universal binaries anyway,
@ -57,10 +57,10 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
if("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
set (CMAKE_X_CFLAGS "" CACHE STRING "X11 extra flags.")
else("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
else()
set (CMAKE_X_CFLAGS "-I${X11_X11_INCLUDE_PATH}" CACHE STRING
"X11 extra flags.")
endif("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
endif()
set (CMAKE_X_LIBS "${X11_LIBRARIES}" CACHE STRING
"Libraries and options used in X11 programs.")
set (CMAKE_HAS_X "${X11_FOUND}" CACHE INTERNAL "Is X11 around.")
@ -86,7 +86,7 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
set(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
set(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
endif()
endif(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
endif()
mark_as_advanced(
CMAKE_HP_PTHREADS

View File

@ -26,10 +26,10 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
set(CMAKE_TRY_ANSI_CXX_FLAGS "")
if(CMAKE_SYSTEM MATCHES "IRIX.*")
set(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std")
endif(CMAKE_SYSTEM MATCHES "IRIX.*")
endif()
if(CMAKE_SYSTEM MATCHES "OSF.*")
set(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname")
endif(CMAKE_SYSTEM MATCHES "OSF.*")
endif()
# if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see
# if the compiler accepts it
if( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
@ -39,9 +39,9 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
if(CMAKE_CXX_ACCEPTS_FLAGS)
set(CMAKE_ANSI_CXXFLAGS ${CMAKE_TRY_ANSI_CXX_FLAGS} CACHE INTERNAL
"What flags are required by the c++ compiler to make it ansi." )
endif(CMAKE_CXX_ACCEPTS_FLAGS)
endif( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
endif(NOT CMAKE_COMPILER_IS_GNUCXX)
endif()
endif()
endif()
set(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
include(TestForANSIStreamHeaders)
@ -50,5 +50,5 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
include(TestForANSIForScope)
include(TestForSSTREAM)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_SAVE}")
endif(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
endif()

View File

@ -14,13 +14,13 @@ set(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
if(CMAKE_COMPILER_IS_CYGWIN)
set(CYGWIN 1)
set(UNIX 1)
endif(CMAKE_COMPILER_IS_CYGWIN)
endif()
set(CMAKE_C_COMPILER_ENV_VAR "CC")
if(CMAKE_COMPILER_IS_MINGW)
set(MINGW 1)
endif(CMAKE_COMPILER_IS_MINGW)
endif()
set(CMAKE_C_COMPILER_ID_RUN 1)
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c)
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
@ -33,11 +33,11 @@ set(CMAKE_C_LIBRARY_ARCHITECTURE "@CMAKE_C_LIBRARY_ARCHITECTURE@")
if(CMAKE_C_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
endif(CMAKE_C_SIZEOF_DATA_PTR)
endif()
if(CMAKE_C_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
endif(CMAKE_C_COMPILER_ABI)
endif()
if(CMAKE_C_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_C_LIBRARY_ARCHITECTURE@")

View File

@ -22,51 +22,51 @@
# so set the extension here first so it can be overridden by the compiler specific file
if(UNIX)
set(CMAKE_C_OUTPUT_EXTENSION .o)
else(UNIX)
else()
set(CMAKE_C_OUTPUT_EXTENSION .obj)
endif(UNIX)
endif()
set(_INCLUDED_FILE 0)
# Load compiler-specific information.
if(CMAKE_C_COMPILER_ID)
include(Compiler/${CMAKE_C_COMPILER_ID}-C OPTIONAL)
endif(CMAKE_C_COMPILER_ID)
endif()
set(CMAKE_BASE_NAME)
get_filename_component(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_BASE_NAME gcc)
endif(CMAKE_COMPILER_IS_GNUCC)
endif()
# load a hardware specific file, mostly useful for embedded compilers
if(CMAKE_SYSTEM_PROCESSOR)
if(CMAKE_C_COMPILER_ID)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif(CMAKE_C_COMPILER_ID)
endif()
if (NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
endif (NOT _INCLUDED_FILE)
endif(CMAKE_SYSTEM_PROCESSOR)
endif ()
endif()
# load the system- and compiler specific files
if(CMAKE_C_COMPILER_ID)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif(CMAKE_C_COMPILER_ID)
endif()
if (NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif (NOT _INCLUDED_FILE)
endif ()
# We specify the compiler information in the system file for some
# platforms, but this language may not have been enabled when the file
# was first included. Include it again to get the language info.
# Remove this when all compiler info is removed from system files.
if (NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
endif (NOT _INCLUDED_FILE)
endif ()
if(CMAKE_C_SIZEOF_DATA_PTR)
foreach(f ${CMAKE_C_ABI_FILES})
@ -100,13 +100,13 @@ endif()
if(NOT CMAKE_MODULE_EXISTS)
set(CMAKE_SHARED_MODULE_C_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
endif(NOT CMAKE_MODULE_EXISTS)
endif()
set(CMAKE_C_FLAGS_INIT "$ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
if(CMAKE_C_FLAGS_INIT STREQUAL " ")
set(CMAKE_C_FLAGS_INIT)
endif(CMAKE_C_FLAGS_INIT STREQUAL " ")
endif()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_INIT}" CACHE STRING
"Flags used by the compiler during all build types.")
@ -115,7 +115,7 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
if(NOT CMAKE_NO_BUILD_TYPE)
set (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
endif(NOT CMAKE_NO_BUILD_TYPE)
endif()
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the compiler during debug builds.")
set (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL_INIT}" CACHE STRING
@ -124,13 +124,13 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
endif()
if(CMAKE_C_STANDARD_LIBRARIES_INIT)
set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES_INIT}"
CACHE STRING "Libraries linked by defalut with all C applications.")
mark_as_advanced(CMAKE_C_STANDARD_LIBRARIES)
endif(CMAKE_C_STANDARD_LIBRARIES_INIT)
endif()
include(CMakeCommonLanguageInclude)
@ -165,12 +165,12 @@ include(CMakeCommonLanguageInclude)
if(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
set(CMAKE_C_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
endif(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
endif()
# create a C shared module just copy the shared library rule
if(NOT CMAKE_C_CREATE_SHARED_MODULE)
set(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
endif(NOT CMAKE_C_CREATE_SHARED_MODULE)
endif()
# Create a static archive incrementally for large object file counts.
# If CMAKE_C_CREATE_STATIC_LIBRARY is set it will override these.
@ -188,24 +188,24 @@ endif()
if(NOT CMAKE_C_COMPILE_OBJECT)
set(CMAKE_C_COMPILE_OBJECT
"<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
endif(NOT CMAKE_C_COMPILE_OBJECT)
endif()
if(NOT CMAKE_C_LINK_EXECUTABLE)
set(CMAKE_C_LINK_EXECUTABLE
"<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
endif(NOT CMAKE_C_LINK_EXECUTABLE)
endif()
if(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG)
set(CMAKE_EXECUTABLE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
endif(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG)
endif()
if(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP)
set(CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
endif(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP)
endif()
if(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG)
set(CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
endif(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG)
endif()
mark_as_advanced(
CMAKE_C_FLAGS

View File

@ -14,13 +14,13 @@ set(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
if(CMAKE_COMPILER_IS_CYGWIN)
set(CYGWIN 1)
set(UNIX 1)
endif(CMAKE_COMPILER_IS_CYGWIN)
endif()
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
if(CMAKE_COMPILER_IS_MINGW)
set(MINGW 1)
endif(CMAKE_COMPILER_IS_MINGW)
endif()
set(CMAKE_CXX_COMPILER_ID_RUN 1)
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
@ -34,11 +34,11 @@ set(CMAKE_CXX_LIBRARY_ARCHITECTURE "@CMAKE_CXX_LIBRARY_ARCHITECTURE@")
if(CMAKE_CXX_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
endif(CMAKE_CXX_SIZEOF_DATA_PTR)
endif()
if(CMAKE_CXX_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
endif(CMAKE_CXX_COMPILER_ABI)
endif()
if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_CXX_LIBRARY_ARCHITECTURE@")

View File

@ -22,50 +22,50 @@
# so set the extension here first so it can be overridden by the compiler specific file
if(UNIX)
set(CMAKE_CXX_OUTPUT_EXTENSION .o)
else(UNIX)
else()
set(CMAKE_CXX_OUTPUT_EXTENSION .obj)
endif(UNIX)
endif()
set(_INCLUDED_FILE 0)
# Load compiler-specific information.
if(CMAKE_CXX_COMPILER_ID)
include(Compiler/${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL)
endif(CMAKE_CXX_COMPILER_ID)
endif()
set(CMAKE_BASE_NAME)
get_filename_component(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_BASE_NAME g++)
endif(CMAKE_COMPILER_IS_GNUCXX)
endif()
# load a hardware specific file, mostly useful for embedded compilers
if(CMAKE_SYSTEM_PROCESSOR)
if(CMAKE_CXX_COMPILER_ID)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif(CMAKE_CXX_COMPILER_ID)
endif()
if (NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
endif (NOT _INCLUDED_FILE)
endif(CMAKE_SYSTEM_PROCESSOR)
endif ()
endif()
# load the system- and compiler specific files
if(CMAKE_CXX_COMPILER_ID)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif(CMAKE_CXX_COMPILER_ID)
endif()
if (NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
RESULT_VARIABLE _INCLUDED_FILE)
endif (NOT _INCLUDED_FILE)
endif ()
# We specify the compiler information in the system file for some
# platforms, but this language may not have been enabled when the file
# was first included. Include it again to get the language info.
# Remove this when all compiler info is removed from system files.
if (NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
endif (NOT _INCLUDED_FILE)
endif ()
if(CMAKE_CXX_SIZEOF_DATA_PTR)
foreach(f ${CMAKE_CXX_ABI_FILES})
@ -98,39 +98,39 @@ endif()
# so if these are not set just copy the flags from the c version
if(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
endif(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
endif()
if(NOT CMAKE_CXX_COMPILE_OPTIONS_PIC)
set(CMAKE_CXX_COMPILE_OPTIONS_PIC ${CMAKE_C_COMPILE_OPTIONS_PIC})
endif(NOT CMAKE_CXX_COMPILE_OPTIONS_PIC)
endif()
if(NOT CMAKE_CXX_COMPILE_OPTIONS_PIE)
set(CMAKE_CXX_COMPILE_OPTIONS_PIE ${CMAKE_C_COMPILE_OPTIONS_PIE})
endif(NOT CMAKE_CXX_COMPILE_OPTIONS_PIE)
endif()
if(NOT CMAKE_CXX_COMPILE_OPTIONS_DLL)
set(CMAKE_CXX_COMPILE_OPTIONS_DLL ${CMAKE_C_COMPILE_OPTIONS_DLL})
endif(NOT CMAKE_CXX_COMPILE_OPTIONS_DLL)
endif()
if(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
set(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
endif(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
endif()
if(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
endif(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
endif()
if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
endif(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
endif()
if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
endif(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
endif()
if(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
endif(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
endif()
if(NOT DEFINED CMAKE_EXE_EXPORTS_CXX_FLAG)
set(CMAKE_EXE_EXPORTS_CXX_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG})
@ -142,27 +142,27 @@ endif()
if(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
set(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG})
endif(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
endif()
if(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP)
set(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP})
endif(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP)
endif()
if(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG)
set(CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG})
endif(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG)
endif()
if(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH)
set(CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
endif(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH)
endif()
if(NOT CMAKE_INCLUDE_FLAG_CXX)
set(CMAKE_INCLUDE_FLAG_CXX ${CMAKE_INCLUDE_FLAG_C})
endif(NOT CMAKE_INCLUDE_FLAG_CXX)
endif()
if(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
set(CMAKE_INCLUDE_FLAG_SEP_CXX ${CMAKE_INCLUDE_FLAG_SEP_C})
endif(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
endif()
# for most systems a module is the same as a shared library
# so unless the variable CMAKE_MODULE_EXISTS is set just
@ -170,28 +170,28 @@ endif(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
if(NOT CMAKE_MODULE_EXISTS)
set(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS})
endif(NOT CMAKE_MODULE_EXISTS)
endif()
# repeat for modules
if(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
endif(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
endif()
if(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
set(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
endif(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
endif()
# Initialize CXX link type selection flags from C versions.
foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
if(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS)
set(CMAKE_${type}_LINK_STATIC_CXX_FLAGS
${CMAKE_${type}_LINK_STATIC_C_FLAGS})
endif(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS)
endif()
if(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS)
set(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS
${CMAKE_${type}_LINK_DYNAMIC_C_FLAGS})
endif(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS)
endforeach(type)
endif()
endforeach()
# add the flags to the cache based
# on the initial values computed in the platform/*.cmake files
@ -201,7 +201,7 @@ set(CMAKE_CXX_FLAGS_INIT "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
if(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
set(CMAKE_CXX_FLAGS_INIT)
endif(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
endif()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT}" CACHE STRING
"Flags used by the compiler during all build types.")
@ -215,13 +215,13 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
endif()
if(CMAKE_CXX_STANDARD_LIBRARIES_INIT)
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES_INIT}"
CACHE STRING "Libraries linked by defalut with all C++ applications.")
mark_as_advanced(CMAKE_CXX_STANDARD_LIBRARIES)
endif(CMAKE_CXX_STANDARD_LIBRARIES_INIT)
endif()
include(CMakeCommonLanguageInclude)
@ -255,12 +255,12 @@ include(CMakeCommonLanguageInclude)
if(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
set(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
endif(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
endif()
# create a c++ shared module copy the shared library rule by default
if(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
set(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
endif(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
endif()
# Create a static archive incrementally for large object file counts.
@ -279,12 +279,12 @@ endif()
if(NOT CMAKE_CXX_COMPILE_OBJECT)
set(CMAKE_CXX_COMPILE_OBJECT
"<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
endif(NOT CMAKE_CXX_COMPILE_OBJECT)
endif()
if(NOT CMAKE_CXX_LINK_EXECUTABLE)
set(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
endif(NOT CMAKE_CXX_LINK_EXECUTABLE)
endif()
mark_as_advanced(
CMAKE_BUILD_TOOL

View File

@ -25,7 +25,7 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
if(NOT CMAKE_NO_BUILD_TYPE)
set (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
endif(NOT CMAKE_NO_BUILD_TYPE)
endif()
set (CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
@ -68,7 +68,7 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
endif()
# shared linker flags
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
CACHE STRING "Flags used by the linker during the creation of dll's.")

View File

@ -31,21 +31,21 @@ macro(CMAKE_DEPENDENT_OPTION option doc default depends force)
foreach(d ${depends})
string(REGEX REPLACE " +" ";" CMAKE_DEPENDENT_OPTION_DEP "${d}")
if(${CMAKE_DEPENDENT_OPTION_DEP})
else(${CMAKE_DEPENDENT_OPTION_DEP})
else()
set(${option}_AVAILABLE 0)
endif(${CMAKE_DEPENDENT_OPTION_DEP})
endforeach(d)
endif()
endforeach()
if(${option}_AVAILABLE)
option(${option} "${doc}" "${default}")
set(${option} "${${option}}" CACHE BOOL "${doc}" FORCE)
else(${option}_AVAILABLE)
else()
if(${option} MATCHES "^${option}$")
else(${option} MATCHES "^${option}$")
else()
set(${option} "${${option}}" CACHE INTERNAL "${doc}")
endif(${option} MATCHES "^${option}$")
endif()
set(${option} ${force})
endif(${option}_AVAILABLE)
else(${option}_ISSET MATCHES "^${option}_ISSET$")
endif()
else()
set(${option} "${${option}_ISSET}")
endif(${option}_ISSET MATCHES "^${option}_ISSET$")
endmacro(CMAKE_DEPENDENT_OPTION)
endif()
endmacro()

View File

@ -20,7 +20,7 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
# prefer the environment variable ASM
if($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT "$ENV{ASM${ASM_DIALECT}}")
endif($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
endif()
# finally list compilers to try
if("ASM${ASM_DIALECT}" STREQUAL "ASM") # the generic assembler support
@ -47,7 +47,7 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
# Find the compiler.
_cmake_find_compiler(ASM${ASM_DIALECT})
else(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
else()
# we only get here if CMAKE_ASM${ASM_DIALECT}_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
@ -62,14 +62,14 @@ else(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
if(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
set(CMAKE_ASM${ASM_DIALECT}_COMPILER ${CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH} CACHE FILEPATH "Assembler" FORCE)
endif(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
endif(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
endif(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
endif()
endif()
endif()
mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_COMPILER)
if (NOT _CMAKE_TOOLCHAIN_LOCATION)
get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
endif (NOT _CMAKE_TOOLCHAIN_LOCATION)
endif ()
if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
@ -110,9 +110,9 @@ endif()
if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
message(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
else(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
else()
message(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
endif(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
endif()
@ -127,22 +127,22 @@ if (NOT _CMAKE_TOOLCHAIN_PREFIX)
get_filename_component(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
if (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
endif (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
endif (NOT _CMAKE_TOOLCHAIN_PREFIX)
endif ()
endif ()
# Now try the C compiler regexp:
if (NOT _CMAKE_TOOLCHAIN_PREFIX)
if (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
endif (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
endif (NOT _CMAKE_TOOLCHAIN_PREFIX)
endif ()
endif ()
# Finally try the CXX compiler regexp:
if (NOT _CMAKE_TOOLCHAIN_PREFIX)
if (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
endif (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
endif (NOT _CMAKE_TOOLCHAIN_PREFIX)
endif ()
endif ()
include(CMakeFindBinUtils)
@ -151,9 +151,9 @@ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM${ASM_DIALECT}")
if(CMAKE_ASM${ASM_DIALECT}_COMPILER)
message(STATUS "Found assembler: ${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
else(CMAKE_ASM${ASM_DIALECT}_COMPILER)
else()
message(STATUS "Didn't find assembler")
endif(CMAKE_ASM${ASM_DIALECT}_COMPILER)
endif()
set(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}")

View File

@ -19,9 +19,9 @@ set(ASM_DIALECT "_MASM")
# if we are using the 64bit cl compiler, assume we also want the 64bit assembler
if(CMAKE_CL_64)
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml64)
else(CMAKE_CL_64)
else()
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml)
endif(CMAKE_CL_64)
endif()
include(CMakeDetermineASMCompiler)
set(ASM_DIALECT)

View File

@ -19,7 +19,7 @@ set(CMAKE_ASM_NASM_COMPILER_INIT nasm yasm)
if(NOT CMAKE_ASM_NASM_COMPILER)
find_program(CMAKE_ASM_NASM_COMPILER nasm
"$ENV{ProgramFiles}/NASM")
endif(NOT CMAKE_ASM_NASM_COMPILER)
endif()
# Load the generic DetermineASM compiler file with the DIALECT set properly:
set(ASM_DIALECT "_NASM")

View File

@ -47,18 +47,18 @@ if(NOT CMAKE_C_COMPILER)
get_filename_component(CMAKE_C_COMPILER_INIT $ENV{CC} PROGRAM PROGRAM_ARGS CMAKE_C_FLAGS_ENV_INIT)
if(CMAKE_C_FLAGS_ENV_INIT)
set(CMAKE_C_COMPILER_ARG1 "${CMAKE_C_FLAGS_ENV_INIT}" CACHE STRING "First argument to C compiler")
endif(CMAKE_C_FLAGS_ENV_INIT)
endif()
if(NOT EXISTS ${CMAKE_C_COMPILER_INIT})
message(FATAL_ERROR "Could not find compiler set in environment variable CC:\n$ENV{CC}.")
endif(NOT EXISTS ${CMAKE_C_COMPILER_INIT})
endif($ENV{CC} MATCHES ".+")
endif()
endif()
# next try prefer the compiler specified by the generator
if(CMAKE_GENERATOR_CC)
if(NOT CMAKE_C_COMPILER_INIT)
set(CMAKE_C_COMPILER_INIT ${CMAKE_GENERATOR_CC})
endif(NOT CMAKE_C_COMPILER_INIT)
endif(CMAKE_GENERATOR_CC)
endif()
endif()
# finally list compilers to try
if(NOT CMAKE_C_COMPILER_INIT)
@ -67,7 +67,7 @@ if(NOT CMAKE_C_COMPILER)
_cmake_find_compiler(C)
else(NOT CMAKE_C_COMPILER)
else()
# we only get here if CMAKE_C_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
@ -78,7 +78,7 @@ else(NOT CMAKE_C_COMPILER)
if("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2)
list(GET CMAKE_C_COMPILER 1 CMAKE_C_COMPILER_ARG1)
list(GET CMAKE_C_COMPILER 0 CMAKE_C_COMPILER)
endif("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2)
endif()
# if a compiler was specified by the user but without path,
# now try to find it with the full path
@ -91,21 +91,21 @@ else(NOT CMAKE_C_COMPILER)
mark_as_advanced(CMAKE_C_COMPILER_WITH_PATH)
if(CMAKE_C_COMPILER_WITH_PATH)
set(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_WITH_PATH} CACHE STRING "C compiler" FORCE)
endif(CMAKE_C_COMPILER_WITH_PATH)
endif(NOT _CMAKE_USER_C_COMPILER_PATH)
endif(NOT CMAKE_C_COMPILER)
endif()
endif()
endif()
mark_as_advanced(CMAKE_C_COMPILER)
if (NOT _CMAKE_TOOLCHAIN_LOCATION)
get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_C_COMPILER}" PATH)
endif (NOT _CMAKE_TOOLCHAIN_LOCATION)
endif ()
# Build a small source file to identify the compiler.
if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
set(CMAKE_C_COMPILER_ID_RUN 1)
set(CMAKE_C_PLATFORM_ID "Windows")
set(CMAKE_C_COMPILER_ID "MSVC")
endif(${CMAKE_GENERATOR} MATCHES "Visual Studio")
endif()
if(NOT CMAKE_C_COMPILER_ID_RUN)
set(CMAKE_C_COMPILER_ID_RUN 1)
@ -131,13 +131,13 @@ if(NOT CMAKE_C_COMPILER_ID_RUN)
# Set old compiler and platform id variables.
if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
set(CMAKE_COMPILER_IS_GNUCC 1)
endif("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
endif()
if("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
set(CMAKE_COMPILER_IS_MINGW 1)
elseif("${CMAKE_C_PLATFORM_ID}" MATCHES "Cygwin")
set(CMAKE_COMPILER_IS_CYGWIN 1)
endif("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
endif(NOT CMAKE_C_COMPILER_ID_RUN)
endif()
endif()
# If we have a gcc cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-gcc, arm-elf-gcc or i586-mingw32msvc-gcc, optionally
@ -152,13 +152,13 @@ if (CMAKE_CROSSCOMPILING
get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
if (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
endif (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
endif ()
# if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
# but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
endif ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
endif ()
endif (CMAKE_CROSSCOMPILING
AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU"
@ -169,7 +169,7 @@ include(CMakeFindBinUtils)
if(MSVC_C_ARCHITECTURE_ID)
set(SET_MSVC_C_ARCHITECTURE_ID
"set(MSVC_C_ARCHITECTURE_ID ${MSVC_C_ARCHITECTURE_ID})")
endif(MSVC_C_ARCHITECTURE_ID)
endif()
# configure variables set in this file for fast reload later on
configure_file(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
"${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake"

View File

@ -46,18 +46,18 @@ if(NOT CMAKE_CXX_COMPILER)
get_filename_component(CMAKE_CXX_COMPILER_INIT $ENV{CXX} PROGRAM PROGRAM_ARGS CMAKE_CXX_FLAGS_ENV_INIT)
if(CMAKE_CXX_FLAGS_ENV_INIT)
set(CMAKE_CXX_COMPILER_ARG1 "${CMAKE_CXX_FLAGS_ENV_INIT}" CACHE STRING "First argument to CXX compiler")
endif(CMAKE_CXX_FLAGS_ENV_INIT)
endif()
if(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT})
message(FATAL_ERROR "Could not find compiler set in environment variable CXX:\n$ENV{CXX}.\n${CMAKE_CXX_COMPILER_INIT}")
endif(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT})
endif($ENV{CXX} MATCHES ".+")
endif()
endif()
# next prefer the generator specified compiler
if(CMAKE_GENERATOR_CXX)
if(NOT CMAKE_CXX_COMPILER_INIT)
set(CMAKE_CXX_COMPILER_INIT ${CMAKE_GENERATOR_CXX})
endif(NOT CMAKE_CXX_COMPILER_INIT)
endif(CMAKE_GENERATOR_CXX)
endif()
endif()
# finally list compilers to try
if(NOT CMAKE_CXX_COMPILER_INIT)
@ -65,7 +65,7 @@ if(NOT CMAKE_CXX_COMPILER)
endif()
_cmake_find_compiler(CXX)
else(NOT CMAKE_CXX_COMPILER)
else()
# we only get here if CMAKE_CXX_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
@ -77,7 +77,7 @@ else(NOT CMAKE_CXX_COMPILER)
if("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2)
list(GET CMAKE_CXX_COMPILER 1 CMAKE_CXX_COMPILER_ARG1)
list(GET CMAKE_CXX_COMPILER 0 CMAKE_CXX_COMPILER)
endif("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2)
endif()
# if a compiler was specified by the user but without path,
# now try to find it with the full path
@ -90,14 +90,14 @@ else(NOT CMAKE_CXX_COMPILER)
mark_as_advanced(CMAKE_CXX_COMPILER_WITH_PATH)
if(CMAKE_CXX_COMPILER_WITH_PATH)
set(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_WITH_PATH} CACHE STRING "CXX compiler" FORCE)
endif(CMAKE_CXX_COMPILER_WITH_PATH)
endif(NOT _CMAKE_USER_CXX_COMPILER_PATH)
endif(NOT CMAKE_CXX_COMPILER)
endif()
endif()
endif()
mark_as_advanced(CMAKE_CXX_COMPILER)
if (NOT _CMAKE_TOOLCHAIN_LOCATION)
get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH)
endif (NOT _CMAKE_TOOLCHAIN_LOCATION)
endif ()
# This block was used before the compiler was identified by building a
# source file. Unless g++ crashes when building a small C++
@ -109,14 +109,14 @@ endif (NOT _CMAKE_TOOLCHAIN_LOCATION)
# if(BEOS)
# set(CMAKE_COMPILER_IS_GNUCXX 1)
# set(CMAKE_COMPILER_IS_GNUCXX_RUN 1)
# endif(BEOS)
# endif()
# Build a small source file to identify the compiler.
if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
set(CMAKE_CXX_COMPILER_ID_RUN 1)
set(CMAKE_CXX_PLATFORM_ID "Windows")
set(CMAKE_CXX_COMPILER_ID "MSVC")
endif(${CMAKE_GENERATOR} MATCHES "Visual Studio")
endif()
if(NOT CMAKE_CXX_COMPILER_ID_RUN)
set(CMAKE_CXX_COMPILER_ID_RUN 1)
@ -138,13 +138,13 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN)
# Set old compiler and platform id variables.
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
set(CMAKE_COMPILER_IS_GNUCXX 1)
endif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
endif()
if("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
set(CMAKE_COMPILER_IS_MINGW 1)
elseif("${CMAKE_CXX_PLATFORM_ID}" MATCHES "Cygwin")
set(CMAKE_COMPILER_IS_CYGWIN 1)
endif("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
endif(NOT CMAKE_CXX_COMPILER_ID_RUN)
endif()
endif()
# if we have a g++ cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-g++, arm-elf-g++ or i586-mingw32msvc-g++ , optionally
@ -159,13 +159,13 @@ if (CMAKE_CROSSCOMPILING
get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
if (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
endif (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
endif ()
# if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
# but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
endif ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
endif ()
endif (CMAKE_CROSSCOMPILING
AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
@ -176,7 +176,7 @@ include(CMakeFindBinUtils)
if(MSVC_CXX_ARCHITECTURE_ID)
set(SET_MSVC_CXX_ARCHITECTURE_ID
"set(MSVC_CXX_ARCHITECTURE_ID ${MSVC_CXX_ARCHITECTURE_ID})")
endif(MSVC_CXX_ARCHITECTURE_ID)
endif()
# configure all variables set in this file
configure_file(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake

View File

@ -49,21 +49,21 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
foreach(info ${ABI_STRINGS})
if("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*")
string(REGEX REPLACE ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*" "\\1" ABI_SIZEOF_DPTR "${info}")
endif("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*")
endif()
if("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*")
string(REGEX REPLACE ".*INFO:abi\\[([^]]*)\\].*" "\\1" ABI_NAME "${info}")
endif("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*")
endforeach(info)
endif()
endforeach()
if(ABI_SIZEOF_DPTR)
set(CMAKE_${lang}_SIZEOF_DATA_PTR "${ABI_SIZEOF_DPTR}" PARENT_SCOPE)
elseif(CMAKE_${lang}_SIZEOF_DATA_PTR_DEFAULT)
set(CMAKE_${lang}_SIZEOF_DATA_PTR "${CMAKE_${lang}_SIZEOF_DATA_PTR_DEFAULT}" PARENT_SCOPE)
endif(ABI_SIZEOF_DPTR)
endif()
if(ABI_NAME)
set(CMAKE_${lang}_COMPILER_ABI "${ABI_NAME}" PARENT_SCOPE)
endif(ABI_NAME)
endif()
# Parse implicit linker information for this language, if available.
set(implicit_dirs "")
@ -122,10 +122,10 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
endforeach()
endif()
else(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
else()
message(STATUS "Detecting ${lang} compiler ABI info - failed")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Detecting ${lang} compiler ABI info failed to compile with the following output:\n${OUTPUT}\n\n")
endif(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
endif(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED)
endfunction(CMAKE_DETERMINE_COMPILER_ABI)
endif()
endif()
endfunction()

View File

@ -24,9 +24,9 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
# Make sure user-specified compiler flags are used.
if(CMAKE_${lang}_FLAGS)
set(CMAKE_${lang}_COMPILER_ID_FLAGS ${CMAKE_${lang}_FLAGS})
else(CMAKE_${lang}_FLAGS)
else()
set(CMAKE_${lang}_COMPILER_ID_FLAGS $ENV{${flagvar}})
endif(CMAKE_${lang}_FLAGS)
endif()
string(REGEX REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
# Compute the directory in which to run the test.
@ -39,9 +39,9 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${flags}" "${src}")
foreach(file ${COMPILER_${lang}_PRODUCED_FILES})
CMAKE_DETERMINE_COMPILER_ID_CHECK("${lang}" "${CMAKE_${lang}_COMPILER_ID_DIR}/${file}" "${src}")
endforeach(file)
endif(NOT CMAKE_${lang}_COMPILER_ID)
endforeach(flags)
endforeach()
endif()
endforeach()
# If the compiler is still unknown, try to query its vendor.
if(NOT CMAKE_${lang}_COMPILER_ID)
@ -51,7 +51,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
# if the format is unknown after all files have been checked, put "Unknown" in the cache
if(NOT CMAKE_EXECUTABLE_FORMAT)
set(CMAKE_EXECUTABLE_FORMAT "Unknown" CACHE INTERNAL "Executable file format")
endif(NOT CMAKE_EXECUTABLE_FORMAT)
endif()
# Display the final identification result.
if(CMAKE_${lang}_COMPILER_ID)
@ -62,16 +62,16 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
endif()
message(STATUS "The ${lang} compiler identification is "
"${CMAKE_${lang}_COMPILER_ID}${_version}")
else(CMAKE_${lang}_COMPILER_ID)
else()
message(STATUS "The ${lang} compiler identification is unknown")
endif(CMAKE_${lang}_COMPILER_ID)
endif()
set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
set(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
PARENT_SCOPE)
set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE)
endfunction(CMAKE_DETERMINE_COMPILER_ID)
endfunction()
#-----------------------------------------------------------------------------
# Function to write the compiler id source file.
@ -79,7 +79,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_WRITE lang src)
file(READ ${CMAKE_ROOT}/Modules/${src}.in ID_CONTENT_IN)
string(CONFIGURE "${ID_CONTENT_IN}" ID_CONTENT_OUT @ONLY)
file(WRITE ${CMAKE_${lang}_COMPILER_ID_DIR}/${src} "${ID_CONTENT_OUT}")
endfunction(CMAKE_DETERMINE_COMPILER_ID_WRITE)
endfunction()
#-----------------------------------------------------------------------------
# Function to build the compiler id source file and look for output
@ -110,7 +110,7 @@ Id flags: ${testflags}
ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT
)
else(COMMAND EXECUTE_PROCESS)
else()
exec_program(
${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_DIR}
ARGS ${CMAKE_${lang}_COMPILER_ID_ARG1}
@ -120,7 +120,7 @@ Id flags: ${testflags}
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
RETURN_VALUE CMAKE_${lang}_COMPILER_ID_RESULT
)
endif(COMMAND EXECUTE_PROCESS)
endif()
# Check the result of compilation.
if(CMAKE_${lang}_COMPILER_ID_RESULT)
@ -136,11 +136,11 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT}
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "${MSG}")
#if(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
# message(FATAL_ERROR "${MSG}")
#endif(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
#endif()
# No output files should be inspected.
set(COMPILER_${lang}_PRODUCED_FILES)
else(CMAKE_${lang}_COMPILER_ID_RESULT)
else()
# Compilation succeeded.
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Compiling the ${lang} compiler identification source file \"${src}\" succeeded.
@ -161,7 +161,7 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT}
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Compilation of the ${lang} compiler identification source \""
"${src}\" produced \"${file}\"\n\n")
endforeach(file)
endforeach()
if(NOT COMPILER_${lang}_PRODUCED_FILES)
# No executable was found.
@ -169,12 +169,12 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT}
"Compilation of the ${lang} compiler identification source \""
"${src}\" did not produce an executable in \""
"${CMAKE_${lang}_COMPILER_ID_DIR}\".\n\n")
endif(NOT COMPILER_${lang}_PRODUCED_FILES)
endif(CMAKE_${lang}_COMPILER_ID_RESULT)
endif()
endif()
# Return the files produced by the compilation.
set(COMPILER_${lang}_PRODUCED_FILES "${COMPILER_${lang}_PRODUCED_FILES}" PARENT_SCOPE)
endfunction(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src)
endfunction()
#-----------------------------------------------------------------------------
# Function to extract the compiler id from an executable.
@ -192,24 +192,24 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
if("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
if(COMPILER_ID)
set(COMPILER_ID_TWICE 1)
endif(COMPILER_ID)
endif()
string(REGEX REPLACE ".*INFO:compiler\\[([^]]*)\\].*" "\\1"
COMPILER_ID "${info}")
endif("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
endif()
if("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
string(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1"
PLATFORM_ID "${info}")
endif("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
endif()
if("${info}" MATCHES ".*INFO:arch\\[([^]\"]*)\\].*")
string(REGEX REPLACE ".*INFO:arch\\[([^]]*)\\].*" "\\1"
ARCHITECTURE_ID "${info}")
endif("${info}" MATCHES ".*INFO:arch\\[([^]\"]*)\\].*")
endif()
if("${info}" MATCHES ".*INFO:compiler_version\\[([^]\"]*)\\].*")
string(REGEX REPLACE ".*INFO:compiler_version\\[([^]]*)\\].*" "\\1" COMPILER_VERSION "${info}")
string(REGEX REPLACE "^0+([0-9])" "\\1" COMPILER_VERSION "${COMPILER_VERSION}")
string(REGEX REPLACE "\\.0+([0-9])" ".\\1" COMPILER_VERSION "${COMPILER_VERSION}")
endif("${info}" MATCHES ".*INFO:compiler_version\\[([^]\"]*)\\].*")
endforeach(info)
endif()
endforeach()
# Check if a valid compiler and platform were found.
if(COMPILER_ID AND NOT COMPILER_ID_TWICE)
@ -217,7 +217,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
set(CMAKE_${lang}_PLATFORM_ID "${PLATFORM_ID}")
set(MSVC_${lang}_ARCHITECTURE_ID "${ARCHITECTURE_ID}")
set(CMAKE_${lang}_COMPILER_VERSION "${COMPILER_VERSION}")
endif(COMPILER_ID AND NOT COMPILER_ID_TWICE)
endif()
# Check the compiler identification string.
if(CMAKE_${lang}_COMPILER_ID)
@ -225,13 +225,13 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The ${lang} compiler identification is ${CMAKE_${lang}_COMPILER_ID}, found in \""
"${file}\"\n\n")
else(CMAKE_${lang}_COMPILER_ID)
else()
# The compiler identification could not be found.
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"The ${lang} compiler identification could not be found in \""
"${file}\"\n\n")
endif(CMAKE_${lang}_COMPILER_ID)
endif(NOT CMAKE_${lang}_COMPILER_ID)
endif()
endif()
# try to figure out the executable format: ELF, COFF, Mach-O
if(NOT CMAKE_EXECUTABLE_FORMAT)
@ -240,22 +240,22 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
# ELF files start with 0x7f"ELF"
if("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46")
set(CMAKE_EXECUTABLE_FORMAT "ELF" CACHE INTERNAL "Executable file format")
endif("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46")
endif()
# # COFF (.exe) files start with "MZ"
# if("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....")
# set(CMAKE_EXECUTABLE_FORMAT "COFF" CACHE STRING "Executable file format")
# endif("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....")
# endif()
#
# # Mach-O files start with CAFEBABE or FEEDFACE, according to http://radio.weblogs.com/0100490/2003/01/28.html
# if("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "cafebabe")
# set(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE STRING "Executable file format")
# endif("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "cafebabe")
# endif()
# if("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface")
# set(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE STRING "Executable file format")
# endif("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface")
# endif()
endif(NOT CMAKE_EXECUTABLE_FORMAT)
endif()
if(NOT DEFINED CMAKE_EXECUTABLE_FORMAT)
set(CMAKE_EXECUTABLE_FORMAT)
endif()
@ -266,7 +266,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
PARENT_SCOPE)
set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE)
set(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
endfunction(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)
endfunction()
#-----------------------------------------------------------------------------
# Function to query the compiler vendor.
@ -285,7 +285,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
set(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CompilerId${lang})
file(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR})
file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR})
endif(NOT CMAKE_${lang}_COMPILER_ID_DIR)
endif()
foreach(vendor ${CMAKE_${lang}_COMPILER_ID_VENDORS})
@ -320,4 +320,4 @@ function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
endif()
endif()
endforeach()
endfunction(CMAKE_DETERMINE_COMPILER_ID_VENDOR)
endfunction()

View File

@ -31,19 +31,19 @@ if(NOT CMAKE_Fortran_COMPILER)
get_filename_component(CMAKE_Fortran_COMPILER_INIT $ENV{FC} PROGRAM PROGRAM_ARGS CMAKE_Fortran_FLAGS_ENV_INIT)
if(CMAKE_Fortran_FLAGS_ENV_INIT)
set(CMAKE_Fortran_COMPILER_ARG1 "${CMAKE_Fortran_FLAGS_ENV_INIT}" CACHE STRING "First argument to Fortran compiler")
endif(CMAKE_Fortran_FLAGS_ENV_INIT)
endif()
if(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
else(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
else()
message(FATAL_ERROR "Could not find compiler set in environment variable FC:\n$ENV{FC}.")
endif(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
endif($ENV{FC} MATCHES ".+")
endif()
endif()
# next try prefer the compiler specified by the generator
if(CMAKE_GENERATOR_FC)
if(NOT CMAKE_Fortran_COMPILER_INIT)
set(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
endif(NOT CMAKE_Fortran_COMPILER_INIT)
endif(CMAKE_GENERATOR_FC)
endif()
endif()
# finally list compilers to try
if(NOT CMAKE_Fortran_COMPILER_INIT)
@ -85,7 +85,7 @@ if(NOT CMAKE_Fortran_COMPILER)
_cmake_find_compiler(Fortran)
else(NOT CMAKE_Fortran_COMPILER)
else()
# we only get here if CMAKE_Fortran_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
# if CMAKE_Fortran_COMPILER is a list of length 2, use the first item as
@ -95,7 +95,7 @@ else(NOT CMAKE_Fortran_COMPILER)
if("${_CMAKE_Fortran_COMPILER_LIST_LENGTH}" EQUAL 2)
list(GET CMAKE_Fortran_COMPILER 1 CMAKE_Fortran_COMPILER_ARG1)
list(GET CMAKE_Fortran_COMPILER 0 CMAKE_Fortran_COMPILER)
endif("${_CMAKE_Fortran_COMPILER_LIST_LENGTH}" EQUAL 2)
endif()
# if a compiler was specified by the user but without path,
# now try to find it with the full path
@ -109,9 +109,9 @@ else(NOT CMAKE_Fortran_COMPILER)
if(CMAKE_Fortran_COMPILER_WITH_PATH)
set(CMAKE_Fortran_COMPILER ${CMAKE_Fortran_COMPILER_WITH_PATH}
CACHE STRING "Fortran compiler" FORCE)
endif(CMAKE_Fortran_COMPILER_WITH_PATH)
endif(NOT _CMAKE_USER_Fortran_COMPILER_PATH)
endif(NOT CMAKE_Fortran_COMPILER)
endif()
endif()
endif()
mark_as_advanced(CMAKE_Fortran_COMPILER)
@ -120,7 +120,7 @@ if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
set(CMAKE_Fortran_COMPILER_ID_RUN 1)
set(CMAKE_Fortran_PLATFORM_ID "Windows")
set(CMAKE_Fortran_COMPILER_ID "Intel")
endif(${CMAKE_GENERATOR} MATCHES "Visual Studio")
endif()
if(NOT CMAKE_Fortran_COMPILER_ID_RUN)
set(CMAKE_Fortran_COMPILER_ID_RUN 1)
@ -160,32 +160,32 @@ if(NOT CMAKE_Fortran_COMPILER_ID_RUN)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler is GNU succeeded with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
else("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
else()
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler is GNU failed with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
endif("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
endif()
if(NOT CMAKE_Fortran_PLATFORM_ID)
if("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
set(CMAKE_Fortran_PLATFORM_ID "MinGW")
endif("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
endif()
if("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
set(CMAKE_Fortran_PLATFORM_ID "Cygwin")
endif("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
endif(NOT CMAKE_Fortran_PLATFORM_ID)
endif(NOT CMAKE_COMPILER_RETURN)
endif(NOT CMAKE_Fortran_COMPILER_ID)
endif()
endif()
endif()
endif()
# Set old compiler and platform id variables.
if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
set(CMAKE_COMPILER_IS_GNUG77 1)
endif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
endif()
if("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
set(CMAKE_COMPILER_IS_MINGW 1)
elseif("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "Cygwin")
set(CMAKE_COMPILER_IS_CYGWIN 1)
endif("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
endif(NOT CMAKE_Fortran_COMPILER_ID_RUN)
endif()
endif()
include(CMakeFindBinUtils)

View File

@ -22,25 +22,25 @@ if(NOT CMAKE_Java_COMPILER)
get_filename_component(CMAKE_Java_COMPILER_INIT $ENV{JAVA_COMPILER} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
if(CMAKE_Java_FLAGS_ENV_INIT)
set(CMAKE_Java_COMPILER_ARG1 "${CMAKE_Java_FLAGS_ENV_INIT}" CACHE STRING "First argument to Java compiler")
endif(CMAKE_Java_FLAGS_ENV_INIT)
endif()
if(NOT EXISTS ${CMAKE_Java_COMPILER_INIT})
message(SEND_ERROR "Could not find compiler set in environment variable JAVA_COMPILER:\n$ENV{JAVA_COMPILER}.")
endif(NOT EXISTS ${CMAKE_Java_COMPILER_INIT})
endif($ENV{JAVA_COMPILER} MATCHES ".+")
endif()
endif()
if($ENV{JAVA_RUNTIME} MATCHES ".+")
get_filename_component(CMAKE_Java_RUNTIME_INIT $ENV{JAVA_RUNTIME} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
if(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT})
message(SEND_ERROR "Could not find compiler set in environment variable JAVA_RUNTIME:\n$ENV{JAVA_RUNTIME}.")
endif(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT})
endif($ENV{JAVA_RUNTIME} MATCHES ".+")
endif()
endif()
if($ENV{JAVA_ARCHIVE} MATCHES ".+")
get_filename_component(CMAKE_Java_ARCHIVE_INIT $ENV{JAVA_ARCHIVE} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
if(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT})
message(SEND_ERROR "Could not find compiler set in environment variable JAVA_ARCHIVE:\n$ENV{JAVA_ARCHIVE}.")
endif(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT})
endif($ENV{JAVA_ARCHIVE} MATCHES ".+")
endif()
endif()
set(Java_BIN_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\2.0;JavaHome]/bin"
@ -67,33 +67,33 @@ if(NOT CMAKE_Java_COMPILER)
# if no compiler has been specified yet, then look for one
if(CMAKE_Java_COMPILER_INIT)
set(CMAKE_Java_COMPILER ${CMAKE_Java_COMPILER_INIT} CACHE PATH "Java Compiler")
else(CMAKE_Java_COMPILER_INIT)
else()
find_program(CMAKE_Java_COMPILER
NAMES javac
PATHS ${Java_BIN_PATH}
)
endif(CMAKE_Java_COMPILER_INIT)
endif()
# if no runtime has been specified yet, then look for one
if(CMAKE_Java_RUNTIME_INIT)
set(CMAKE_Java_RUNTIME ${CMAKE_Java_RUNTIME_INIT} CACHE PATH "Java Compiler")
else(CMAKE_Java_RUNTIME_INIT)
else()
find_program(CMAKE_Java_RUNTIME
NAMES java
PATHS ${Java_BIN_PATH}
)
endif(CMAKE_Java_RUNTIME_INIT)
endif()
# if no archive has been specified yet, then look for one
if(CMAKE_Java_ARCHIVE_INIT)
set(CMAKE_Java_ARCHIVE ${CMAKE_Java_ARCHIVE_INIT} CACHE PATH "Java Compiler")
else(CMAKE_Java_ARCHIVE_INIT)
else()
find_program(CMAKE_Java_ARCHIVE
NAMES jar
PATHS ${Java_BIN_PATH}
)
endif(CMAKE_Java_ARCHIVE_INIT)
endif(NOT CMAKE_Java_COMPILER)
endif()
endif()
mark_as_advanced(CMAKE_Java_COMPILER)
# configure variables set in this file for fast reload later on

View File

@ -24,33 +24,33 @@ if(NOT CMAKE_RC_COMPILER)
get_filename_component(CMAKE_RC_COMPILER_INIT $ENV{RC} PROGRAM PROGRAM_ARGS CMAKE_RC_FLAGS_ENV_INIT)
if(CMAKE_RC_FLAGS_ENV_INIT)
set(CMAKE_RC_COMPILER_ARG1 "${CMAKE_RC_FLAGS_ENV_INIT}" CACHE STRING "First argument to RC compiler")
endif(CMAKE_RC_FLAGS_ENV_INIT)
endif()
if(EXISTS ${CMAKE_RC_COMPILER_INIT})
else(EXISTS ${CMAKE_RC_COMPILER_INIT})
else()
message(FATAL_ERROR "Could not find compiler set in environment variable RC:\n$ENV{RC}.")
endif(EXISTS ${CMAKE_RC_COMPILER_INIT})
endif($ENV{RC} MATCHES ".+")
endif()
endif()
# next try prefer the compiler specified by the generator
if(CMAKE_GENERATOR_RC)
if(NOT CMAKE_RC_COMPILER_INIT)
set(CMAKE_RC_COMPILER_INIT ${CMAKE_GENERATOR_RC})
endif(NOT CMAKE_RC_COMPILER_INIT)
endif(CMAKE_GENERATOR_RC)
endif()
endif()
# finally list compilers to try
if(CMAKE_RC_COMPILER_INIT)
set(CMAKE_RC_COMPILER_LIST ${CMAKE_RC_COMPILER_INIT})
else(CMAKE_RC_COMPILER_INIT)
else()
set(CMAKE_RC_COMPILER_LIST rc)
endif(CMAKE_RC_COMPILER_INIT)
endif()
# Find the compiler.
find_program(CMAKE_RC_COMPILER NAMES ${CMAKE_RC_COMPILER_LIST} DOC "RC compiler")
if(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER)
set(CMAKE_RC_COMPILER "${CMAKE_RC_COMPILER_INIT}" CACHE FILEPATH "RC compiler" FORCE)
endif(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER)
endif(NOT CMAKE_RC_COMPILER)
endif()
endif()
mark_as_advanced(CMAKE_RC_COMPILER)

View File

@ -59,23 +59,23 @@ if(CMAKE_HOST_UNIX)
if("${val}" GREATER 0)
exec_program(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
endif("${val}" GREATER 0)
endif()
endif()
# check the return of the last uname -m or -p
if("${val}" GREATER 0)
set(CMAKE_HOST_SYSTEM_PROCESSOR "unknown")
endif("${val}" GREATER 0)
endif()
set(CMAKE_UNAME ${CMAKE_UNAME} CACHE INTERNAL "uname command")
# processor may have double quote in the name, and that needs to be removed
string(REGEX REPLACE "\"" "" CMAKE_HOST_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
string(REGEX REPLACE "/" "_" CMAKE_HOST_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
endif(CMAKE_UNAME)
else(CMAKE_HOST_UNIX)
endif()
else()
if(CMAKE_HOST_WIN32)
set (CMAKE_HOST_SYSTEM_NAME "Windows")
set (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITECTURE}")
endif(CMAKE_HOST_WIN32)
endif(CMAKE_HOST_UNIX)
endif()
endif()
# if a toolchain file is used, the user wants to cross compile.
# in this case read the toolchain file and keep the CMAKE_HOST_SYSTEM_*
@ -87,15 +87,15 @@ if(CMAKE_TOOLCHAIN_FILE)
if(NOT _INCLUDED_TOOLCHAIN_FILE)
# if the file isn't found there, check the default locations
include("${CMAKE_TOOLCHAIN_FILE}" OPTIONAL RESULT_VARIABLE _INCLUDED_TOOLCHAIN_FILE)
endif(NOT _INCLUDED_TOOLCHAIN_FILE)
endif()
if(_INCLUDED_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "${_INCLUDED_TOOLCHAIN_FILE}" CACHE FILEPATH "The CMake toolchain file" FORCE)
else(_INCLUDED_TOOLCHAIN_FILE)
else()
message(FATAL_ERROR "Could not find toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
set(CMAKE_TOOLCHAIN_FILE "NOTFOUND" CACHE FILEPATH "The CMake toolchain file" FORCE)
endif(_INCLUDED_TOOLCHAIN_FILE)
endif(CMAKE_TOOLCHAIN_FILE)
endif()
endif()
# if CMAKE_SYSTEM_NAME is here already set, either it comes from a toolchain file
@ -104,45 +104,45 @@ endif(CMAKE_TOOLCHAIN_FILE)
if(CMAKE_SYSTEM_NAME)
if(NOT DEFINED CMAKE_CROSSCOMPILING)
set(CMAKE_CROSSCOMPILING TRUE)
endif(NOT DEFINED CMAKE_CROSSCOMPILING)
endif()
set(PRESET_CMAKE_SYSTEM_NAME TRUE)
else(CMAKE_SYSTEM_NAME)
else()
set(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}")
set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
set(CMAKE_CROSSCOMPILING FALSE)
set(PRESET_CMAKE_SYSTEM_NAME FALSE)
endif(CMAKE_SYSTEM_NAME)
endif()
macro(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX)
if(NOT ${_PREFIX}_NAME)
set(${_PREFIX}_NAME "UnknownOS")
endif(NOT ${_PREFIX}_NAME)
endif()
# fix for BSD/OS , remove the /
if(${_PREFIX}_NAME MATCHES BSD.OS)
set(${_PREFIX}_NAME BSDOS)
endif(${_PREFIX}_NAME MATCHES BSD.OS)
endif()
# fix for GNU/kFreeBSD, remove the GNU/
if(${_PREFIX}_NAME MATCHES kFreeBSD)
set(${_PREFIX}_NAME kFreeBSD)
endif(${_PREFIX}_NAME MATCHES kFreeBSD)
endif()
# fix for CYGWIN which has windows version in it
if(${_PREFIX}_NAME MATCHES CYGWIN)
set(${_PREFIX}_NAME CYGWIN)
endif(${_PREFIX}_NAME MATCHES CYGWIN)
endif()
# set CMAKE_SYSTEM to the CMAKE_SYSTEM_NAME
set(${_PREFIX} ${${_PREFIX}_NAME})
# if there is a CMAKE_SYSTEM_VERSION then add a -${CMAKE_SYSTEM_VERSION}
if(${_PREFIX}_VERSION)
set(${_PREFIX} ${${_PREFIX}}-${${_PREFIX}_VERSION})
endif(${_PREFIX}_VERSION)
endif()
endmacro(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX)
endmacro()
ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_SYSTEM)
ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_HOST_SYSTEM)
@ -156,21 +156,21 @@ if(CMAKE_BINARY_DIR)
"The target system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The host system is: ${CMAKE_HOST_SYSTEM_NAME} - ${CMAKE_HOST_SYSTEM_VERSION} - ${CMAKE_HOST_SYSTEM_PROCESSOR}\n")
else(PRESET_CMAKE_SYSTEM_NAME)
else()
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n")
endif(PRESET_CMAKE_SYSTEM_NAME)
endif()
# if a toolchain file is used, it needs to be included in the configured file,
# so settings done there are also available if they don't go in the cache and in try_compile()
set(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED)
if(DEFINED CMAKE_TOOLCHAIN_FILE)
set(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED "include(\"${CMAKE_TOOLCHAIN_FILE}\")")
endif(DEFINED CMAKE_TOOLCHAIN_FILE)
endif()
# configure variables set in this file for fast reload, the template file is defined at the top of this file
configure_file(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake
IMMEDIATE @ONLY)
endif(CMAKE_BINARY_DIR)
endif()

View File

@ -76,16 +76,16 @@ function(CMAKE_EXPAND_IMPORTED_TARGETS _RESULT )
# guard against infinite loop: abort after 100 iterations ( 100 is arbitrary chosen)
if ("${_CCSR_LOOP_COUNTER}" LESS 100)
set(_CHECK_FOR_IMPORTED_TARGETS TRUE)
# else ("${_CCSR_LOOP_COUNTER}" LESS 1)
# else ()
# message(STATUS "********* aborting loop, counter : ${_CCSR_LOOP_COUNTER}")
endif ("${_CCSR_LOOP_COUNTER}" LESS 100)
endif ()
# if one of the imported configurations equals ${CMAKE_TRY_COMPILE_CONFIGURATION},
# use it, otherwise simply use the first one:
list(FIND _importedConfigs "${CEIT_CONFIGURATION}" _configIndexToUse)
if("${_configIndexToUse}" EQUAL -1)
set(_configIndexToUse 0)
endif("${_configIndexToUse}" EQUAL -1)
endif()
list(GET _importedConfigs ${_configIndexToUse} _importedConfigToUse)
get_target_property(_importedLocation "${_CURRENT_LIB}" IMPORTED_LOCATION_${_importedConfigToUse})
@ -98,18 +98,18 @@ function(CMAKE_EXPAND_IMPORTED_TARGETS _RESULT )
# message(STATUS "Appending link interface lib ${_currentLinkInterfaceLib}")
if(_currentLinkInterfaceLib)
list(APPEND _CCSR_NEW_REQ_LIBS "${_currentLinkInterfaceLib}" )
endif(_currentLinkInterfaceLib)
endforeach(_currentLinkInterfaceLib "${_linkInterfaceLibs}")
endif(_linkInterfaceLibs)
else(_importedConfigs)
endif()
endforeach()
endif()
else()
# "Normal" libraries are just used as they are.
list(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" )
# message(STATUS "Appending lib directly: ${_CURRENT_LIB}")
endif(_importedConfigs)
endforeach(_CURRENT_LIB ${_CCSR_REQ_LIBS})
endif()
endforeach()
set(_CCSR_REQ_LIBS ${_CCSR_NEW_REQ_LIBS} )
endwhile(_CHECK_FOR_IMPORTED_TARGETS)
endwhile()
# Finally we iterate once more over all libraries. This loop only removes
# all remaining imported target names (there shouldn't be any left anyway).
@ -119,10 +119,10 @@ function(CMAKE_EXPAND_IMPORTED_TARGETS _RESULT )
if (NOT _importedConfigs)
list(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" )
# message(STATUS "final: appending ${_CURRENT_LIB}")
else (NOT _importedConfigs)
else ()
# message(STATUS "final: skipping ${_CURRENT_LIB}")
endif (NOT _importedConfigs)
endforeach(_CURRENT_LIB ${_CCSR_REQ_LIBS})
endif ()
endforeach()
# message(STATUS "setting -${_RESULT}- to -${_CCSR_NEW_REQ_LIBS}-")
set(${_RESULT} "${_CCSR_NEW_REQ_LIBS}" PARENT_SCOPE)

View File

@ -30,7 +30,7 @@ macro(CMAKE_EXPORT_BUILD_SETTINGS SETTINGS_FILE)
if(${SETTINGS_FILE} MATCHES ".+")
configure_file(${CMAKE_ROOT}/Modules/CMakeBuildSettings.cmake.in
${SETTINGS_FILE} @ONLY IMMEDIATE)
else(${SETTINGS_FILE} MATCHES ".+")
else()
message(SEND_ERROR "CMAKE_EXPORT_BUILD_SETTINGS called with no argument.")
endif(${SETTINGS_FILE} MATCHES ".+")
endmacro(CMAKE_EXPORT_BUILD_SETTINGS)
endif()
endmacro()

View File

@ -44,7 +44,7 @@ macro(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines
foreach(nextLine ${_includeLines})
string(STRIP "${nextLine}" _includePath)
list(APPEND ${_resultIncludeDirs} "${_includePath}")
endforeach(nextLine)
endforeach()
endif()
@ -71,9 +71,9 @@ macro(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines
else()
list(APPEND ${_resultDefines} " ")
endif()
endforeach(nextLine)
endforeach()
endmacro(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang)
endmacro()
# Save the current LC_ALL, LC_MESSAGES, and LANG environment variables and set them
# to "C" that way GCC's "search starts here" text is in English and we can grok it.

View File

@ -48,7 +48,7 @@ else("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
find_program(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
if(NOT CMAKE_RANLIB)
set(CMAKE_RANLIB : CACHE INTERNAL "noop for ranlib")
endif(NOT CMAKE_RANLIB)
endif()
find_program(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
find_program(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
@ -69,7 +69,7 @@ if(APPLE)
if(NOT CMAKE_INSTALL_NAME_TOOL)
message(FATAL_ERROR "Could not find install_name_tool, please check your installation.")
endif(NOT CMAKE_INSTALL_NAME_TOOL)
endif()
mark_as_advanced(CMAKE_INSTALL_NAME_TOOL)
endif(APPLE)
endif()

View File

@ -19,7 +19,7 @@ find_program(CMAKE_CODEBLOCKS_EXECUTABLE NAMES codeblocks DOC "The CodeBlocks ex
if(CMAKE_CODEBLOCKS_EXECUTABLE)
set(CMAKE_OPEN_PROJECT_COMMAND "${CMAKE_CODEBLOCKS_EXECUTABLE} <PROJECT_FILE>" )
endif(CMAKE_CODEBLOCKS_EXECUTABLE)
endif()
# Determine builtin macros and include dirs:
include(${CMAKE_CURRENT_LIST_DIR}/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake)

View File

@ -25,8 +25,8 @@ if(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
/Network/Library/Frameworks/${fwk}.framework)
if(EXISTS ${dir})
set(${fwk}_FRAMEWORKS ${${fwk}_FRAMEWORKS} ${dir})
endif(EXISTS ${dir})
endforeach(dir)
endif(APPLE)
endmacro(CMAKE_FIND_FRAMEWORKS)
endif(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
endif()
endforeach()
endif()
endmacro()
endif()

View File

@ -19,5 +19,5 @@ find_program(CMAKE_KDEVELOP3_EXECUTABLE NAMES kdevelop DOC "The KDevelop3 execut
if(CMAKE_KDEVELOP3_EXECUTABLE)
set(CMAKE_OPEN_PROJECT_COMMAND "${CMAKE_KDEVELOP3_EXECUTABLE} <PROJECT_FILE>" )
endif(CMAKE_KDEVELOP3_EXECUTABLE)
endif()

View File

@ -179,7 +179,7 @@ if(${NAME}_FOUND OR ${UPPERCASE_NAME}_FOUND)
set_compile_flags_var(${NAME})
elseif("${MODE}" STREQUAL "LINK")
set_link_flags_var(${NAME})
else("${MODE}" STREQUAL "LINK")
else()
message(FATAL_ERROR "Invalid mode argument ${MODE} given.")
endif()

View File

@ -52,8 +52,8 @@ macro(CMAKE_FORCE_C_COMPILER compiler id)
# Set old compiler id variables.
if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
set(CMAKE_COMPILER_IS_GNUCC 1)
endif("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
endmacro(CMAKE_FORCE_C_COMPILER)
endif()
endmacro()
macro(CMAKE_FORCE_CXX_COMPILER compiler id)
set(CMAKE_CXX_COMPILER "${compiler}")
@ -65,8 +65,8 @@ macro(CMAKE_FORCE_CXX_COMPILER compiler id)
# Set old compiler id variables.
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
set(CMAKE_COMPILER_IS_GNUCXX 1)
endif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
endmacro(CMAKE_FORCE_CXX_COMPILER)
endif()
endmacro()
macro(CMAKE_FORCE_Fortran_COMPILER compiler id)
set(CMAKE_Fortran_COMPILER "${compiler}")
@ -78,5 +78,5 @@ macro(CMAKE_FORCE_Fortran_COMPILER compiler id)
# Set old compiler id variables.
if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
set(CMAKE_COMPILER_IS_GNUG77 1)
endif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
endmacro(CMAKE_FORCE_Fortran_COMPILER)
endif()
endmacro()

View File

@ -12,7 +12,7 @@ set(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
if(CMAKE_COMPILER_IS_CYGWIN)
set(CYGWIN 1)
set(UNIX 1)
endif(CMAKE_COMPILER_IS_CYGWIN)
endif()
set(CMAKE_Fortran_COMPILER_ENV_VAR "FC")
@ -20,16 +20,16 @@ set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 @CMAKE_Fortran_COMPILER_SUPPORTS_F90@)
if(CMAKE_COMPILER_IS_MINGW)
set(MINGW 1)
endif(CMAKE_COMPILER_IS_MINGW)
endif()
set(CMAKE_Fortran_COMPILER_ID_RUN 1)
set(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;f77;F77;f90;F90;for;For;FOR;f95;F95)
set(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
set(CMAKE_Fortran_LINKER_PREFERENCE 20)
if(UNIX)
set(CMAKE_Fortran_OUTPUT_EXTENSION .o)
else(UNIX)
else()
set(CMAKE_Fortran_OUTPUT_EXTENSION .obj)
endif(UNIX)
endif()
# Save compiler ABI information.
set(CMAKE_Fortran_SIZEOF_DATA_PTR "@CMAKE_Fortran_SIZEOF_DATA_PTR@")
@ -42,7 +42,7 @@ endif()
if(CMAKE_Fortran_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_Fortran_COMPILER_ABI}")
endif(CMAKE_Fortran_COMPILER_ABI)
endif()
if(CMAKE_Fortran_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_Fortran_LIBRARY_ARCHITECTURE@")

View File

@ -21,28 +21,28 @@ set(_INCLUDED_FILE 0)
# Load compiler-specific information.
if(CMAKE_Fortran_COMPILER_ID)
include(Compiler/${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL)
endif(CMAKE_Fortran_COMPILER_ID)
endif()
set(CMAKE_BASE_NAME)
get_filename_component(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++
if(CMAKE_COMPILER_IS_GNUG77)
set(CMAKE_BASE_NAME g77)
endif(CMAKE_COMPILER_IS_GNUG77)
endif()
if(CMAKE_Fortran_COMPILER_ID)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
endif(CMAKE_Fortran_COMPILER_ID)
endif()
if (NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
RESULT_VARIABLE _INCLUDED_FILE)
endif (NOT _INCLUDED_FILE)
endif ()
# We specify the compiler information in the system file for some
# platforms, but this language may not have been enabled when the file
# was first included. Include it again to get the language info.
# Remove this when all compiler info is removed from system files.
if (NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
endif (NOT _INCLUDED_FILE)
endif ()
if(CMAKE_Fortran_SIZEOF_DATA_PTR)
foreach(f ${CMAKE_Fortran_ABI_FILES})
@ -76,15 +76,15 @@ set(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1)
if(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIC)
set(CMAKE_Fortran_COMPILE_OPTIONS_PIC ${CMAKE_C_COMPILE_OPTIONS_PIC})
endif(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIC)
endif()
if(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIE)
set(CMAKE_Fortran_COMPILE_OPTIONS_PIE ${CMAKE_C_COMPILE_OPTIONS_PIE})
endif(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIE)
endif()
if(NOT CMAKE_Fortran_COMPILE_OPTIONS_DLL)
set(CMAKE_Fortran_COMPILE_OPTIONS_DLL ${CMAKE_C_COMPILE_OPTIONS_DLL})
endif(NOT CMAKE_Fortran_COMPILE_OPTIONS_DLL)
endif()
# Create a set of shared library variable specific to Fortran
# For 90% of the systems, these are the same flags as the C versions
@ -127,7 +127,7 @@ endif()
if(NOT CMAKE_MODULE_EXISTS)
set(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_Fortran_FLAGS})
set(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS})
endif(NOT CMAKE_MODULE_EXISTS)
endif()
# repeat for modules
if(NOT DEFINED CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
@ -152,15 +152,15 @@ endif()
if(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
endif(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
endif()
if(NOT CMAKE_INCLUDE_FLAG_Fortran)
set(CMAKE_INCLUDE_FLAG_Fortran ${CMAKE_INCLUDE_FLAG_C})
endif(NOT CMAKE_INCLUDE_FLAG_Fortran)
endif()
if(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
set(CMAKE_INCLUDE_FLAG_SEP_Fortran ${CMAKE_INCLUDE_FLAG_SEP_C})
endif(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
endif()
set(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
@ -168,7 +168,7 @@ set(CMAKE_Fortran_FLAGS_INIT "$ENV{FFLAGS} ${CMAKE_Fortran_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
if(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
set(CMAKE_Fortran_FLAGS_INIT)
endif(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
endif()
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_INIT}" CACHE STRING
"Flags for Fortran compiler.")
@ -184,12 +184,12 @@ include(CMakeCommonLanguageInclude)
if(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"<CMAKE_Fortran_COMPILER> <CMAKE_SHARED_LIBRARY_Fortran_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
endif(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
endif()
# create a Fortran shared module just copy the shared library rule
if(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
set(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
endif(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
endif()
# Create a static archive incrementally for large object file counts.
# If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these.
@ -208,19 +208,19 @@ endif()
if(NOT CMAKE_Fortran_COMPILE_OBJECT)
set(CMAKE_Fortran_COMPILE_OBJECT
"<CMAKE_Fortran_COMPILER> <DEFINES> <FLAGS> -c <SOURCE> -o <OBJECT>")
endif(NOT CMAKE_Fortran_COMPILE_OBJECT)
endif()
# link a fortran program
if(NOT CMAKE_Fortran_LINK_EXECUTABLE)
set(CMAKE_Fortran_LINK_EXECUTABLE
"<CMAKE_Fortran_COMPILER> <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
endif(NOT CMAKE_Fortran_LINK_EXECUTABLE)
endif()
if(CMAKE_Fortran_STANDARD_LIBRARIES_INIT)
set(CMAKE_Fortran_STANDARD_LIBRARIES "${CMAKE_Fortran_STANDARD_LIBRARIES_INIT}"
CACHE STRING "Libraries linked by defalut with all Fortran applications.")
mark_as_advanced(CMAKE_Fortran_STANDARD_LIBRARIES)
endif(CMAKE_Fortran_STANDARD_LIBRARIES_INIT)
endif()
if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG_INIT}" CACHE STRING
@ -232,7 +232,7 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
set (CMAKE_Fortran_FLAGS_RELWITHDEBINFO "${CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
endif()
mark_as_advanced(
CMAKE_Fortran_FLAGS

View File

@ -51,21 +51,21 @@ if(CMAKE_GENERATOR MATCHES "Makefiles")
mark_as_advanced(CMAKE_COLOR_MAKEFILE)
if(DEFINED CMAKE_RULE_MESSAGES)
set_property(GLOBAL PROPERTY RULE_MESSAGES ${CMAKE_RULE_MESSAGES})
endif(DEFINED CMAKE_RULE_MESSAGES)
endif()
if(CMAKE_GENERATOR MATCHES "Unix Makefiles")
set(CMAKE_EXPORT_COMPILE_COMMANDS OFF CACHE BOOL
"Enable/Disable output of compile commands during generation."
)
mark_as_advanced(CMAKE_EXPORT_COMPILE_COMMANDS)
endif(CMAKE_GENERATOR MATCHES "Unix Makefiles")
endif(CMAKE_GENERATOR MATCHES "Makefiles")
endif()
endif()
if(CMAKE_GENERATOR MATCHES "Ninja")
set(CMAKE_EXPORT_COMPILE_COMMANDS OFF CACHE BOOL
"Enable/Disable output of compile commands during generation."
)
mark_as_advanced(CMAKE_EXPORT_COMPILE_COMMANDS)
endif(CMAKE_GENERATOR MATCHES "Ninja")
endif()
# GetDefaultWindowsPrefixBase
#
@ -162,19 +162,19 @@ endfunction()
# command line to override it.
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1)
endif(NOT DEFINED CMAKE_INSTALL_PREFIX)
endif()
# Choose a default install prefix for this platform.
if(CMAKE_HOST_UNIX)
set(CMAKE_INSTALL_PREFIX "/usr/local"
CACHE PATH "Install path prefix, prepended onto install directories.")
else(CMAKE_HOST_UNIX)
else()
GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
set(CMAKE_INSTALL_PREFIX
"${CMAKE_GENERIC_PROGRAM_FILES}/${PROJECT_NAME}"
CACHE PATH "Install path prefix, prepended onto install directories.")
set(CMAKE_GENERIC_PROGRAM_FILES)
endif(CMAKE_HOST_UNIX)
endif()
# Set a variable which will be used as component name in install() commands
# where no COMPONENT has been given:

View File

@ -18,7 +18,7 @@
# stored settings using the CMAKE_EXPORT_BUILD_SETTINGS macro.
macro(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE)
if(${SETTINGS_FILE} MATCHES ".+")
else(${SETTINGS_FILE} MATCHES ".+")
else()
message(SEND_ERROR "CMAKE_IMPORT_BUILD_SETTINGS called with no argument.")
endif(${SETTINGS_FILE} MATCHES ".+")
endmacro(CMAKE_IMPORT_BUILD_SETTINGS)
endif()
endmacro()

View File

@ -34,26 +34,26 @@ endif()
if(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
# if(WIN32)
# set(class_files_mask "*.class")
# else(WIN32)
# else()
set(class_files_mask ".")
# endif(WIN32)
# endif()
set(CMAKE_Java_CREATE_STATIC_LIBRARY
"<CMAKE_Java_ARCHIVE> -cf <TARGET> -C <OBJECT_DIR> ${class_files_mask}")
# "${class_files_mask}" should really be "<OBJECTS>" but compling a *.java
# file can create more than one *.class file...
endif(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
endif()
# compile a Java file into an object file
if(NOT CMAKE_Java_COMPILE_OBJECT)
set(CMAKE_Java_COMPILE_OBJECT
"<CMAKE_Java_COMPILER> <FLAGS> <SOURCE> -d <OBJECT_DIR>")
endif(NOT CMAKE_Java_COMPILE_OBJECT)
endif()
# set java include flag option and the separator for multiple include paths
set(CMAKE_INCLUDE_FLAG_Java "-classpath ")
if(WIN32 AND NOT CYGWIN)
set(CMAKE_INCLUDE_FLAG_SEP_Java ";")
else(WIN32 AND NOT CYGWIN)
else()
set(CMAKE_INCLUDE_FLAG_SEP_Java ":")
endif(WIN32 AND NOT CYGWIN)
endif()

View File

@ -19,6 +19,6 @@ find_program(CMAKE_SH sh.exe )
if(CMAKE_SH)
message(FATAL_ERROR "sh.exe was found in your PATH, here:\n${CMAKE_SH}\nFor MinGW make to work correctly sh.exe must NOT be in your path.\nRun cmake from a shell that does not have sh.exe in your PATH.\nIf you want to use a UNIX shell, then use MSYS Makefiles.\n")
set(CMAKE_MAKE_PROGRAM NOTFOUND)
endif(CMAKE_SH)
endif()
mark_as_advanced(CMAKE_MAKE_PROGRAM CMAKE_SH)

View File

@ -214,7 +214,7 @@ macro(check_required_components _NAME)
set(\${_NAME}_FOUND FALSE)
endif()
endif()
endforeach(comp)
endforeach()
endmacro()
")
endif()

View File

@ -84,11 +84,11 @@ function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgName
# first set all result variables to empty/FALSE
foreach(arg_name ${_singleArgNames} ${_multiArgNames})
set(${prefix}_${arg_name})
endforeach(arg_name)
endforeach()
foreach(option ${_optionNames})
set(${prefix}_${option} FALSE)
endforeach(option)
endforeach()
set(${prefix}_UNPARSED_ARGUMENTS)
@ -109,9 +109,9 @@ function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgName
elseif("${insideValues}" STREQUAL "MULTI")
list(APPEND ${prefix}_${currentArgName} ${currentArg})
endif()
else(insideValues)
else()
list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
endif(insideValues)
endif()
else()
if(NOT ${optionIndex} EQUAL -1)
set(${prefix}_${currentArg} TRUE)
@ -127,12 +127,12 @@ function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgName
endif()
endif()
endforeach(currentArg)
endforeach()
# propagate the result variables to the caller:
foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
endforeach(arg_name)
endforeach()
set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs)
endfunction()

View File

@ -43,7 +43,7 @@ macro(CMAKE_PUSH_CHECK_STATE)
set(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS})
set(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_LIBRARIES})
set(_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_FLAGS})
endmacro(CMAKE_PUSH_CHECK_STATE)
endmacro()
macro(CMAKE_POP_CHECK_STATE)
@ -58,4 +58,4 @@ macro(CMAKE_POP_CHECK_STATE)
math(EXPR _CMAKE_PUSH_CHECK_STATE_COUNTER "${_CMAKE_PUSH_CHECK_STATE_COUNTER}-1")
endif()
endmacro(CMAKE_POP_CHECK_STATE)
endmacro()

View File

@ -44,7 +44,7 @@ set(CMAKE_INCLUDE_FLAG_RC "-I")
if(NOT CMAKE_RC_COMPILE_OBJECT)
set(CMAKE_RC_COMPILE_OBJECT
"<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> /fo<OBJECT> <SOURCE>")
endif(NOT CMAKE_RC_COMPILE_OBJECT)
endif()
mark_as_advanced(
CMAKE_RC_FLAGS

View File

@ -44,8 +44,8 @@ if(NOT _INCLUDED_SYSTEM_INFO_FILE)
${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
message("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
"Please send that file to cmake@www.cmake.org.")
endif(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
endif(NOT _INCLUDED_SYSTEM_INFO_FILE)
endif()
endif()
# optionally include a file which can do extra-generator specific things, e.g.
@ -53,7 +53,7 @@ endif(NOT _INCLUDED_SYSTEM_INFO_FILE)
if(CMAKE_EXTRA_GENERATOR)
string(REPLACE " " "" _CMAKE_EXTRA_GENERATOR_NO_SPACES ${CMAKE_EXTRA_GENERATOR} )
include("CMakeFind${_CMAKE_EXTRA_GENERATOR_NO_SPACES}" OPTIONAL)
endif(CMAKE_EXTRA_GENERATOR)
endif()
# for most systems a module is the same as a shared library
@ -63,7 +63,7 @@ endif(CMAKE_EXTRA_GENERATOR)
if(NOT CMAKE_MODULE_EXISTS)
set(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
set(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif(NOT CMAKE_MODULE_EXISTS)
endif()
set(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)

View File

@ -37,7 +37,7 @@ if(NOT CMAKE_C_COMPILER_WORKS)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
OUTPUT_VARIABLE __CMAKE_C_COMPILER_OUTPUT)
set(C_TEST_WAS_RUN 1)
endif(NOT CMAKE_C_COMPILER_WORKS)
endif()
if(NOT CMAKE_C_COMPILER_WORKS)
PrintTestCompilerStatus("C" " -- broken")
@ -53,19 +53,19 @@ if(NOT CMAKE_C_COMPILER_WORKS)
"is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${__CMAKE_C_COMPILER_OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
else(NOT CMAKE_C_COMPILER_WORKS)
else()
if(C_TEST_WAS_RUN)
PrintTestCompilerStatus("C" " -- works")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the C compiler works passed with "
"the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n")
endif(C_TEST_WAS_RUN)
endif()
set(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "")
if(CMAKE_C_COMPILER_FORCED)
# The compiler configuration was forced by the user.
# Assume the user has configured all compiler information.
else(CMAKE_C_COMPILER_FORCED)
else()
# Try to identify the ABI and configure it into CMakeCCompiler.cmake
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
CMAKE_DETERMINE_COMPILER_ABI(C ${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c)
@ -75,13 +75,13 @@ else(NOT CMAKE_C_COMPILER_WORKS)
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
include(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake)
endif(CMAKE_C_COMPILER_FORCED)
endif()
if(CMAKE_C_SIZEOF_DATA_PTR)
foreach(f ${CMAKE_C_ABI_FILES})
include(${f})
endforeach()
unset(CMAKE_C_ABI_FILES)
endif()
endif(NOT CMAKE_C_COMPILER_WORKS)
endif()
unset(__CMAKE_C_COMPILER_OUTPUT)

View File

@ -30,7 +30,7 @@ if(NOT CMAKE_CXX_COMPILER_WORKS)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
OUTPUT_VARIABLE __CMAKE_CXX_COMPILER_OUTPUT)
set(CXX_TEST_WAS_RUN 1)
endif(NOT CMAKE_CXX_COMPILER_WORKS)
endif()
if(NOT CMAKE_CXX_COMPILER_WORKS)
PrintTestCompilerStatus("CXX" " -- broken")
@ -46,19 +46,19 @@ if(NOT CMAKE_CXX_COMPILER_WORKS)
"is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${__CMAKE_CXX_COMPILER_OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
else(NOT CMAKE_CXX_COMPILER_WORKS)
else()
if(CXX_TEST_WAS_RUN)
PrintTestCompilerStatus("CXX" " -- works")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler works passed with "
"the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n")
endif(CXX_TEST_WAS_RUN)
endif()
set(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "")
if(CMAKE_CXX_COMPILER_FORCED)
# The compiler configuration was forced by the user.
# Assume the user has configured all compiler information.
else(CMAKE_CXX_COMPILER_FORCED)
else()
# Try to identify the ABI and configure it into CMakeCXXCompiler.cmake
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
CMAKE_DETERMINE_COMPILER_ABI(CXX ${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp)
@ -68,13 +68,13 @@ else(NOT CMAKE_CXX_COMPILER_WORKS)
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
include(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake)
endif(CMAKE_CXX_COMPILER_FORCED)
endif()
if(CMAKE_CXX_SIZEOF_DATA_PTR)
foreach(f ${CMAKE_CXX_ABI_FILES})
include(${f})
endforeach()
unset(CMAKE_CXX_ABI_FILES)
endif()
endif(NOT CMAKE_CXX_COMPILER_WORKS)
endif()
unset(__CMAKE_CXX_COMPILER_OUTPUT)

View File

@ -30,7 +30,7 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
OUTPUT_VARIABLE OUTPUT)
set(FORTRAN_TEST_WAS_RUN 1)
endif(NOT CMAKE_Fortran_COMPILER_WORKS)
endif()
if(NOT CMAKE_Fortran_COMPILER_WORKS)
PrintTestCompilerStatus("Fortran" " -- broken")
@ -41,19 +41,19 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS)
"is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
else(NOT CMAKE_Fortran_COMPILER_WORKS)
else()
if(FORTRAN_TEST_WAS_RUN)
PrintTestCompilerStatus("Fortran" " -- works")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler works passed with "
"the following output:\n${OUTPUT}\n\n")
endif(FORTRAN_TEST_WAS_RUN)
endif()
set(CMAKE_Fortran_COMPILER_WORKS 1 CACHE INTERNAL "")
if(CMAKE_Fortran_COMPILER_FORCED)
# The compiler configuration was forced by the user.
# Assume the user has configured all compiler information.
else(CMAKE_Fortran_COMPILER_FORCED)
else()
# Try to identify the ABI and configure it into CMakeFortranCompiler.cmake
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
CMAKE_DETERMINE_COMPILER_ABI(Fortran ${CMAKE_ROOT}/Modules/CMakeFortranCompilerABI.F)
@ -75,15 +75,15 @@ else(NOT CMAKE_Fortran_COMPILER_WORKS)
"Determining if the Fortran compiler supports Fortran 90 passed with "
"the following output:\n${OUTPUT}\n\n")
set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1)
else(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
else()
message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- no")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran compiler supports Fortran 90 failed with "
"the following output:\n${OUTPUT}\n\n")
set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 0)
endif(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
endif()
unset(CMAKE_Fortran_COMPILER_SUPPORTS_F90 CACHE)
endif(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
endif()
configure_file(
${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
@ -91,11 +91,11 @@ else(NOT CMAKE_Fortran_COMPILER_WORKS)
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
include(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake)
endif(CMAKE_Fortran_COMPILER_FORCED)
endif()
if(CMAKE_Fortran_SIZEOF_DATA_PTR)
foreach(f ${CMAKE_Fortran_ABI_FILES})
include(${f})
endforeach()
unset(CMAKE_Fortran_ABI_FILES)
endif()
endif(NOT CMAKE_Fortran_COMPILER_WORKS)
endif()

View File

@ -16,7 +16,7 @@
set( _CMAKE_MAKE_PROGRAM_NAMES devenv)
if(NOT CMAKE_CROSSCOMPILING)
set( _CMAKE_MAKE_PROGRAM_NAMES ${_CMAKE_MAKE_PROGRAM_NAMES} VCExpress)
endif(NOT CMAKE_CROSSCOMPILING)
endif()
find_program(CMAKE_MAKE_PROGRAM
NAMES ${_CMAKE_MAKE_PROGRAM_NAMES}

View File

@ -16,7 +16,7 @@
set( _CMAKE_MAKE_PROGRAM_NAMES devenv)
if(NOT CMAKE_CROSSCOMPILING)
set( _CMAKE_MAKE_PROGRAM_NAMES ${_CMAKE_MAKE_PROGRAM_NAMES} VCExpress)
endif(NOT CMAKE_CROSSCOMPILING)
endif()
find_program(CMAKE_MAKE_PROGRAM
NAMES ${_CMAKE_MAKE_PROGRAM_NAMES}

View File

@ -47,7 +47,7 @@ function(crt_version file list_var)
else()
message(FATAL_ERROR "Parse error could not find version in [${s}]")
endif()
endforeach(s)
endforeach()
if(NOT DEFINED has_match)
message("Information: no embeded manifest in: ${file}")
return()
@ -57,7 +57,7 @@ function(crt_version file list_var)
if(version_list)
set(${list_var} ${version_list} PARENT_SCOPE)
endif()
endfunction(crt_version)
endfunction()
set(fatal_error FALSE)
# check_version:
@ -75,7 +75,7 @@ function(check_version file manifest_versions)
message("ERROR: ${file} uses ${ver} not found in shipped manifests:[${manifest_versions}].")
set(fatal_error TRUE PARENT_SCOPE)
endif()
endforeach(ver)
endforeach()
list(LENGTH file_versions len)
if(${len} GREATER 1)
message("WARNING: found more than one version of MICROSOFT.VC80.CRT referenced in ${file}: [${file_versions}]")
@ -88,7 +88,7 @@ set(manifest_version_list )
file(GLOB_RECURSE manifest_files "*.manifest")
foreach(f ${manifest_files})
crt_version("${f}" manifest_version_list)
endforeach(f)
endforeach()
list(LENGTH manifest_version_list LEN)
if(LEN EQUAL 0)
message(FATAL_ERROR "No .manifest files found, no version check can be done.")

View File

@ -287,19 +287,19 @@
# Define this var in order to avoid (or warn) concerning multiple inclusion
if(CPack_CMake_INCLUDED)
message(WARNING "CPack.cmake has already been included!!")
else(CPack_CMake_INCLUDED)
else()
set(CPack_CMake_INCLUDED 1)
endif(CPack_CMake_INCLUDED)
endif()
# Pick a configuration file
set(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
if(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
set(cpack_input_file "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
endif(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
endif()
set(cpack_source_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
if(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
set(cpack_source_input_file "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
endif(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
endif()
# Backward compatibility
# Include CPackComponent macros if it has not already been included before.
@ -309,8 +309,8 @@ include(CPackComponent)
macro(cpack_set_if_not_set name value)
if(NOT DEFINED "${name}")
set(${name} "${value}")
endif(NOT DEFINED "${name}")
endmacro(cpack_set_if_not_set)
endif()
endmacro()
# cpack_encode_variables - Macro to encode variables for the configuration file
# find any variable that starts with CPACK and create a variable
@ -324,9 +324,9 @@ macro(cpack_encode_variables)
if("xxx${var}" MATCHES "xxxCPACK")
set(_CPACK_OTHER_VARIABLES_
"${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")")
endif("xxx${var}" MATCHES "xxxCPACK")
endforeach(var ${res})
endmacro(cpack_encode_variables)
endif()
endforeach()
endmacro()
# Set the package name
cpack_set_if_not_set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
@ -352,20 +352,20 @@ cpack_set_if_not_set(CPACK_MODULE_PATH "${CMAKE_MODULE_PATH}")
if(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
endif(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
endif()
if(CPACK_NSIS_MODIFY_PATH)
set(CPACK_NSIS_MODIFY_PATH ON)
endif(CPACK_NSIS_MODIFY_PATH)
endif()
set(__cpack_system_name ${CMAKE_SYSTEM_NAME})
if(${__cpack_system_name} MATCHES Windows)
if(CMAKE_CL_64)
set(__cpack_system_name win64)
else(CMAKE_CL_64)
else()
set(__cpack_system_name win32)
endif(CMAKE_CL_64)
endif(${__cpack_system_name} MATCHES Windows)
endif()
endif()
cpack_set_if_not_set(CPACK_SYSTEM_NAME "${__cpack_system_name}")
# Root dir: default value should be the string literal "$PROGRAMFILES"
@ -386,15 +386,15 @@ cpack_set_if_not_set(CPACK_PACKAGE_RELOCATABLE "true")
# always force to exactly "true" or "false" for CPack.Info.plist.in:
if(CPACK_PACKAGE_RELOCATABLE)
set(CPACK_PACKAGE_RELOCATABLE "true")
else(CPACK_PACKAGE_RELOCATABLE)
else()
set(CPACK_PACKAGE_RELOCATABLE "false")
endif(CPACK_PACKAGE_RELOCATABLE)
endif()
macro(cpack_check_file_exists file description)
if(NOT EXISTS "${file}")
message(SEND_ERROR "CPack ${description} file: \"${file}\" could not be found.")
endif(NOT EXISTS "${file}")
endmacro(cpack_check_file_exists)
endif()
endmacro()
cpack_check_file_exists("${CPACK_PACKAGE_DESCRIPTION_FILE}" "package description")
cpack_check_file_exists("${CPACK_RESOURCE_FILE_LICENSE}" "license resource")
@ -404,8 +404,8 @@ cpack_check_file_exists("${CPACK_RESOURCE_FILE_WELCOME}" "welcome resource")
macro(cpack_optional_append _list _cond _item)
if(${_cond})
set(${_list} ${${_list}} ${_item})
endif(${_cond})
endmacro(cpack_optional_append _list _cond _item)
endif()
endmacro()
##variable
# CPACK_BINARY_<GENNAME> - CPack generated options for binary generators. The
@ -420,26 +420,26 @@ if(NOT CPACK_GENERATOR)
if(UNIX)
if(CYGWIN)
option(CPACK_BINARY_CYGWIN "Enable to build Cygwin binary packages" ON)
else(CYGWIN)
else()
if(APPLE)
option(CPACK_BINARY_BUNDLE "Enable to build OSX bundles" OFF)
option(CPACK_BINARY_DRAGNDROP "Enable to build OSX Drag And Drop package" OFF)
option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages" ON)
option(CPACK_BINARY_OSXX11 "Enable to build OSX X11 packages" OFF)
else(APPLE)
else()
option(CPACK_BINARY_TZ "Enable to build TZ packages" ON)
endif(APPLE)
endif()
option(CPACK_BINARY_STGZ "Enable to build STGZ packages" ON)
option(CPACK_BINARY_TGZ "Enable to build TGZ packages" ON)
option(CPACK_BINARY_TBZ2 "Enable to build TBZ2 packages" OFF)
option(CPACK_BINARY_DEB "Enable to build Debian packages" OFF)
option(CPACK_BINARY_RPM "Enable to build RPM packages" OFF)
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" OFF)
endif(CYGWIN)
else(UNIX)
endif()
else()
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON)
option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF)
endif(UNIX)
endif()
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_BUNDLE Bundle)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DRAGNDROP DragNDrop)
@ -455,29 +455,29 @@ if(NOT CPACK_GENERATOR)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP)
endif(NOT CPACK_GENERATOR)
endif()
# Provide options to choose source generators
if(NOT CPACK_SOURCE_GENERATOR)
if(UNIX)
if(CYGWIN)
option(CPACK_SOURCE_CYGWIN "Enable to build Cygwin source packages" ON)
else(CYGWIN)
else()
option(CPACK_SOURCE_TBZ2 "Enable to build TBZ2 source packages" ON)
option(CPACK_SOURCE_TGZ "Enable to build TGZ source packages" ON)
option(CPACK_SOURCE_TZ "Enable to build TZ source packages" ON)
option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" OFF)
endif(CYGWIN)
else(UNIX)
endif()
else()
option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" ON)
endif(UNIX)
endif()
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_CYGWIN CygwinSource)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TGZ TGZ)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TBZ2 TBZ2)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TZ TZ)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_ZIP ZIP)
endif(NOT CPACK_SOURCE_GENERATOR)
endif()
# mark the above options as advanced
mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11
@ -526,12 +526,12 @@ if(DEFINED CPACK_COMPONENTS_ALL)
if(CPACK_MONOLITHIC_INSTALL)
message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
set(CPACK_COMPONENTS_ALL)
else(CPACK_MONOLITHIC_INSTALL)
else()
# The user has provided the set of components to be installed as
# part of a component-based installation; trust her.
set(CPACK_COMPONENTS_ALL_SET_BY_USER TRUE)
endif(CPACK_MONOLITHIC_INSTALL)
else(DEFINED CPACK_COMPONENTS_ALL)
endif()
else()
# If the user has not specifically requested a monolithic installer
# but has specified components in various "install" commands, tell
# CPack about those components.
@ -543,10 +543,10 @@ else(DEFINED CPACK_COMPONENTS_ALL)
# (at least, it isn't a component-based installation, but may
# become one later if the user uses the cpack_add_* commands).
set(CPACK_COMPONENTS_ALL)
endif(CPACK_COMPONENTS_LEN EQUAL 1)
endif()
set(CPACK_COMPONENTS_LEN)
endif(NOT CPACK_MONOLITHIC_INSTALL)
endif(DEFINED CPACK_COMPONENTS_ALL)
endif()
endif()
# CMake always generates a component named "Unspecified", which is
# used to install everything that doesn't have an explicitly-provided

View File

@ -283,10 +283,10 @@ macro(cpack_parse_arguments prefix arg_names option_names)
set(${prefix}_DEFAULT_ARGS)
foreach(arg_name ${arg_names})
set(${prefix}_${arg_name})
endforeach(arg_name)
endforeach()
foreach(option ${option_names})
set(${prefix}_${option} FALSE)
endforeach(option)
endforeach()
set(current_arg_name DEFAULT_ARGS)
set(current_arg_list)
@ -297,18 +297,18 @@ macro(cpack_parse_arguments prefix arg_names option_names)
set(${prefix}_${current_arg_name} ${current_arg_list})
set(current_arg_name ${arg})
set(current_arg_list)
else (is_arg_name GREATER -1)
else ()
set(loption_names ${option_names})
list(FIND loption_names "${arg}" is_option)
if (is_option GREATER -1)
set(${prefix}_${arg} TRUE)
else (is_option GREATER -1)
else ()
set(current_arg_list ${current_arg_list} ${arg})
endif (is_option GREATER -1)
endif (is_arg_name GREATER -1)
endforeach(arg)
endif ()
endif ()
endforeach()
set(${prefix}_${current_arg_name} ${current_arg_list})
endmacro(cpack_parse_arguments)
endmacro()
# Macro that appends a SET command for the given variable name (var)
# to the macro named strvar, but only if the variable named "var"
@ -319,10 +319,10 @@ macro(cpack_append_variable_set_command var strvar)
set(${strvar} "${${strvar}}set(${var}")
foreach(APPENDVAL ${${var}})
set(${strvar} "${${strvar}} ${APPENDVAL}")
endforeach(APPENDVAL)
endforeach()
set(${strvar} "${${strvar}})\n")
endif (DEFINED ${var})
endmacro(cpack_append_variable_set_command)
endif ()
endmacro()
# Macro that appends a SET command for the given variable name (var)
# to the macro named strvar, but only if the variable named "var"
@ -333,9 +333,9 @@ macro(cpack_append_string_variable_set_command var strvar)
list(LENGTH ${var} CPACK_APP_VALUE_LEN)
if(${CPACK_APP_VALUE_LEN} EQUAL 1)
set(${strvar} "${${strvar}}set(${var} \"${${var}}\")\n")
endif(${CPACK_APP_VALUE_LEN} EQUAL 1)
endif (DEFINED ${var})
endmacro(cpack_append_string_variable_set_command)
endif()
endif ()
endmacro()
# Macro that appends a SET command for the given variable name (var)
# to the macro named strvar, but only if the variable named "var"
@ -346,9 +346,9 @@ macro(cpack_append_option_set_command var strvar)
list(LENGTH ${var} CPACK_APP_VALUE_LEN)
if(${CPACK_APP_VALUE_LEN} EQUAL 1)
set(${strvar} "${${strvar}}set(${var} TRUE)\n")
endif(${CPACK_APP_VALUE_LEN} EQUAL 1)
endif (${var})
endmacro(cpack_append_option_set_command)
endif()
endif ()
endmacro()
# Macro that adds a component to the CPack installer
macro(cpack_add_component compname)
@ -375,10 +375,10 @@ macro(cpack_add_component compname)
set(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR}\nSET(CPACK_COMPONENTS_ALL")
foreach(COMP ${CPACK_ADDCOMP_COMPONENTS})
set(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR} ${COMP}")
endforeach(COMP)
endforeach()
set(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR})\n")
endif(NOT CPACK_COMPONENTS_ALL_SET_BY_USER)
endif(NOT CPACK_MONOLITHIC_INSTALL)
endif()
endif()
cpack_append_string_variable_set_command(
CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DISPLAY_NAME
@ -416,8 +416,8 @@ macro(cpack_add_component compname)
# will be encoded by cpack_encode_variables.
if(CPack_CMake_INCLUDED)
file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_ADDCOMP_STR}")
endif(CPack_CMake_INCLUDED)
endmacro(cpack_add_component)
endif()
endmacro()
# Macro that adds a component group to the CPack installer
macro(cpack_add_component_group grpname)
@ -447,8 +447,8 @@ macro(cpack_add_component_group grpname)
# will be encoded by cpack_encode_variables.
if(CPack_CMake_INCLUDED)
file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_ADDGRP_STR}")
endif(CPack_CMake_INCLUDED)
endmacro(cpack_add_component_group)
endif()
endmacro()
# Macro that adds an installation type to the CPack installer
macro(cpack_add_install_type insttype)
@ -472,8 +472,8 @@ macro(cpack_add_install_type insttype)
# will be encoded by cpack_encode_variables.
if(CPack_CMake_INCLUDED)
file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_INSTTYPE_STR}")
endif(CPack_CMake_INCLUDED)
endmacro(cpack_add_install_type)
endif()
endmacro()
macro(cpack_configure_downloads site)
cpack_parse_arguments(CPACK_DOWNLOAD
@ -497,7 +497,7 @@ macro(cpack_configure_downloads site)
CPACK_CONFIG_DL_STR)
if (${CPACK_DOWNLOAD_ALL} AND NOT ${CPACK_DOWNLOAD_NO_ADD_REMOVE})
set(CPACK_DOWNLOAD_ADD_REMOVE ON)
endif (${CPACK_DOWNLOAD_ALL} AND NOT ${CPACK_DOWNLOAD_NO_ADD_REMOVE})
endif ()
set(CPACK_ADD_REMOVE ${CPACK_DOWNLOAD_ADD_REMOVE})
cpack_append_option_set_command(
CPACK_ADD_REMOVE
@ -508,6 +508,6 @@ macro(cpack_configure_downloads site)
# will be encoded by cpack_encode_variables.
if(CPack_CMake_INCLUDED)
file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_CONFIG_DL_STR}")
endif(CPack_CMake_INCLUDED)
endmacro(cpack_configure_downloads)
endif(NOT CPackComponent_CMake_INCLUDED)
endif()
endmacro()
endif()

View File

@ -187,22 +187,22 @@
if(CMAKE_BINARY_DIR)
message(FATAL_ERROR "CPackDeb.cmake may only be used by CPack internally.")
endif(CMAKE_BINARY_DIR)
endif()
if(NOT UNIX)
message(FATAL_ERROR "CPackDeb.cmake may only be used under UNIX.")
endif(NOT UNIX)
endif()
# CPACK_DEBIAN_PACKAGE_SHLIBDEPS
# If specify OFF, only user depends are used
if(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
endif(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
endif()
find_program(FAKEROOT_EXECUTABLE fakeroot)
if(FAKEROOT_EXECUTABLE)
set(CPACK_DEBIAN_FAKEROOT_EXECUTABLE ${FAKEROOT_EXECUTABLE})
endif(FAKEROOT_EXECUTABLE)
endif()
if(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
# dpkg-shlibdeps is a Debian utility for generating dependency list
@ -220,7 +220,7 @@ if(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
set(SHLIBDEPS_EXECUTABLE_VERSION "${CMAKE_MATCH_1}")
if(CPACK_DEBIAN_PACKAGE_DEBUG)
message( "CPackDeb Debug: dpkg-shlibdeps version is <${SHLIBDEPS_EXECUTABLE_VERSION}>")
endif(CPACK_DEBIAN_PACKAGE_DEBUG)
endif()
# Generating binary list - Get type of all install files
execute_process(COMMAND find -type f
@ -260,17 +260,17 @@ if(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
if(CPACK_DEBIAN_PACKAGE_DEBUG)
# dpkg-shlibdeps will throw some warnings if some input files are not binary
message( "CPackDeb Debug: dpkg-shlibdeps warnings \n${SHLIBDEPS_ERROR}")
endif(CPACK_DEBIAN_PACKAGE_DEBUG)
endif()
if (NOT SHLIBDEPS_RESULT EQUAL 0)
message (FATAL_ERROR "CPackDeb: dpkg-shlibdeps: ${SHLIBDEPS_ERROR}")
endif (NOT SHLIBDEPS_RESULT EQUAL 0)
endif ()
#Get rid of prefix generated by dpkg-shlibdeps
string (REGEX REPLACE "^.*Depends=" "" CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS ${SHLIBDEPS_OUTPUT})
if(CPACK_DEBIAN_PACKAGE_DEBUG)
message( "CPackDeb Debug: Found dependency: ${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
endif(CPACK_DEBIAN_PACKAGE_DEBUG)
endif()
# Remove blank control file
# Might not be safe if package actual contain file or directory named debian
@ -279,21 +279,21 @@ if(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
# Append user depend if set
if (CPACK_DEBIAN_PACKAGE_DEPENDS)
set (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
else (CPACK_DEBIAN_PACKAGE_DEPENDS)
else ()
set (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
endif (CPACK_DEBIAN_PACKAGE_DEPENDS)
endif ()
else (SHLIBDEPS_EXECUTABLE)
else ()
if(CPACK_DEBIAN_PACKAGE_DEBUG)
message( "CPackDeb Debug: Using only user-provided depends because dpkg-shlibdeps is not found.")
endif(CPACK_DEBIAN_PACKAGE_DEBUG)
endif(SHLIBDEPS_EXECUTABLE)
endif()
endif()
else (CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
else ()
if(CPACK_DEBIAN_PACKAGE_DEBUG)
message( "CPackDeb Debug: Using only user-provided depends")
endif(CPACK_DEBIAN_PACKAGE_DEBUG)
endif(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
endif()
endif()
# Let's define the control file found in debian package:
@ -305,15 +305,15 @@ endif(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
# Package: (mandatory)
if(NOT CPACK_DEBIAN_PACKAGE_NAME)
string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
endif(NOT CPACK_DEBIAN_PACKAGE_NAME)
endif()
# Version: (mandatory)
if(NOT CPACK_DEBIAN_PACKAGE_VERSION)
if(NOT CPACK_PACKAGE_VERSION)
message(FATAL_ERROR "CPackDeb: Debian package requires a package version")
endif(NOT CPACK_PACKAGE_VERSION)
endif()
set(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
endif(NOT CPACK_DEBIAN_PACKAGE_VERSION)
endif()
# Architecture: (mandatory)
if(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
@ -323,12 +323,12 @@ if(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
if(NOT DPKG_CMD)
message(STATUS "CPackDeb: Can not find dpkg in your path, default to i386.")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
endif(NOT DPKG_CMD)
endif()
execute_process(COMMAND "${DPKG_CMD}" --print-architecture
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
endif()
# have a look at get_property(result GLOBAL PROPERTY ENABLED_FEATURES),
# this returns the successful find_package() calls, maybe this can help
@ -337,33 +337,33 @@ endif(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
# TODO: automate 'objdump -p | grep NEEDED'
if(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
message(STATUS "CPACK_DEBIAN_PACKAGE_DEPENDS not set, the package will have no dependencies.")
endif(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
endif()
# Maintainer: (mandatory)
if(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
if(NOT CPACK_PACKAGE_CONTACT)
message(FATAL_ERROR "CPackDeb: Debian package requires a maintainer for a package, set CPACK_PACKAGE_CONTACT or CPACK_DEBIAN_PACKAGE_MAINTAINER")
endif(NOT CPACK_PACKAGE_CONTACT)
endif()
set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
endif(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
endif()
# Description: (mandatory)
if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION")
endif(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
endif()
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
endif(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
endif()
# Section: (recommended)
if(NOT CPACK_DEBIAN_PACKAGE_SECTION)
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
endif(NOT CPACK_DEBIAN_PACKAGE_SECTION)
endif()
# Priority: (recommended)
if(NOT CPACK_DEBIAN_PACKAGE_PRIORITY)
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
endif(NOT CPACK_DEBIAN_PACKAGE_PRIORITY )
endif()
# Recommends:
# You should set: CPACK_DEBIAN_PACKAGE_RECOMMENDS
@ -388,11 +388,11 @@ if(CPACK_DEB_PACKAGE_COMPONENT)
set(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "/${CPACK_DEB_PACKAGE_COMPONENT}")
set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_DEB_PACKAGE_COMPONENT}")
string(TOLOWER "${CPACK_PACKAGE_NAME}${CPACK_DEB_PACKAGE_COMPONENT_PART_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
else(CPACK_DEB_PACKAGE_COMPONENT)
else()
set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "")
set(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "")
set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
endif(CPACK_DEB_PACKAGE_COMPONENT)
endif()
# Print out some debug information if we were asked for that
if(CPACK_DEBIAN_PACKAGE_DEBUG)
@ -404,7 +404,7 @@ if(CPACK_DEBIAN_PACKAGE_DEBUG)
message("CPackDeb:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
message("CPackDeb:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
message("CPackDeb:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
endif(CPACK_DEBIAN_PACKAGE_DEBUG)
endif()
# For debian source packages:
# debian/control
@ -418,4 +418,4 @@ endif(CPACK_DEBIAN_PACKAGE_DEBUG)
# set(CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS
# "debhelper (>> 5.0.0), libncurses5-dev, tcl8.4"
# )
#endif(NOT CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS)
#endif()

View File

@ -241,11 +241,11 @@
if(CMAKE_BINARY_DIR)
message(FATAL_ERROR "CPackRPM.cmake may only be used by CPack internally.")
endif(CMAKE_BINARY_DIR)
endif()
if(NOT UNIX)
message(FATAL_ERROR "CPackRPM.cmake may only be used under UNIX.")
endif(NOT UNIX)
endif()
# rpmbuild is the basic command for building RPM package
# it may be a simple (symbolic) link to rpm command.
@ -264,12 +264,12 @@ if(RPMBUILD_EXECUTABLE)
${_TMP_VERSION})
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: rpmbuild version is <${RPMBUILD_EXECUTABLE_VERSION}>")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif(RPMBUILD_EXECUTABLE)
endif()
endif()
if(NOT RPMBUILD_EXECUTABLE)
message(FATAL_ERROR "RPM package requires rpmbuild executable")
endif(NOT RPMBUILD_EXECUTABLE)
endif()
# Display lsb_release output if DEBUG mode enable
# This will help to diagnose problem with CPackRPM
@ -284,11 +284,11 @@ if(CPACK_RPM_PACKAGE_DEBUG)
string(REGEX REPLACE "\n" ", "
LSB_RELEASE_OUTPUT
${_TMP_LSB_RELEASE_OUTPUT})
else (LSB_RELEASE_EXECUTABLE)
else ()
set(LSB_RELEASE_OUTPUT "lsb_release not installed/found!")
endif(LSB_RELEASE_EXECUTABLE)
endif()
message("CPackRPM:Debug: LSB_RELEASE = ${LSB_RELEASE_OUTPUT}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
# We may use RPM version in the future in order
# to shut down warning about space in buildtree
@ -296,7 +296,7 @@ endif(CPACK_RPM_PACKAGE_DEBUG)
# not checked [yet].
if(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
message(FATAL_ERROR "${RPMBUILD_EXECUTABLE} can't handle paths with spaces, use a build directory without spaces for building RPMs.")
endif(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
endif()
# If rpmbuild is found
# we try to discover alien since we may be on non RPM distro like Debian.
@ -306,18 +306,18 @@ endif(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
find_program(ALIEN_EXECUTABLE alien)
if(ALIEN_EXECUTABLE)
message(STATUS "alien found, we may be on a Debian based distro.")
endif(ALIEN_EXECUTABLE)
endif()
# Are we packaging components ?
if(CPACK_RPM_PACKAGE_COMPONENT)
set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
set(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}")
set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}")
else(CPACK_RPM_PACKAGE_COMPONENT)
else()
set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
set(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "")
set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
endif(CPACK_RPM_PACKAGE_COMPONENT)
endif()
#
# Use user-defined RPM specific variables value
@ -333,23 +333,23 @@ if(NOT CPACK_RPM_PACKAGE_SUMMARY)
# if neither var is defined lets use the name as summary
if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_SUMMARY)
else(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
else()
set(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
endif(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
endif(NOT CPACK_RPM_PACKAGE_SUMMARY)
endif()
endif()
# CPACK_RPM_PACKAGE_NAME (mandatory)
if(NOT CPACK_RPM_PACKAGE_NAME)
string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_NAME)
endif(NOT CPACK_RPM_PACKAGE_NAME)
endif()
# CPACK_RPM_PACKAGE_VERSION (mandatory)
if(NOT CPACK_RPM_PACKAGE_VERSION)
if(NOT CPACK_PACKAGE_VERSION)
message(FATAL_ERROR "RPM package requires a package version")
endif(NOT CPACK_PACKAGE_VERSION)
endif()
set(CPACK_RPM_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
endif(NOT CPACK_RPM_PACKAGE_VERSION)
endif()
# Replace '-' in version with '_'
# '-' character is an Illegal RPM version character
# it is illegal because it is used to separate
@ -361,10 +361,10 @@ if(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(TMP_RPM_BUILDARCH "Buildarch: ${CPACK_RPM_PACKAGE_ARCHITECTURE}")
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: using user-specified build arch = ${CPACK_RPM_PACKAGE_ARCHITECTURE}")
endif(CPACK_RPM_PACKAGE_DEBUG)
else(CPACK_RPM_PACKAGE_ARCHITECTURE)
endif()
else()
set(TMP_RPM_BUILDARCH "")
endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
endif()
# CPACK_RPM_PACKAGE_RELEASE
# The RPM release is the numbering of the RPM package ITSELF
@ -376,26 +376,26 @@ endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
# If not set, 1 is a good candidate
if(NOT CPACK_RPM_PACKAGE_RELEASE)
set(CPACK_RPM_PACKAGE_RELEASE 1)
endif(NOT CPACK_RPM_PACKAGE_RELEASE)
endif()
# CPACK_RPM_PACKAGE_LICENSE
if(NOT CPACK_RPM_PACKAGE_LICENSE)
set(CPACK_RPM_PACKAGE_LICENSE "unknown")
endif(NOT CPACK_RPM_PACKAGE_LICENSE)
endif()
# CPACK_RPM_PACKAGE_GROUP
if(NOT CPACK_RPM_PACKAGE_GROUP)
set(CPACK_RPM_PACKAGE_GROUP "unknown")
endif(NOT CPACK_RPM_PACKAGE_GROUP)
endif()
# CPACK_RPM_PACKAGE_VENDOR
if(NOT CPACK_RPM_PACKAGE_VENDOR)
if(CPACK_PACKAGE_VENDOR)
set(CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}")
else(CPACK_PACKAGE_VENDOR)
else()
set(CPACK_RPM_PACKAGE_VENDOR "unknown")
endif(CPACK_PACKAGE_VENDOR)
endif(NOT CPACK_RPM_PACKAGE_VENDOR)
endif()
endif()
# CPACK_RPM_PACKAGE_SOURCE
# The name of the source tarball in case we generate a source RPM
@ -410,70 +410,70 @@ endif(NOT CPACK_RPM_PACKAGE_VENDOR)
if (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
if (CPACK_PACKAGE_DESCRIPTION_FILE)
file(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_RPM_PACKAGE_DESCRIPTION)
else (CPACK_PACKAGE_DESCRIPTION_FILE)
else ()
set(CPACK_RPM_PACKAGE_DESCRIPTION "no package description available")
endif (CPACK_PACKAGE_DESCRIPTION_FILE)
endif (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
endif ()
endif ()
# CPACK_RPM_COMPRESSION_TYPE
#
if (CPACK_RPM_COMPRESSION_TYPE)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: User Specified RPM compression type: ${CPACK_RPM_COMPRESSION_TYPE}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
if(CPACK_RPM_COMPRESSION_TYPE STREQUAL "lzma")
set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.lzdio")
endif(CPACK_RPM_COMPRESSION_TYPE STREQUAL "lzma")
endif()
if(CPACK_RPM_COMPRESSION_TYPE STREQUAL "xz")
set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w7.xzdio")
endif(CPACK_RPM_COMPRESSION_TYPE STREQUAL "xz")
endif()
if(CPACK_RPM_COMPRESSION_TYPE STREQUAL "bzip2")
set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.bzdio")
endif(CPACK_RPM_COMPRESSION_TYPE STREQUAL "bzip2")
endif()
if(CPACK_RPM_COMPRESSION_TYPE STREQUAL "gzip")
set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.gzdio")
endif(CPACK_RPM_COMPRESSION_TYPE STREQUAL "gzip")
else(CPACK_RPM_COMPRESSION_TYPE)
endif()
else()
set(CPACK_RPM_COMPRESSION_TYPE_TMP "")
endif(CPACK_RPM_COMPRESSION_TYPE)
endif()
if(CPACK_PACKAGE_RELOCATABLE)
set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE)
endif(CPACK_PACKAGE_RELOCATABLE)
endif()
if(CPACK_RPM_PACKAGE_RELOCATABLE)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Trying to build a relocatable package")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
if(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON"))
message("CPackRPM:Warning: CPACK_SET_DESTDIR is set (=${CPACK_SET_DESTDIR}) while requesting a relocatable package (CPACK_RPM_PACKAGE_RELOCATABLE is set): this is not supported, the package won't be relocatable.")
else(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON"))
else()
set(CPACK_RPM_PACKAGE_PREFIX ${CPACK_PACKAGING_INSTALL_PREFIX})
endif(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON"))
endif(CPACK_RPM_PACKAGE_RELOCATABLE)
endif()
endif()
# Check if additional fields for RPM spec header are given
# There may be some COMPONENT specific variables as well
foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: processing ${_RPM_SPEC_HEADER}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
if(CPACK_RPM_PACKAGE_COMPONENT)
if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER})
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: using CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER}})
else()
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER} not defined")
message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}})
endif()
else()
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}})
endif()
@ -486,13 +486,13 @@ foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC
set(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}${_PACKAGE_HEADER_TAIL}")
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
set(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
else(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
else()
# Do not forget to unset previously set header (from previous component)
unset(TMP_RPM_${_RPM_SPEC_HEADER})
endif(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
endforeach(_RPM_SPEC_HEADER)
endif()
endforeach()
# CPACK_RPM_SPEC_INSTALL_POST
# May be used to define a RPM post intallation script
@ -501,9 +501,9 @@ endforeach(_RPM_SPEC_HEADER)
if(CPACK_RPM_SPEC_INSTALL_POST)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: User defined CPACK_RPM_SPEC_INSTALL_POST = ${CPACK_RPM_SPEC_INSTALL_POST}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
set(TMP_RPM_SPEC_INSTALL_POST "%define __spec_install_post ${CPACK_RPM_SPEC_INSTALL_POST}")
endif(CPACK_RPM_SPEC_INSTALL_POST)
endif()
# CPACK_RPM_POST_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE)
# CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE)
@ -518,39 +518,39 @@ if(CPACK_RPM_PACKAGE_COMPONENT)
endif()
if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE)
set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE})
else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE)
else()
set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
endif(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE)
else(CPACK_RPM_PACKAGE_COMPONENT)
endif()
else()
set(CPACK_RPM_POST_INSTALL_READ_FILE ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
endif(CPACK_RPM_PACKAGE_COMPONENT)
endif()
# Handle post-install file if it has been specified
if(CPACK_RPM_POST_INSTALL_READ_FILE)
if(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE})
file(READ ${CPACK_RPM_POST_INSTALL_READ_FILE} CPACK_RPM_SPEC_POSTINSTALL)
else(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE})
else()
message("CPackRPM:Warning: CPACK_RPM_POST_INSTALL_SCRIPT_FILE <${CPACK_RPM_POST_INSTALL_READ_FILE}> does not exists - ignoring")
endif(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE})
else(CPACK_RPM_POST_INSTALL_READ_FILE)
endif()
else()
# reset SPEC var value if no post install file has been specified
# (either globally or component-wise)
set(CPACK_RPM_SPEC_POSTINSTALL "")
endif(CPACK_RPM_POST_INSTALL_READ_FILE)
endif()
# Handle post-uninstall file if it has been specified
if(CPACK_RPM_POST_UNINSTALL_READ_FILE)
if(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE})
file(READ ${CPACK_RPM_POST_UNINSTALL_READ_FILE} CPACK_RPM_SPEC_POSTUNINSTALL)
else(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE})
else()
message("CPackRPM:Warning: CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_POST_UNINSTALL_READ_FILE}> does not exists - ignoring")
endif(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE})
else(CPACK_RPM_POST_UNINSTALL_READ_FILE)
endif()
else()
# reset SPEC var value if no post uninstall file has been specified
# (either globally or component-wise)
set(CPACK_RPM_SPEC_POSTUNINSTALL "")
endif(CPACK_RPM_POST_UNINSTALL_READ_FILE)
endif()
# CPACK_RPM_PRE_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE)
# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE)
@ -560,44 +560,44 @@ endif(CPACK_RPM_POST_UNINSTALL_READ_FILE)
if(CPACK_RPM_PACKAGE_COMPONENT)
if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE)
set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE})
else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE)
else()
set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
endif(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE)
endif()
if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE)
set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE})
else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE)
else()
set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
endif(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE)
else(CPACK_RPM_PACKAGE_COMPONENT)
endif()
else()
set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
endif(CPACK_RPM_PACKAGE_COMPONENT)
endif()
# Handle pre-install file if it has been specified
if(CPACK_RPM_PRE_INSTALL_READ_FILE)
if(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE})
file(READ ${CPACK_RPM_PRE_INSTALL_READ_FILE} CPACK_RPM_SPEC_PREINSTALL)
else(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE})
else()
message("CPackRPM:Warning: CPACK_RPM_PRE_INSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_INSTALL_READ_FILE}> does not exists - ignoring")
endif(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE})
else(CPACK_RPM_PRE_INSTALL_READ_FILE)
endif()
else()
# reset SPEC var value if no pre-install file has been specified
# (either globally or component-wise)
set(CPACK_RPM_SPEC_PREINSTALL "")
endif(CPACK_RPM_PRE_INSTALL_READ_FILE)
endif()
# Handle pre-uninstall file if it has been specified
if(CPACK_RPM_PRE_UNINSTALL_READ_FILE)
if(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE})
file(READ ${CPACK_RPM_PRE_UNINSTALL_READ_FILE} CPACK_RPM_SPEC_PREUNINSTALL)
else(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE})
else()
message("CPackRPM:Warning: CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_UNINSTALL_READ_FILE}> does not exists - ignoring")
endif(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE})
else(CPACK_RPM_PRE_UNINSTALL_READ_FILE)
endif()
else()
# reset SPEC var value if no pre-uninstall file has been specified
# (either globally or component-wise)
set(CPACK_RPM_SPEC_PREUNINSTALL "")
endif(CPACK_RPM_PRE_UNINSTALL_READ_FILE)
endif()
# CPACK_RPM_CHANGELOG_FILE
# May be used to embed a changelog in the spec file.
@ -605,20 +605,20 @@ endif(CPACK_RPM_PRE_UNINSTALL_READ_FILE)
if(CPACK_RPM_CHANGELOG_FILE)
if(EXISTS ${CPACK_RPM_CHANGELOG_FILE})
file(READ ${CPACK_RPM_CHANGELOG_FILE} CPACK_RPM_SPEC_CHANGELOG)
else(EXISTS ${CPACK_RPM_CHANGELOG_FILE})
else()
message(SEND_ERROR "CPackRPM:Warning: CPACK_RPM_CHANGELOG_FILE <${CPACK_RPM_CHANGELOG_FILE}> does not exists - ignoring")
endif(EXISTS ${CPACK_RPM_CHANGELOG_FILE})
else(CPACK_RPM_CHANGELOG_FILE)
endif()
else()
set(CPACK_RPM_SPEC_CHANGELOG "* Sun Jul 4 2010 Erk <eric.noulard@gmail.com>\n Generated by CPack RPM (no Changelog file were provided)")
endif(CPACK_RPM_CHANGELOG_FILE)
endif()
# CPACK_RPM_SPEC_MORE_DEFINE
# This is a generated spec rpm file spaceholder
if(CPACK_RPM_SPEC_MORE_DEFINE)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: User defined more define spec line specified:\n ${CPACK_RPM_SPEC_MORE_DEFINE}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif(CPACK_RPM_SPEC_MORE_DEFINE)
endif()
endif()
# Now we may create the RPM build tree structure
set(CPACK_RPM_ROOTDIR "${CPACK_TOPLEVEL_DIRECTORY}")
@ -683,7 +683,7 @@ if(CPACK_RPM_PACKAGE_COMPONENT)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Handling Absolute Destination Files: <${CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL}>")
message("CPackRPM:Debug: in component = ${CPACK_RPM_PACKAGE_COMPONENT}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
endif()
else()
if(CPACK_ABSOLUTE_DESTINATION_FILES)
@ -698,7 +698,7 @@ if(CPACK_RPM_PACKAGE_COMPONENT)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Handling User Filelist: <${CPACK_RPM_USER_FILELIST_INTERNAL}>")
message("CPackRPM:Debug: in component = ${CPACK_RPM_PACKAGE_COMPONENT}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
else()
set(CPACK_RPM_USER_FILELIST_INTERNAL "")
endif()
@ -717,7 +717,7 @@ endif()
if(CPACK_RPM_USER_FILELIST_INTERNAL)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Handling User Filelist: <${CPACK_RPM_USER_FILELIST_INTERNAL}>")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
# Create CMake list from CPACK_RPM_INSTALL_FILES
string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST)
@ -747,7 +747,7 @@ if(CPACK_RPM_USER_FILELIST_INTERNAL)
set(CPACK_RPM_INSTALL_FILES "")
foreach(F IN LISTS CPACK_RPM_INSTALL_FILES_LIST)
set(CPACK_RPM_INSTALL_FILES "${CPACK_RPM_INSTALL_FILES}\"${F}\"\n")
endforeach(F)
endforeach()
else()
set(CPACK_RPM_USER_INSTALL_FILES "")
endif()
@ -755,7 +755,7 @@ endif()
if (CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL)
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Handling Absolute Destination Files: ${CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
# Remove trailing space
string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST)
# Transform endline separated - string into CMake List
@ -768,20 +768,20 @@ if (CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL)
set(CPACK_RPM_INSTALL_FILES "")
foreach(F IN LISTS CPACK_RPM_INSTALL_FILES_LIST)
set(CPACK_RPM_INSTALL_FILES "${CPACK_RPM_INSTALL_FILES}\"${F}\"\n")
endforeach(F)
endforeach()
# Build ABSOLUTE_INSTALL_FILES
set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "")
foreach(F IN LISTS CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL)
set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "${CPACK_RPM_ABSOLUTE_INSTALL_FILES}%config \"${F}\"\n")
endforeach(F)
endforeach()
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: CPACK_RPM_ABSOLUTE_INSTALL_FILES=${CPACK_RPM_ABSOLUTE_INSTALL_FILES}")
message("CPackRPM:Debug: CPACK_RPM_INSTALL_FILES=${CPACK_RPM_INSTALL_FILES}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
else()
# reset vars in order to avoid leakage of value(s) from one component to another
set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "")
endif(CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL)
endif()
# Prepend directories in ${CPACK_RPM_INSTALL_FILES} with %dir
# This is necessary to avoid duplicate files since rpmbuild do
@ -799,7 +799,7 @@ foreach(F IN LISTS CPACK_RPM_INSTALL_FILES_LIST)
else()
set(CPACK_RPM_INSTALL_FILES "${CPACK_RPM_INSTALL_FILES}\"${F}\"\n")
endif()
endforeach(F)
endforeach()
set(CPACK_RPM_INSTALL_FILES_LIST "")
# The name of the final spec file to be used by rpmbuild
@ -816,7 +816,7 @@ if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE = ${CPACK_RPM_BINARY_SPECFILE}")
message("CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
message("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
endif(CPACK_RPM_PACKAGE_DEBUG)
endif()
# USER generated spec file handling.
# We should generate a spec file template:
@ -900,8 +900,8 @@ ${CPACK_RPM_USER_INSTALL_FILES}
# to customize their own spec file.
if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE)
message(FATAL_ERROR "CPackRPM: STOP here Generated USER binary spec file templare is: ${CPACK_RPM_BINARY_SPECFILE}.in")
endif(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE)
endif(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
endif()
endif()
# After that we may either use a user provided spec file
# or generate one using appropriate variables value.
@ -910,12 +910,12 @@ if(CPACK_RPM_USER_BINARY_SPECFILE)
message("CPackRPM: Will use USER specified spec file: ${CPACK_RPM_USER_BINARY_SPECFILE}")
# The user provided file is processed for @var replacement
configure_file(${CPACK_RPM_USER_BINARY_SPECFILE} ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
else(CPACK_RPM_USER_BINARY_SPECFILE)
else()
# No User specified spec file, will use the generated spec file
message("CPackRPM: Will use GENERATED spec file: ${CPACK_RPM_BINARY_SPECFILE}")
# Note the just created file is processed for @var replacement
configure_file(${CPACK_RPM_BINARY_SPECFILE}.in ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
endif(CPACK_RPM_USER_BINARY_SPECFILE)
endif()
if(RPMBUILD_EXECUTABLE)
# Now call rpmbuild using the SPECFILE
@ -936,9 +936,9 @@ if(RPMBUILD_EXECUTABLE)
message("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
message("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
endif(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT)
else(RPMBUILD_EXECUTABLE)
endif()
else()
if(ALIEN_EXECUTABLE)
message(FATAL_ERROR "RPM packaging through alien not done (yet)")
endif(ALIEN_EXECUTABLE)
endif(RPMBUILD_EXECUTABLE)
endif()
endif()

View File

@ -14,21 +14,21 @@
if(CMAKE_BINARY_DIR)
message(FATAL_ERROR "CPackZIP.cmake may only be used by CPack internally.")
endif(CMAKE_BINARY_DIR)
endif()
find_program(ZIP_EXECUTABLE wzzip PATHS "$ENV{ProgramFiles}/WinZip")
if(ZIP_EXECUTABLE)
set(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" -P \"<ARCHIVE>\" @<FILELIST>")
set(CPACK_ZIP_NEED_QUOTES TRUE)
endif(ZIP_EXECUTABLE)
endif()
if(NOT ZIP_EXECUTABLE)
find_program(ZIP_EXECUTABLE 7z PATHS "$ENV{ProgramFiles}/7-Zip")
if(ZIP_EXECUTABLE)
set(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" a -tzip \"<ARCHIVE>\" @<FILELIST>")
set(CPACK_ZIP_NEED_QUOTES TRUE)
endif(ZIP_EXECUTABLE)
endif(NOT ZIP_EXECUTABLE)
endif()
endif()
if(NOT ZIP_EXECUTABLE)
find_package(Cygwin)
@ -36,6 +36,6 @@ if(NOT ZIP_EXECUTABLE)
if(ZIP_EXECUTABLE)
set(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" -r \"<ARCHIVE>\" . -i@<FILELIST>")
set(CPACK_ZIP_NEED_QUOTES FALSE)
endif(ZIP_EXECUTABLE)
endif(NOT ZIP_EXECUTABLE)
endif()
endif()

View File

@ -67,31 +67,31 @@ function(GET_VS_VERSION_STRING generator var)
NUMBER "${generator}")
if("${generator}" MATCHES "Visual Studio 7 .NET 2003")
set(ver_string "vs71")
else("${generator}" MATCHES "Visual Studio 7 .NET 2003")
else()
set(ver_string "vs${NUMBER}")
endif("${generator}" MATCHES "Visual Studio 7 .NET 2003")
endif()
set(${var} ${ver_string} PARENT_SCOPE)
endfunction(GET_VS_VERSION_STRING)
endfunction()
if(BUILD_TESTING)
# Setup some auxilary macros
macro(SET_IF_NOT_SET var val)
if(NOT DEFINED "${var}")
set("${var}" "${val}")
endif(NOT DEFINED "${var}")
endmacro(SET_IF_NOT_SET)
endif()
endmacro()
macro(SET_IF_SET var val)
if(NOT "${val}" MATCHES "^$")
set("${var}" "${val}")
endif(NOT "${val}" MATCHES "^$")
endmacro(SET_IF_SET)
endif()
endmacro()
macro(SET_IF_SET_AND_NOT_SET var val)
if(NOT "${val}" MATCHES "^$")
SET_IF_NOT_SET("${var}" "${val}")
endif(NOT "${val}" MATCHES "^$")
endmacro(SET_IF_SET_AND_NOT_SET)
endif()
endmacro()
# Make sure testing is enabled
enable_testing()
@ -107,18 +107,18 @@ if(BUILD_TESTING)
SET_IF_SET_AND_NOT_SET(DROP_LOCATION "${CTEST_DROP_LOCATION}")
SET_IF_SET_AND_NOT_SET(TRIGGER_SITE "${CTEST_TRIGGER_SITE}")
SET_IF_SET_AND_NOT_SET(UPDATE_TYPE "${CTEST_UPDATE_TYPE}")
endif(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake")
endif()
# the project can have a DartConfig.cmake file
if(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
include("${PROJECT_SOURCE_DIR}/DartConfig.cmake")
else(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
else()
# Dashboard is opened for submissions for a 24 hour period starting at
# the specified NIGHTLY_START_TIME. Time is specified in 24 hour format.
SET_IF_NOT_SET (NIGHTLY_START_TIME "00:00:00 EDT")
SET_IF_NOT_SET(DROP_METHOD "http")
SET_IF_NOT_SET (COMPRESS_SUBMISSION ON)
endif(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
endif()
SET_IF_NOT_SET (NIGHTLY_START_TIME "00:00:00 EDT")
find_program(CVSCOMMAND cvs )
@ -141,7 +141,7 @@ if(BUILD_TESTING)
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
set(UPDATE_TYPE git)
endif()
endif(NOT UPDATE_TYPE)
endif()
string(TOLOWER "${UPDATE_TYPE}" _update_type)
if("${_update_type}" STREQUAL "cvs")
@ -199,36 +199,36 @@ if(BUILD_TESTING)
set(DART_COMPILER "${CMAKE_CXX_COMPILER}")
if(NOT DART_COMPILER)
set(DART_COMPILER "${CMAKE_C_COMPILER}")
endif(NOT DART_COMPILER)
endif()
if(NOT DART_COMPILER)
set(DART_COMPILER "unknown")
endif(NOT DART_COMPILER)
endif()
if(WIN32)
set(DART_NAME_COMPONENT "NAME_WE")
else(WIN32)
else()
set(DART_NAME_COMPONENT "NAME")
endif(WIN32)
endif()
if(NOT BUILD_NAME_SYSTEM_NAME)
set(BUILD_NAME_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
endif(NOT BUILD_NAME_SYSTEM_NAME)
endif()
if(WIN32)
set(BUILD_NAME_SYSTEM_NAME "Win32")
endif(WIN32)
endif()
if(UNIX OR BORLAND)
get_filename_component(DART_CXX_NAME
"${CMAKE_CXX_COMPILER}" ${DART_NAME_COMPONENT})
else(UNIX OR BORLAND)
else()
get_filename_component(DART_CXX_NAME
"${CMAKE_BUILD_TOOL}" ${DART_NAME_COMPONENT})
endif(UNIX OR BORLAND)
endif()
if(DART_CXX_NAME MATCHES "msdev")
set(DART_CXX_NAME "vs60")
endif(DART_CXX_NAME MATCHES "msdev")
endif()
if(DART_CXX_NAME MATCHES "devenv")
GET_VS_VERSION_STRING("${CMAKE_GENERATOR}" DART_CXX_NAME)
endif(DART_CXX_NAME MATCHES "devenv")
endif()
set(BUILDNAME "${BUILD_NAME_SYSTEM_NAME}-${DART_CXX_NAME}")
endif(NOT BUILDNAME)
endif()
# the build command
build_command(MAKECOMMAND_DEFAULT_VALUE
@ -241,11 +241,11 @@ if(BUILD_TESTING)
set(DEFAULT_CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
if(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "")
set(DEFAULT_CTEST_CONFIGURATION_TYPE "Release")
endif(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "")
endif()
if(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
set(CTEST_USE_LAUNCHERS 0)
endif(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
endif()
if(CTEST_USE_LAUNCHERS)
set(CTEST_LAUNCH_COMPILE "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OBJECT> --source <SOURCE> --language <LANGUAGE> --")
set(CTEST_LAUNCH_LINK "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE> --")
@ -253,7 +253,7 @@ if(BUILD_TESTING)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CTEST_LAUNCH_COMPILE}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CTEST_LAUNCH_LINK}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_CUSTOM "${CTEST_LAUNCH_CUSTOM}")
endif(CTEST_USE_LAUNCHERS)
endif()
mark_as_advanced(
BZRCOMMAND
@ -282,5 +282,5 @@ if(BUILD_TESTING)
set(RUN_FROM_CTEST_OR_DART 1)
include(CTestTargets)
set(RUN_FROM_CTEST_OR_DART)
endif(NOT RUN_FROM_DART)
endif(BUILD_TESTING)
endif()
endif()

View File

@ -14,7 +14,7 @@
if(NOT RUN_FROM_CTEST_OR_DART)
message(FATAL_ERROR "Do not incldue CTestTargets.cmake directly")
endif(NOT RUN_FROM_CTEST_OR_DART)
endif()
# make directories in the binary tree
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/Testing/Temporary)
@ -30,11 +30,11 @@ if(CTEST_NEW_FORMAT)
configure_file(
${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in
${PROJECT_BINARY_DIR}/CTestConfiguration.ini )
else(CTEST_NEW_FORMAT)
else()
configure_file(
${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in
${PROJECT_BINARY_DIR}/DartConfiguration.tcl )
endif(CTEST_NEW_FORMAT)
endif()
#
# Section 3:
@ -47,7 +47,7 @@ set(__conf_types "")
if(CMAKE_CONFIGURATION_TYPES)
# We need to pass the configuration type on the test command line.
set(__conf_types -C "${CMAKE_CFG_INTDIR}")
endif(CMAKE_CONFIGURATION_TYPES)
endif()
# Add convenience targets. Do this at most once in case of nested
# projects.
@ -66,7 +66,7 @@ if(NOT _CTEST_TARGETS_ADDED)
)
set_property(TARGET ${mode} PROPERTY RULE_LAUNCH_CUSTOM "")
set_property(TARGET ${mode} PROPERTY FOLDER "CTestDashboardTargets")
endforeach(mode)
endforeach()
# For Makefile generators add more granular targets.
if("${CMAKE_GENERATOR}" MATCHES "(Ninja|Make)")
@ -81,9 +81,9 @@ if(NOT _CTEST_TARGETS_ADDED)
)
set_property(TARGET ${mode}${testtype} PROPERTY RULE_LAUNCH_CUSTOM "")
set_property(TARGET ${mode}${testtype} PROPERTY FOLDER "CTestDashboardTargets")
endforeach(testtype)
endforeach(mode)
endif("${CMAKE_GENERATOR}" MATCHES "(Ninja|Make)")
endforeach()
endforeach()
endif()
# If requested, add an alias that is the equivalent of the built-in "test"
# or "RUN_TESTS" target:
@ -92,4 +92,4 @@ if(NOT _CTEST_TARGETS_ADDED)
${CMAKE_CTEST_COMMAND} ${__conf_types}
)
endif()
endif(NOT _CTEST_TARGETS_ADDED)
endif()

View File

@ -42,4 +42,4 @@ macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
FAIL_REGEX "WARNING: unknown flag:" # Open64
)
set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
endmacro (CHECK_C_COMPILER_FLAG)
endmacro ()

View File

@ -47,15 +47,15 @@ macro(CHECK_C_SOURCE_COMPILES SOURCE VAR)
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
else(CMAKE_REQUIRED_LIBRARIES)
else()
set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
endif(CMAKE_REQUIRED_LIBRARIES)
endif()
if(CMAKE_REQUIRED_INCLUDES)
set(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
else(CMAKE_REQUIRED_INCLUDES)
else()
set(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
endif(CMAKE_REQUIRED_INCLUDES)
endif()
file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
"${SOURCE}\n")
@ -82,14 +82,14 @@ macro(CHECK_C_SOURCE_COMPILES SOURCE VAR)
"Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")
else(${VAR})
else()
message(STATUS "Performing Test ${VAR} - Failed")
set(${VAR} "" CACHE INTERNAL "Test ${VAR}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing C SOURCE FILE Test ${VAR} failed with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")
endif(${VAR})
endif("${VAR}" MATCHES "^${VAR}$")
endmacro(CHECK_C_SOURCE_COMPILES)
endif()
endif()
endmacro()

View File

@ -36,15 +36,15 @@ macro(CHECK_C_SOURCE_RUNS SOURCE VAR)
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
else(CMAKE_REQUIRED_LIBRARIES)
else()
set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
endif(CMAKE_REQUIRED_LIBRARIES)
endif()
if(CMAKE_REQUIRED_INCLUDES)
set(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
else(CMAKE_REQUIRED_INCLUDES)
else()
set(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
endif(CMAKE_REQUIRED_INCLUDES)
endif()
file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
"${SOURCE}\n")
@ -61,7 +61,7 @@ macro(CHECK_C_SOURCE_RUNS SOURCE VAR)
# if it did not compile make the return value fail code of 1
if(NOT ${VAR}_COMPILED)
set(${VAR}_EXITCODE 1)
endif(NOT ${VAR}_COMPILED)
endif()
# if the return value was 0 then it worked
if("${${VAR}_EXITCODE}" EQUAL 0)
set(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
@ -71,12 +71,12 @@ macro(CHECK_C_SOURCE_RUNS SOURCE VAR)
"${OUTPUT}\n"
"Return value: ${${VAR}}\n"
"Source file was:\n${SOURCE}\n")
else("${${VAR}_EXITCODE}" EQUAL 0)
else()
if(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
set(${VAR} "${${VAR}_EXITCODE}")
else(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
else()
set(${VAR} "" CACHE INTERNAL "Test ${VAR}")
endif(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
endif()
message(STATUS "Performing Test ${VAR} - Failed")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
@ -85,7 +85,7 @@ macro(CHECK_C_SOURCE_RUNS SOURCE VAR)
"Return value: ${${VAR}_EXITCODE}\n"
"Source file was:\n${SOURCE}\n")
endif("${${VAR}_EXITCODE}" EQUAL 0)
endif("${VAR}" MATCHES "^${VAR}$")
endmacro(CHECK_C_SOURCE_RUNS)
endif()
endif()
endmacro()

View File

@ -44,5 +44,5 @@ macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
FAIL_REGEX "WARNING: unknown flag:" # Open64
)
set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
endmacro (CHECK_CXX_COMPILER_FLAG)
endmacro ()

View File

@ -48,15 +48,15 @@ macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
else(CMAKE_REQUIRED_LIBRARIES)
else()
set(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
endif(CMAKE_REQUIRED_LIBRARIES)
endif()
if(CMAKE_REQUIRED_INCLUDES)
set(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
else(CMAKE_REQUIRED_INCLUDES)
else()
set(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES)
endif(CMAKE_REQUIRED_INCLUDES)
endif()
file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx"
"${SOURCE}\n")
@ -83,14 +83,14 @@ macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
"Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")
else(${VAR})
else()
message(STATUS "Performing Test ${VAR} - Failed")
set(${VAR} "" CACHE INTERNAL "Test ${VAR}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")
endif(${VAR})
endif("${VAR}" MATCHES "^${VAR}$")
endmacro(CHECK_CXX_SOURCE_COMPILES)
endif()
endif()
endmacro()

View File

@ -36,15 +36,15 @@ macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
else(CMAKE_REQUIRED_LIBRARIES)
else()
set(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
endif(CMAKE_REQUIRED_LIBRARIES)
endif()
if(CMAKE_REQUIRED_INCLUDES)
set(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
else(CMAKE_REQUIRED_INCLUDES)
else()
set(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES)
endif(CMAKE_REQUIRED_INCLUDES)
endif()
file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx"
"${SOURCE}\n")
@ -62,7 +62,7 @@ macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
# if it did not compile make the return value fail code of 1
if(NOT ${VAR}_COMPILED)
set(${VAR}_EXITCODE 1)
endif(NOT ${VAR}_COMPILED)
endif()
# if the return value was 0 then it worked
if("${${VAR}_EXITCODE}" EQUAL 0)
set(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
@ -72,12 +72,12 @@ macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
"${OUTPUT}\n"
"Return value: ${${VAR}}\n"
"Source file was:\n${SOURCE}\n")
else("${${VAR}_EXITCODE}" EQUAL 0)
else()
if(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
set(${VAR} "${${VAR}_EXITCODE}")
else(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
else()
set(${VAR} "" CACHE INTERNAL "Test ${VAR}")
endif(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
endif()
message(STATUS "Performing Test ${VAR} - Failed")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
@ -85,7 +85,7 @@ macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
"${OUTPUT}\n"
"Return value: ${${VAR}_EXITCODE}\n"
"Source file was:\n${SOURCE}\n")
endif("${${VAR}_EXITCODE}" EQUAL 0)
endif("${VAR}" MATCHES "^${VAR}$")
endmacro(CHECK_CXX_SOURCE_RUNS)
endif()
endif()
endmacro()

View File

@ -39,4 +39,4 @@ include(CheckSymbolExists)
macro(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
_CHECK_SYMBOL_EXISTS("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.cxx" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
endmacro(CHECK_CXX_SYMBOL_EXISTS)
endmacro()

View File

@ -33,9 +33,9 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
cmake_expand_imported_targets(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
else(CMAKE_REQUIRED_LIBRARIES)
else()
set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
endif(CMAKE_REQUIRED_LIBRARIES)
endif()
file(WRITE
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
"
@ -58,12 +58,12 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
"${OUTPUT}\n\n")
else(${VARIABLE})
else()
message(STATUS "Looking for Fortran ${FUNCTION} - not found")
set(${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
"${OUTPUT}\n\n")
endif(${VARIABLE})
endif(NOT DEFINED ${VARIABLE})
endmacro(CHECK_FORTRAN_FUNCTION_EXISTS)
endif()
endif()
endmacro()

View File

@ -40,15 +40,15 @@ macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
else(CMAKE_REQUIRED_LIBRARIES)
else()
set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
endif(CMAKE_REQUIRED_LIBRARIES)
endif()
if(CMAKE_REQUIRED_INCLUDES)
set(CHECK_FUNCTION_EXISTS_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
else(CMAKE_REQUIRED_INCLUDES)
else()
set(CHECK_FUNCTION_EXISTS_ADD_INCLUDES)
endif(CMAKE_REQUIRED_INCLUDES)
endif()
try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckFunctionExists.c
@ -63,12 +63,12 @@ macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the function ${FUNCTION} exists passed with the following output:\n"
"${OUTPUT}\n\n")
else(${VARIABLE})
else()
message(STATUS "Looking for ${FUNCTION} - not found")
set(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the function ${FUNCTION} exists failed with the following output:\n"
"${OUTPUT}\n\n")
endif(${VARIABLE})
endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
endmacro(CHECK_FUNCTION_EXISTS)
endif()
endif()
endmacro()

View File

@ -32,9 +32,9 @@ macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
if("${VARIABLE}" MATCHES "^${VARIABLE}$")
if(CMAKE_REQUIRED_INCLUDES)
set(CHECK_INCLUDE_FILE_C_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
else(CMAKE_REQUIRED_INCLUDES)
else()
set(CHECK_INCLUDE_FILE_C_INCLUDE_DIRS)
endif(CMAKE_REQUIRED_INCLUDES)
endif()
set(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
set(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in
@ -43,7 +43,7 @@ macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
if(${ARGC} EQUAL 3)
set(CMAKE_C_FLAGS_SAVE ${CMAKE_C_FLAGS})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARGV2}")
endif(${ARGC} EQUAL 3)
endif()
try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
@ -56,7 +56,7 @@ macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
if(${ARGC} EQUAL 3)
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS_SAVE})
endif(${ARGC} EQUAL 3)
endif()
if(${VARIABLE})
message(STATUS "Looking for ${INCLUDE} - found")
@ -65,13 +65,13 @@ macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
"Determining if the include file ${INCLUDE} "
"exists passed with the following output:\n"
"${OUTPUT}\n\n")
else(${VARIABLE})
else()
message(STATUS "Looking for ${INCLUDE} - not found")
set(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the include file ${INCLUDE} "
"exists failed with the following output:\n"
"${OUTPUT}\n\n")
endif(${VARIABLE})
endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
endmacro(CHECK_INCLUDE_FILE)
endif()
endif()
endmacro()

View File

@ -32,9 +32,9 @@ macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
if("${VARIABLE}" MATCHES "^${VARIABLE}$")
if(CMAKE_REQUIRED_INCLUDES)
set(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
else(CMAKE_REQUIRED_INCLUDES)
else()
set(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS)
endif(CMAKE_REQUIRED_INCLUDES)
endif()
set(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
set(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
@ -43,7 +43,7 @@ macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
if(${ARGC} EQUAL 3)
set(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARGV2}")
endif(${ARGC} EQUAL 3)
endif()
try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
@ -56,7 +56,7 @@ macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
if(${ARGC} EQUAL 3)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_SAVE})
endif(${ARGC} EQUAL 3)
endif()
if(${VARIABLE})
message(STATUS "Looking for C++ include ${INCLUDE} - found")
@ -65,13 +65,13 @@ macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
"Determining if the include file ${INCLUDE} "
"exists passed with the following output:\n"
"${OUTPUT}\n\n")
else(${VARIABLE})
else()
message(STATUS "Looking for C++ include ${INCLUDE} - not found")
set(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the include file ${INCLUDE} "
"exists failed with the following output:\n"
"${OUTPUT}\n\n")
endif(${VARIABLE})
endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
endmacro(CHECK_INCLUDE_FILE_CXX)
endif()
endif()
endmacro()

View File

@ -30,15 +30,15 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
set(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
if(CMAKE_REQUIRED_INCLUDES)
set(CHECK_INCLUDE_FILES_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
else(CMAKE_REQUIRED_INCLUDES)
else()
set(CHECK_INCLUDE_FILES_INCLUDE_DIRS)
endif(CMAKE_REQUIRED_INCLUDES)
endif()
set(CHECK_INCLUDE_FILES_CONTENT "/* */\n")
set(MACRO_CHECK_INCLUDE_FILES_FLAGS ${CMAKE_REQUIRED_FLAGS})
foreach(FILE ${INCLUDE})
set(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
endforeach(FILE)
endforeach()
set(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n\nint main(){return 0;}\n")
configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
@ -70,13 +70,13 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
"Determining if files ${INCLUDE} "
"exist passed with the following output:\n"
"${OUTPUT}\n\n")
else(${VARIABLE})
else()
message(STATUS "Looking for ${_description} - not found.")
set(${VARIABLE} "" CACHE INTERNAL "Have includes ${INCLUDE}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if files ${INCLUDE} "
"exist failed with the following output:\n"
"${OUTPUT}\nSource:\n${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
endif(${VARIABLE})
endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
endmacro(CHECK_INCLUDE_FILES)
endif()
endif()
endmacro()

View File

@ -40,7 +40,7 @@ macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_LIBRARY_EXISTS_LIBRARIES
${CHECK_LIBRARY_EXISTS_LIBRARIES} ${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES})
endif(CMAKE_REQUIRED_LIBRARIES)
endif()
try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckFunctionExists.c
@ -58,13 +58,13 @@ macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
"passed with the following output:\n"
"${OUTPUT}\n\n")
else(${VARIABLE})
else()
message(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found")
set(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
"failed with the following output:\n"
"${OUTPUT}\n\n")
endif(${VARIABLE})
endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
endmacro(CHECK_LIBRARY_EXISTS)
endif()
endif()
endmacro()

View File

@ -50,20 +50,20 @@ function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIAB
cmake_expand_imported_targets(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_PROTOTYPE_DEFINITION_LIBS
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
else(CMAKE_REQUIRED_LIBRARIES)
else()
set(CHECK_PROTOTYPE_DEFINITION_LIBS)
endif(CMAKE_REQUIRED_LIBRARIES)
endif()
if (CMAKE_REQUIRED_INCLUDES)
set(CMAKE_SYMBOL_EXISTS_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
else(CMAKE_REQUIRED_INCLUDES)
else()
set(CMAKE_SYMBOL_EXISTS_INCLUDES)
endif(CMAKE_REQUIRED_INCLUDES)
endif()
foreach(_FILE ${_HEADER})
set(CHECK_PROTOTYPE_DEFINITION_HEADER
"${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n")
endforeach(_FILE)
endforeach()
set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION})
set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
@ -89,13 +89,13 @@ function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIAB
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n"
"${OUTPUT}\n\n")
else (${_VARIABLE})
else ()
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False")
set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n"
"${OUTPUT}\n\n${_SOURCE}\n\n")
endif (${_VARIABLE})
endif("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
endif ()
endif()
endfunction(CHECK_PROTOTYPE_DEFINITION)
endfunction()

View File

@ -34,7 +34,7 @@ macro (CHECK_STRUCT_HAS_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
set(_INCLUDE_FILES)
foreach (it ${_HEADER})
set(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
endforeach (it)
endforeach ()
set(_CHECK_STRUCT_MEMBER_SOURCE_CODE "
${_INCLUDE_FILES}
@ -47,5 +47,5 @@ int main()
")
CHECK_C_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT})
endmacro (CHECK_STRUCT_HAS_MEMBER)
endmacro ()

View File

@ -40,7 +40,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
macro(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
_CHECK_SYMBOL_EXISTS("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
endmacro(CHECK_SYMBOL_EXISTS)
endmacro()
macro(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
if("${VARIABLE}" MATCHES "^${VARIABLE}$")
@ -51,19 +51,19 @@ macro(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_SYMBOL_EXISTS_LIBS
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
else(CMAKE_REQUIRED_LIBRARIES)
else()
set(CHECK_SYMBOL_EXISTS_LIBS)
endif(CMAKE_REQUIRED_LIBRARIES)
endif()
if(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_SYMBOL_EXISTS_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
else(CMAKE_REQUIRED_INCLUDES)
else()
set(CMAKE_SYMBOL_EXISTS_INCLUDES)
endif(CMAKE_REQUIRED_INCLUDES)
endif()
foreach(FILE ${FILES})
set(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
endforeach(FILE)
endforeach()
set(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\nint main(int argc, char** argv)\n{\n (void)argv;\n#ifndef ${SYMBOL}\n return ((int*)(&${SYMBOL}))[argc];\n#else\n (void)argc;\n return 0;\n#endif\n}\n")
@ -88,7 +88,7 @@ macro(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
"exist passed with the following output:\n"
"${OUTPUT}\nFile ${SOURCEFILE}:\n"
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
else(${VARIABLE})
else()
message(STATUS "Looking for ${SYMBOL} - not found.")
set(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
@ -96,6 +96,6 @@ macro(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
"exist failed with the following output:\n"
"${OUTPUT}\nFile ${SOURCEFILE}:\n"
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
endif(${VARIABLE})
endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
endmacro(_CHECK_SYMBOL_EXISTS)
endif()
endif()
endmacro()

View File

@ -142,7 +142,7 @@ function(__check_type_size_impl type var map builtin)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining size of ${type} passed with the following output:\n${output}\n\n")
set(${var} "${${var}}" CACHE INTERNAL "CHECK_TYPE_SIZE: sizeof(${type})")
else(HAVE_${var})
else()
# The check failed to compile.
message(STATUS "Check size of ${type} - failed")
file(READ ${src} content)
@ -150,7 +150,7 @@ function(__check_type_size_impl type var map builtin)
"Determining size of ${type} failed with the following output:\n${output}\n${src}:\n${content}\n\n")
set(${var} "" CACHE INTERNAL "CHECK_TYPE_SIZE: ${type} unknown")
file(REMOVE ${map})
endif(HAVE_${var})
endif()
endfunction()
#-----------------------------------------------------------------------------

View File

@ -39,9 +39,9 @@ macro(CHECK_VARIABLE_EXISTS VAR VARIABLE)
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
set(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
else(CMAKE_REQUIRED_LIBRARIES)
else()
set(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES)
endif(CMAKE_REQUIRED_LIBRARIES)
endif()
try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckVariableExists.c
@ -55,12 +55,12 @@ macro(CHECK_VARIABLE_EXISTS VAR VARIABLE)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the variable ${VAR} exists passed with the following output:\n"
"${OUTPUT}\n\n")
else(${VARIABLE})
else()
set(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}")
message(STATUS "Looking for ${VAR} - not found")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the variable ${VAR} exists failed with the following output:\n"
"${OUTPUT}\n\n")
endif(${VARIABLE})
endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
endmacro(CHECK_VARIABLE_EXISTS)
endif()
endif()
endmacro()

View File

@ -50,5 +50,5 @@ macro(__compiler_gnu lang)
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
if(NOT APPLE)
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
endif(NOT APPLE)
endif()
endmacro()

View File

@ -8,6 +8,6 @@ set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
if(UNIX)
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S)
else(UNIX)
else()
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm)
endif(UNIX)
endif()

View File

@ -21,4 +21,4 @@ set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
set(CMAKE_${type}_LINK_STATIC_ASM_FLAGS "-Bstatic")
set(CMAKE_${type}_LINK_DYNAMIC_ASM_FLAGS "-Bdynamic")
endforeach(type)
endforeach()

View File

@ -21,7 +21,7 @@ set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Bstatic")
set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Bdynamic")
endforeach(type)
endforeach()
set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")

View File

@ -21,7 +21,7 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
set(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Bstatic")
set(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Bdynamic")
endforeach(type)
endforeach()
set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")

View File

@ -6,7 +6,7 @@
# include(Dart)
# if(BUILD_TESTING)
# # ... testing related CMake code ...
# endif(BUILD_TESTING)
# endif()
# The BUILD_TESTING option is created by the Dart module to determine
# whether testing support should be enabled. The default is ON.
@ -76,7 +76,7 @@ if(BUILD_TESTING)
set(HAVE_DART)
if(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in")
set(HAVE_DART 1)
endif(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in")
endif()
#
# Section #2:
@ -86,7 +86,7 @@ if(BUILD_TESTING)
# find a tcl shell command
if(HAVE_DART)
find_package(Tclsh)
endif(HAVE_DART)
endif()
if (HAVE_DART)
@ -110,13 +110,13 @@ if(BUILD_TESTING)
set(DART_EXPERIMENTAL_NAME Experimental)
if(DART_EXPERIMENTAL_USE_PROJECT_NAME)
set(DART_EXPERIMENTAL_NAME "${DART_EXPERIMENTAL_NAME}${PROJECT_NAME}")
endif(DART_EXPERIMENTAL_USE_PROJECT_NAME)
endif (HAVE_DART)
endif()
endif ()
set(RUN_FROM_CTEST_OR_DART 1)
include(CTestTargets)
set(RUN_FROM_CTEST_OR_DART)
endif(BUILD_TESTING)
endif()
#
# End of Dart.cmake

View File

@ -49,4 +49,4 @@ if (BUILD_DOCUMENTATION)
# We will probably need bash to create the custom target
#
endif (BUILD_DOCUMENTATION)
endif ()

View File

@ -226,7 +226,7 @@ function(_ep_parse_arguments f name ns args)
set(key "${arg}")
endif()
endforeach()
endfunction(_ep_parse_arguments)
endfunction()
define_property(DIRECTORY PROPERTY "EP_BASE" INHERITED
@ -329,7 +329,7 @@ endif()
"
)
endfunction(_ep_write_gitclone_script)
endfunction()
function(_ep_write_downloadfile_script script_filename remote local timeout md5)
@ -377,7 +377,7 @@ message(STATUS \"downloading... done\")
"
)
endfunction(_ep_write_downloadfile_script)
endfunction()
function(_ep_write_verifyfile_script script_filename local md5)
@ -422,7 +422,7 @@ endif()
"
)
endfunction(_ep_write_verifyfile_script)
endfunction()
function(_ep_write_extractfile_script script_filename name filename directory)
@ -502,7 +502,7 @@ message(STATUS \"extracting... done\")
"
)
endfunction(_ep_write_extractfile_script)
endfunction()
function(_ep_set_directories name)
@ -523,7 +523,7 @@ function(_ep_set_directories name)
set(binary_default "${prefix}/src/${name}-build")
set(stamp_default "${prefix}/src/${name}-stamp")
set(install_default "${prefix}")
else() # assert(base)
else()
set(tmp_default "${base}/tmp/${name}")
set(download_default "${base}/Download/${name}")
set(source_default "${base}/Source/${name}")
@ -573,7 +573,7 @@ function(_ep_set_directories name)
message(FATAL_ERROR "dir '${dir}' does not exist after file(MAKE_DIRECTORY)")
endif()
endforeach()
endfunction(_ep_set_directories)
endfunction()
# IMPORTANT: this MUST be a macro and not a function because of the
@ -633,7 +633,7 @@ function(_ep_write_initial_cache target_name script_filename args)
file(WRITE "${script_filename}.in" "\@script_initial_cache\@\n")
endif()
configure_file("${script_filename}.in" "${script_filename}")
endfunction(_ep_write_initial_cache)
endfunction()
function(ExternalProject_Get_Property name)
@ -645,7 +645,7 @@ function(ExternalProject_Get_Property name)
endif()
set(${var} "${${var}}" PARENT_SCOPE)
endforeach()
endfunction(ExternalProject_Get_Property)
endfunction()
function(_ep_get_configure_command_id name cfg_cmd_id_var)
@ -671,7 +671,7 @@ function(_ep_get_configure_command_id name cfg_cmd_id_var)
endif()
endif()
endif()
endfunction(_ep_get_configure_command_id)
endfunction()
function(_ep_get_build_command name step cmd_var)
@ -710,7 +710,7 @@ function(_ep_get_build_command name step cmd_var)
set(args "")
endif()
endif()
else() # if(cfg_cmd_id STREQUAL "configure")
else()
# Non-CMake project. Guess "make" and "make install" and "make test".
if("${CMAKE_GENERATOR}" MATCHES "Makefiles")
# Try to get the parallel arguments
@ -736,7 +736,7 @@ function(_ep_get_build_command name step cmd_var)
endif()
set(${cmd_var} "${cmd}" PARENT_SCOPE)
endfunction(_ep_get_build_command)
endfunction()
function(_ep_write_log_script name step cmd_var)
ExternalProject_Get_Property(${name} stamp_dir)
@ -784,7 +784,7 @@ if(result)
set(msg \"Command failed (\${result}):\\n\")
foreach(arg IN LISTS command)
set(msg \"\${msg} '\${arg}'\")
endforeach(arg)
endforeach()
message(FATAL_ERROR \"\${msg}\")
endif()
")
@ -823,7 +823,7 @@ if(result)
set(msg \"Command failed: \${result}\\n\")
foreach(arg IN LISTS command)
set(msg \"\${msg} '\${arg}'\")
endforeach(arg)
endforeach()
set(msg \"\${msg}\\nSee also\\n ${logbase}-*.log\\n\")
message(FATAL_ERROR \"\${msg}\")
else()
@ -833,7 +833,7 @@ endif()
")
set(command ${CMAKE_COMMAND} ${make} ${config} -P ${script})
set(${cmd_var} "${command}" PARENT_SCOPE)
endfunction(_ep_write_log_script)
endfunction()
# This module used to use "/${CMAKE_CFG_INTDIR}" directly and produced
# makefiles with "/./" in paths for custom command dependencies. Which
@ -849,7 +849,7 @@ function(_ep_get_configuration_subdir_suffix suffix_var)
set(suffix "/${CMAKE_CFG_INTDIR}")
endif()
set(${suffix_var} "${suffix}" PARENT_SCOPE)
endfunction(_ep_get_configuration_subdir_suffix)
endfunction()
function(_ep_get_step_stampfile name step stampfile_var)
@ -876,7 +876,7 @@ function(ExternalProject_Add_StepTargets name)
add_dependencies(${name}-${step} ${arg})
endforeach()
endforeach()
endfunction(ExternalProject_Add_StepTargets)
endfunction()
function(ExternalProject_Add_Step name step)
@ -974,7 +974,7 @@ function(ExternalProject_Add_Step name step)
break()
endif()
endforeach()
endfunction(ExternalProject_Add_Step)
endfunction()
function(_ep_add_mkdir_command name)
@ -992,7 +992,7 @@ function(_ep_add_mkdir_command name)
COMMAND ${CMAKE_COMMAND} -E make_directory ${stamp_dir}${cfgdir}
COMMAND ${CMAKE_COMMAND} -E make_directory ${download_dir}
)
endfunction(_ep_add_mkdir_command)
endfunction()
function(_ep_get_git_version git_EXECUTABLE git_version_var)
@ -1215,7 +1215,7 @@ function(_ep_add_download_command name)
DEPENDEES mkdir
${log}
)
endfunction(_ep_add_download_command)
endfunction()
function(_ep_add_update_command name)
@ -1297,7 +1297,7 @@ function(_ep_add_update_command name)
DEPENDEES download
${log}
)
endfunction(_ep_add_update_command)
endfunction()
function(_ep_add_patch_command name)
@ -1317,7 +1317,7 @@ function(_ep_add_patch_command name)
WORKING_DIRECTORY ${work_dir}
DEPENDEES download
)
endfunction(_ep_add_patch_command)
endfunction()
# TODO: Make sure external projects use the proper compiler
@ -1392,7 +1392,7 @@ function(_ep_add_configure_command name)
DEPENDS ${file_deps}
${log}
)
endfunction(_ep_add_configure_command)
endfunction()
function(_ep_add_build_command name)
@ -1418,7 +1418,7 @@ function(_ep_add_build_command name)
DEPENDEES configure
${log}
)
endfunction(_ep_add_build_command)
endfunction()
function(_ep_add_install_command name)
@ -1444,7 +1444,7 @@ function(_ep_add_install_command name)
DEPENDEES build
${log}
)
endfunction(_ep_add_install_command)
endfunction()
function(_ep_add_test_command name)
@ -1484,7 +1484,7 @@ function(_ep_add_test_command name)
${log}
)
endif()
endfunction(_ep_add_test_command)
endfunction()
function(ExternalProject_Add name)
@ -1550,4 +1550,4 @@ function(ExternalProject_Add name)
# on install.
#
_ep_add_test_command(${name})
endfunction(ExternalProject_Add)
endfunction()

View File

@ -188,7 +188,7 @@ function(ADD_FEATURE_INFO _name _enabled _desc)
endif ()
set_property(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" )
endfunction(ADD_FEATURE_INFO)
endfunction()
@ -253,7 +253,7 @@ function(SET_PACKAGE_PROPERTIES _name _props)
set_property(GLOBAL PROPERTY _CMAKE_${_name}_TYPE "${_SPP_TYPE}" )
endif()
endfunction(SET_PACKAGE_PROPERTIES)
endfunction()
@ -306,28 +306,28 @@ function(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet)
get_property(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_REQUIRED_VERSION)
if(_info)
set(_currentFeatureText "${_currentFeatureText} (required version ${_info})")
endif(_info)
endif()
get_property(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_DESCRIPTION)
if(_info)
set(_currentFeatureText "${_currentFeatureText} , ${_info}")
endif(_info)
endif()
get_property(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_URL)
if(_info)
set(_currentFeatureText "${_currentFeatureText} , <${_info}>")
endif(_info)
endif()
get_property(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_PURPOSE)
foreach(_purpose ${_info})
set(_currentFeatureText "${_currentFeatureText}\n ${_purpose}")
endforeach()
endif(includeThisOne)
endif()
endif("${_type}" STREQUAL ANY OR "${_type}" STREQUAL "${_currentType}")
endif()
endforeach(_currentFeature)
endforeach()
set(${_var} "${_currentFeatureText}" PARENT_SCOPE)
endfunction(_FS_GET_FEATURE_SUMMARY)
endfunction()
@ -412,11 +412,11 @@ function(FEATURE_SUMMARY)
if(_FS_FILENAME)
if(_FS_APPEND)
file(APPEND "${_FS_FILENAME}" "${_fullText}")
else(_FS_APPEND)
else()
file(WRITE "${_FS_FILENAME}" "${_fullText}")
endif()
else(_FS_FILENAME)
else()
if(NOT _FS_VAR)
message(STATUS "${_fullText}")
endif()
@ -430,7 +430,7 @@ function(FEATURE_SUMMARY)
message(FATAL_ERROR "feature_summary() Error: REQUIRED package(s) are missing, aborting CMake run.")
endif()
endfunction(FEATURE_SUMMARY)
endfunction()
# The stuff below is only kept for compatibility
@ -445,22 +445,22 @@ function(SET_PACKAGE_INFO _name _desc)
if(_purpose MATCHES ".+")
set_property(GLOBAL APPEND PROPERTY _CMAKE_${_name}_PURPOSE "${_purpose}" )
endif()
endfunction(SET_PACKAGE_INFO)
endfunction()
function(SET_FEATURE_INFO)
SET_PACKAGE_INFO(${ARGN})
endfunction(SET_FEATURE_INFO)
endfunction()
function(PRINT_ENABLED_FEATURES)
FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
endfunction(PRINT_ENABLED_FEATURES)
endfunction()
function(PRINT_DISABLED_FEATURES)
FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
endfunction(PRINT_DISABLED_FEATURES)
endfunction()

View File

@ -33,7 +33,7 @@ if (UNIX)
/usr/local/avifile/lib
)
endif (UNIX)
endif ()
# handle the QUIETLY and REQUIRED arguments and set AVIFILE_FOUND to TRUE if
# all listed variables are TRUE

View File

@ -66,10 +66,10 @@ if(ARMADILLO_INCLUDE_DIR)
# WARNING: The number of spaces before the version name is not one.
string(REGEX REPLACE ".*#define ARMA_VERSION_NAME\ +\"([0-9a-zA-Z\ _-]+)\".*" "\\1" ARMADILLO_VERSION_NAME "${_armadillo_HEADER_CONTENTS}")
endif(EXISTS "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/arma_version.hpp")
endif()
set(ARMADILLO_VERSION_STRING "${ARMADILLO_VERSION_MAJOR}.${ARMADILLO_VERSION_MINOR}.${ARMADILLO_VERSION_PATCH}")
endif (ARMADILLO_INCLUDE_DIR)
endif ()
#======================
@ -84,7 +84,7 @@ find_package_handle_standard_args(Armadillo
if (ARMADILLO_FOUND)
set(ARMADILLO_INCLUDE_DIRS ${ARMADILLO_INCLUDE_DIR})
set(ARMADILLO_LIBRARIES ${ARMADILLO_LIBRARY})
endif (ARMADILLO_FOUND)
endif ()
# Hide internal variables

View File

@ -98,14 +98,14 @@ if(BISON_EXECUTABLE)
set(BISON_${Name}_VERBOSE_FILE ${filename})
list(APPEND BISON_TARGET_extraoutputs
"${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output")
endmacro(BISON_TARGET_option_verbose)
endmacro()
# internal macro
macro(BISON_TARGET_option_extraopts Options)
set(BISON_TARGET_extraopts "${Options}")
separate_arguments(BISON_TARGET_extraopts)
list(APPEND BISON_TARGET_cmdopt ${BISON_TARGET_extraopts})
endmacro(BISON_TARGET_option_extraopts)
endmacro()
#============================================================
# BISON_TARGET (public macro)
@ -161,12 +161,12 @@ if(BISON_EXECUTABLE)
set(BISON_${Name}_COMPILE_FLAGS ${BISON_TARGET_cmdopt})
set(BISON_${Name}_OUTPUT_SOURCE "${BisonOutput}")
endif(NOT ${ARGC} EQUAL 3 AND NOT ${ARGC} EQUAL 5 AND NOT ${ARGC} EQUAL 7)
endmacro(BISON_TARGET)
endif()
endmacro()
#
#============================================================
endif(BISON_EXECUTABLE)
endif()
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON REQUIRED_VARS BISON_EXECUTABLE

View File

@ -54,11 +54,11 @@ elseif( (_LANGUAGES_ MATCHES C) OR (_LANGUAGES_ MATCHES CXX) )
else()
if(BLAS_FIND_REQUIRED)
message(FATAL_ERROR "FindBLAS requires Fortran, C, or C++ to be enabled.")
else(BLAS_FIND_REQUIRED)
else()
message(STATUS "Looking for BLAS... - NOT found (Unsupported languages)")
return()
endif(BLAS_FIND_REQUIRED)
endif( )
endif()
endif()
macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
# This macro checks for the existence of the combination of fortran libraries
@ -94,18 +94,18 @@ foreach(_library ${_list})
if (BLA_STATIC)
if (WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
endif ( WIN32 )
endif ()
if (APPLE)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
else (APPLE)
else ()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
endif (APPLE)
else (BLA_STATIC)
endif ()
else ()
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
# for ubuntu's libblas3gf and liblapack3gf packages
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf)
endif ()
endif (BLA_STATIC)
endif ()
find_library(${_prefix}_${_library}_LIBRARY
NAMES ${_library}
PATHS ${_libdir}
@ -113,8 +113,8 @@ foreach(_library ${_list})
mark_as_advanced(${_prefix}_${_library}_LIBRARY)
set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
endif(_libraries_work)
endforeach(_library ${_list})
endif()
endforeach()
if(_libraries_work)
# Test this combination of libraries.
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_thread})
@ -127,23 +127,23 @@ if(_libraries_work)
set(CMAKE_REQUIRED_LIBRARIES)
mark_as_advanced(${_prefix}${_combined_name}_WORKS)
set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
endif(_libraries_work)
endif()
if(NOT _libraries_work)
set(${LIBRARIES} FALSE)
endif(NOT _libraries_work)
endif()
#message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}")
endmacro(Check_Fortran_Libraries)
endmacro()
set(BLAS_LINKER_FLAGS)
set(BLAS_LIBRARIES)
set(BLAS95_LIBRARIES)
if ($ENV{BLA_VENDOR} MATCHES ".+")
set(BLA_VENDOR $ENV{BLA_VENDOR})
else ($ENV{BLA_VENDOR} MATCHES ".+")
else ()
if(NOT BLA_VENDOR)
set(BLA_VENDOR "All")
endif(NOT BLA_VENDOR)
endif ($ENV{BLA_VENDOR} MATCHES ".+")
endif()
endif ()
if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
@ -156,8 +156,8 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
"goto2"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
@ -170,8 +170,8 @@ if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
"f77blas;atlas"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
@ -184,8 +184,8 @@ if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
"sgemm;dgemm;blas"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
# BLAS in Alpha CXML library?
if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
@ -198,8 +198,8 @@ if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
"cxml"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
# BLAS in Alpha DXML library? (now called CXML, see above)
if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All")
@ -212,8 +212,8 @@ if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All")
"dxml"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
# BLAS in Sun Performance library?
if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All")
@ -228,9 +228,9 @@ if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All")
)
if(BLAS_LIBRARIES)
set(BLAS_LINKER_FLAGS "-xlic_lib=sunperf")
endif(BLAS_LIBRARIES)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All")
endif()
endif()
endif ()
# BLAS in SCSL library? (SGI/Cray Scientific Library)
if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All")
@ -243,8 +243,8 @@ if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All")
"scsl"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
# BLAS in SGIMATH library?
if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All")
@ -257,8 +257,8 @@ if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All")
"complib.sgimath"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
# BLAS in IBM ESSL library? (requires generic BLAS lib, too)
if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
@ -271,8 +271,8 @@ if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
"essl;blas"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
#BLAS in acml library?
if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
@ -321,7 +321,7 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "NAG" )
set( _ACML_COMPILER32 "nag32" )
set( _ACML_COMPILER64 "nag64" )
else() #if( CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" )
else()
set( _ACML_COMPILER32 "gfortran32" )
set( _ACML_COMPILER64 "gfortran64" )
endif()
@ -330,7 +330,7 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
set(_ACML_MP_LIB_DIRS
"${_ACML_ROOT}/${_ACML_COMPILER32}_mp${_ACML_PATH_SUFFIX}/lib"
"${_ACML_ROOT}/${_ACML_COMPILER64}_mp${_ACML_PATH_SUFFIX}/lib" )
else() #if( _BLAS_VENDOR STREQUAL "ACML" )
else()
set(_ACML_LIB_DIRS
"${_ACML_ROOT}/${_ACML_COMPILER32}${_ACML_PATH_SUFFIX}/lib"
"${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib" )
@ -364,7 +364,7 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
break()
endif()
endforeach()
else() #if( _BLAS_VENDOR STREQUAL "ACML" )
else()
foreach( BLAS_ACML_LIB_DIRS ${_ACML_LIB_DIRS} )
check_fortran_libraries (
BLAS_LIBRARIES
@ -388,7 +388,7 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
"acml;acml_mv"
""
)
endif(NOT BLAS_LIBRARIES)
endif()
if(NOT BLAS_LIBRARIES)
check_fortran_libraries(
BLAS_LIBRARIES
@ -398,7 +398,7 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
"acml_mp;acml_mv"
""
)
endif(NOT BLAS_LIBRARIES)
endif()
if(NOT BLAS_LIBRARIES)
check_fortran_libraries(
BLAS_LIBRARIES
@ -408,7 +408,7 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
"acml;acml_mv;CALBLAS"
""
)
endif(NOT BLAS_LIBRARIES)
endif()
endif () # ACML
# Apple BLAS library?
@ -422,8 +422,8 @@ if(NOT BLAS_LIBRARIES)
"Accelerate"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
if ( NOT BLAS_LIBRARIES )
@ -435,8 +435,8 @@ if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
"vecLib"
""
)
endif ( NOT BLAS_LIBRARIES )
endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
endif ()
endif ()
# Generic BLAS library?
if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
@ -448,8 +448,8 @@ if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
"blas"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
#BLAS in intel mkl 10 library? (em64t 64bit)
if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
@ -459,9 +459,9 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
find_package(Threads)
else(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
else()
find_package(Threads REQUIRED)
endif(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
endif()
set(BLAS_SEARCH_LIBS "")
@ -471,7 +471,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
if (WIN32)
list(APPEND BLAS_SEARCH_LIBS
"mkl_blas95 mkl_intel_c mkl_intel_thread mkl_core libguide40")
else (WIN32)
else ()
if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS
"mkl_blas95 mkl_intel mkl_intel_thread mkl_core guide")
@ -490,18 +490,18 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
"mkl_blas95_lp64 mkl_intel_lp64 mkl_intel_thread mkl_core iomp5")
endif ()
endif ()
endif (WIN32)
endif ()
if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS
"mkl_blas95_lp64 mkl_intel_lp64 mkl_sequential mkl_core")
endif ()
else (BLA_F95)
else ()
set(BLAS_mkl_SEARCH_SYMBOL sgemm)
set(_LIBRARIES BLAS_LIBRARIES)
if (WIN32)
list(APPEND BLAS_SEARCH_LIBS
"mkl_c_dll mkl_intel_thread_dll mkl_core_dll libguide40")
else (WIN32)
else ()
if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS
"mkl_intel mkl_intel_thread mkl_core guide")
@ -531,12 +531,12 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS
"mkl_em64t")
endif ()
endif (WIN32)
endif ()
if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All")
list(APPEND BLAS_SEARCH_LIBS
"mkl_intel_lp64 mkl_sequential mkl_core")
endif ()
endif (BLA_F95)
endif ()
foreach (IT ${BLAS_SEARCH_LIBS})
string(REPLACE " " ";" SEARCH_LIBS ${IT})
@ -553,54 +553,54 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
endif ()
endforeach ()
endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
endif (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
endif ()
endif ()
if(BLA_F95)
if(BLAS95_LIBRARIES)
set(BLAS95_FOUND TRUE)
else(BLAS95_LIBRARIES)
else()
set(BLAS95_FOUND FALSE)
endif(BLAS95_LIBRARIES)
endif()
if(NOT BLAS_FIND_QUIETLY)
if(BLAS95_FOUND)
message(STATUS "A library with BLAS95 API found.")
else(BLAS95_FOUND)
else()
if(BLAS_FIND_REQUIRED)
message(FATAL_ERROR
"A required library with BLAS95 API not found. Please specify library location.")
else(BLAS_FIND_REQUIRED)
else()
message(STATUS
"A library with BLAS95 API not found. Please specify library location.")
endif(BLAS_FIND_REQUIRED)
endif(BLAS95_FOUND)
endif(NOT BLAS_FIND_QUIETLY)
endif()
endif()
endif()
set(BLAS_FOUND TRUE)
set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}")
else(BLA_F95)
else()
if(BLAS_LIBRARIES)
set(BLAS_FOUND TRUE)
else(BLAS_LIBRARIES)
else()
set(BLAS_FOUND FALSE)
endif(BLAS_LIBRARIES)
endif()
if(NOT BLAS_FIND_QUIETLY)
if(BLAS_FOUND)
message(STATUS "A library with BLAS API found.")
else(BLAS_FOUND)
else()
if(BLAS_FIND_REQUIRED)
message(FATAL_ERROR
"A required library with BLAS API not found. Please specify library location."
)
else(BLAS_FIND_REQUIRED)
else()
message(STATUS
"A library with BLAS API not found. Please specify library location."
)
endif(BLAS_FIND_REQUIRED)
endif(BLAS_FOUND)
endif(NOT BLAS_FIND_QUIETLY)
endif(BLA_F95)
endif()
endif()
endif()
endif()
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})

View File

@ -34,12 +34,12 @@ if (NOT BZIP2_LIBRARIES)
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
SELECT_LIBRARY_CONFIGURATIONS(BZIP2)
endif (NOT BZIP2_LIBRARIES)
endif ()
if (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h")
file(STRINGS "${BZIP2_INCLUDE_DIR}/bzlib.h" BZLIB_H REGEX "bzip2/libbzip2 version [0-9]+\\.[^ ]+ of [0-9]+ ")
string(REGEX REPLACE ".* bzip2/libbzip2 version ([0-9]+\\.[^ ]+) of [0-9]+ .*" "\\1" BZIP2_VERSION_STRING "${BZLIB_H}")
endif (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h")
endif ()
# handle the QUIETLY and REQUIRED arguments and set BZip2_FOUND to TRUE if
# all listed variables are TRUE
@ -51,6 +51,6 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2
if (BZIP2_FOUND)
include(CheckLibraryExists)
CHECK_LIBRARY_EXISTS("${BZIP2_LIBRARIES}" BZ2_bzCompressInit "" BZIP2_NEED_PREFIX)
endif (BZIP2_FOUND)
endif ()
mark_as_advanced(BZIP2_INCLUDE_DIR)

View File

@ -361,16 +361,16 @@ macro(_Boost_ADJUST_LIB_VARS basename)
set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory")
set(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found")
endif(Boost_${basename}_LIBRARY)
endif()
endif(Boost_INCLUDE_DIR )
endif()
# Make variables changeble to the advanced user
mark_as_advanced(
Boost_${basename}_LIBRARY
Boost_${basename}_LIBRARY_RELEASE
Boost_${basename}_LIBRARY_DEBUG
)
endmacro(_Boost_ADJUST_LIB_VARS)
endmacro()
#-------------------------------------------------------------------------------
@ -479,21 +479,21 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret)
# In Boost 1.36.0 and newer, the mangled compiler name used
# on Mac OS X/Darwin is "xgcc".
set(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}")
else(${Boost_MINOR_VERSION} GREATER 35)
else()
# In Boost <= 1.35.0, there is no mangled compiler name for
# the Mac OS X/Darwin version of GCC.
set(_boost_COMPILER "")
endif(${Boost_MINOR_VERSION} GREATER 35)
else(Boost_MINOR_VERSION)
endif()
else()
# We don't know the Boost version, so assume it's
# pre-1.36.0.
set(_boost_COMPILER "")
endif(Boost_MINOR_VERSION)
endif()
else()
set(_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
endif()
endif()
endif (CMAKE_COMPILER_IS_GNUCXX)
endif ()
else()
# TODO at least Boost_DEBUG here?
set(_boost_COMPILER "")
@ -525,7 +525,7 @@ if(Boost_FIND_VERSION_EXACT)
set(_boost_TEST_VERSIONS
"${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}"
"${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
else(Boost_FIND_VERSION_EXACT)
else()
# The user has not requested an exact version. Among known
# versions, find those that are acceptable to the user request.
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
@ -549,12 +549,12 @@ else(Boost_FIND_VERSION_EXACT)
# the patch level dropped.
list(APPEND _boost_TEST_VERSIONS "${version}")
endif()
endforeach(version)
else(Boost_FIND_VERSION)
endforeach()
else()
# Any version is acceptable.
set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}")
endif(Boost_FIND_VERSION)
endif(Boost_FIND_VERSION_EXACT)
endif()
endif()
# The reason that we failed to find Boost. This will be set to a
# user-friendly message when we fail to find some necessary piece of
@ -597,7 +597,7 @@ set(Boost_ERROR_REASON)
# for linking.
set(Boost_LIB_DIAGNOSTIC_DEFINITIONS
"-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define")
endif(WIN32)
endif()
set(_boost_INCLUDE_SEARCH_DIRS_SYSTEM
C:/boost/include
@ -671,7 +671,7 @@ set(Boost_ERROR_REASON)
file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR)
set(_boost_INCLUDE_SEARCH_DIRS
${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS})
endif( BOOST_INCLUDEDIR )
endif()
# ------------------------------------------------------------------------
# Search for Boost include DIR
@ -699,7 +699,7 @@ set(Boost_ERROR_REASON)
list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
endforeach(_boost_VER)
endforeach()
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
@ -717,7 +717,7 @@ set(Boost_ERROR_REASON)
PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
${_boost_FIND_OPTIONS}
)
endif( NOT Boost_INCLUDE_DIR )
endif()
# ------------------------------------------------------------------------
# Extract version information from version.hpp
@ -748,16 +748,16 @@ set(Boost_ERROR_REASON)
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}")
endif(NOT "${Boost_VERSION}" STREQUAL "0")
endif()
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"version.hpp reveals boost "
"${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
endif()
else(Boost_INCLUDE_DIR)
else()
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.")
endif(Boost_INCLUDE_DIR)
endif()
# ------------------------------------------------------------------------
# Suffix initialization and compiler suffix detection.
@ -1007,7 +1007,7 @@ set(Boost_ERROR_REASON)
_Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT})
endforeach(COMPONENT)
endforeach()
# Restore the original find library ordering
if( Boost_USE_STATIC_LIBS )
@ -1044,9 +1044,9 @@ set(Boost_ERROR_REASON)
if( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" )
set( Boost_FOUND FALSE )
set(_Boost_VERSION_AGE "old")
endif( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" )
endif( Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" )
endif( Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" )
endif()
endif()
endif()
if (NOT Boost_FOUND)
_Boost_MARK_COMPONENTS_FOUND(OFF)
@ -1061,7 +1061,7 @@ set(Boost_ERROR_REASON)
# If the user didn't specify a patchlevel, it's 0.
if (NOT Boost_FIND_VERSION_PATCH)
set(Boost_FIND_VERSION_PATCH 0)
endif (NOT Boost_FIND_VERSION_PATCH)
endif ()
# We'll set Boost_FOUND true again if we have an exact version match.
set(Boost_FOUND FALSE)
@ -1071,10 +1071,10 @@ set(Boost_ERROR_REASON)
if(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" )
set( Boost_FOUND TRUE )
_Boost_MARK_COMPONENTS_FOUND(ON)
endif(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" )
endif( Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" )
endif( Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" )
endif (Boost_FOUND AND Boost_FIND_VERSION_EXACT)
endif()
endif()
endif()
endif ()
if(NOT Boost_FOUND)
# State that we found a version of Boost that is too new or too old.
@ -1083,12 +1083,12 @@ set(Boost_ERROR_REASON)
if (Boost_FIND_VERSION_PATCH)
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}")
endif (Boost_FIND_VERSION_PATCH)
endif ()
if (NOT Boost_FIND_VERSION_EXACT)
set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)")
endif (NOT Boost_FIND_VERSION_EXACT)
endif ()
set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.")
endif (NOT Boost_FOUND)
endif ()
# Always check for missing components
set(_boost_CHECKED_COMPONENT FALSE)
@ -1101,7 +1101,7 @@ set(Boost_ERROR_REASON)
list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
set( Boost_FOUND FALSE)
endif()
endforeach(COMPONENT)
endforeach()
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}")
@ -1115,18 +1115,18 @@ set(Boost_ERROR_REASON)
foreach(COMPONENT ${_Boost_MISSING_COMPONENTS})
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON} boost_${COMPONENT}\n")
endforeach(COMPONENT)
endforeach()
list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED)
list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS)
if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
else (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
else ()
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
endif (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
endif (_Boost_MISSING_COMPONENTS)
endif ()
endif ()
if( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
# Compatibility Code for backwards compatibility with CMake
@ -1160,11 +1160,11 @@ set(Boost_ERROR_REASON)
set(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory")
endif()
endif( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
endif()
else(Boost_INCLUDE_DIR)
else()
set( Boost_FOUND FALSE)
endif(Boost_INCLUDE_DIR)
endif()
# ------------------------------------------------------------------------
# Notification to end user about what was found
@ -1176,16 +1176,16 @@ set(Boost_ERROR_REASON)
if(Boost_FIND_COMPONENTS)
message(STATUS "Found the following Boost libraries:")
endif()
endif(NOT Boost_FIND_QUIETLY)
endif()
foreach( COMPONENT ${Boost_FIND_COMPONENTS} )
string( TOUPPER ${COMPONENT} UPPERCOMPONENT )
if( Boost_${UPPERCOMPONENT}_FOUND )
if(NOT Boost_FIND_QUIETLY)
message (STATUS " ${COMPONENT}")
endif(NOT Boost_FIND_QUIETLY)
endif()
set(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY})
endif( Boost_${UPPERCOMPONENT}_FOUND )
endforeach(COMPONENT)
endif()
endforeach()
else()
if(Boost_FIND_REQUIRED)
message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}")
@ -1201,7 +1201,7 @@ set(Boost_ERROR_REASON)
message(STATUS "Could NOT find Boost")
endif()
endif()
endif(Boost_FIND_REQUIRED)
endif()
endif()
# show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view

View File

@ -25,7 +25,7 @@
if(NOT CABLE)
find_path(CABLE_BUILD_DIR cableVersion.h)
endif(NOT CABLE)
endif()
if(CABLE_BUILD_DIR)
load_cache(${CABLE_BUILD_DIR}
@ -43,25 +43,25 @@ if(CABLE_BUILD_DIR)
find_library(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS
${CABLE_LIBRARY_PATH}
${CABLE_LIBRARY_PATH}/*)
else(CABLE_LIBRARY_PATH)
else()
find_library(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS
${CABLE_BINARY_DIR}/CableTclFacility
${CABLE_BINARY_DIR}/CableTclFacility/*)
endif(CABLE_LIBRARY_PATH)
endif()
if(CABLE_EXECUTABLE_PATH)
find_program(CABLE NAMES cable PATHS
${CABLE_EXECUTABLE_PATH}
${CABLE_EXECUTABLE_PATH}/*)
else(CABLE_EXECUTABLE_PATH)
else()
find_program(CABLE NAMES cable PATHS
${CABLE_BINARY_DIR}/Executables
${CABLE_BINARY_DIR}/Executables/*)
endif(CABLE_EXECUTABLE_PATH)
endif()
find_path(CABLE_INCLUDE_DIR CableTclFacility/ctCalls.h
${CABLE_SOURCE_DIR})
else(CABLE_BUILD_DIR)
else()
# Find the cable executable in the path.
find_program(CABLE NAMES cable)
@ -78,4 +78,4 @@ else(CABLE_BUILD_DIR)
# executable.
find_library(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS
${CABLE_ROOT_BIN}/../lib/Cable)
endif(CABLE_BUILD_DIR)
endif()

View File

@ -291,7 +291,7 @@ macro(CUDA_FIND_HELPER_FILE _name _extension)
endif()
# Set this variable as internal, so the user isn't bugged with it.
set(CUDA_${_name} ${CUDA_${_name}} CACHE INTERNAL "Location of ${_full_name}" FORCE)
endmacro(CUDA_FIND_HELPER_FILE)
endmacro()
#####################################################################
## CUDA_INCLUDE_NVCC_DEPENDENCIES
@ -339,12 +339,12 @@ macro(CUDA_INCLUDE_NVCC_DEPENDENCIES dependency_file)
#message("file ${f} not found")
set(CUDA_NVCC_DEPEND_REGENERATE TRUE)
endif()
endforeach(f)
else(CUDA_NVCC_DEPEND)
endforeach()
else()
#message("CUDA_NVCC_DEPEND false")
# No dependencies, so regenerate the file.
set(CUDA_NVCC_DEPEND_REGENERATE TRUE)
endif(CUDA_NVCC_DEPEND)
endif()
#message("CUDA_NVCC_DEPEND_REGENERATE = ${CUDA_NVCC_DEPEND_REGENERATE}")
# No incoming dependencies, so we need to generate them. Make the
@ -354,9 +354,9 @@ macro(CUDA_INCLUDE_NVCC_DEPENDENCIES dependency_file)
set(CUDA_NVCC_DEPEND ${dependency_file})
#message("Generating an empty dependency_file: ${dependency_file}")
file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n")
endif(CUDA_NVCC_DEPEND_REGENERATE)
endif()
endmacro(CUDA_INCLUDE_NVCC_DEPENDENCIES)
endmacro()
###############################################################################
###############################################################################
@ -482,15 +482,15 @@ if(NOT CUDA_TOOLKIT_ROOT_DIR)
string(REGEX REPLACE "[/\\\\]?bin[64]*[/\\\\]?$" "" CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR})
# We need to force this back into the cache.
set(CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Toolkit location." FORCE)
endif(CUDA_TOOLKIT_ROOT_DIR)
endif()
if (NOT EXISTS ${CUDA_TOOLKIT_ROOT_DIR})
if(CUDA_FIND_REQUIRED)
message(FATAL_ERROR "Specify CUDA_TOOLKIT_ROOT_DIR")
elseif(NOT CUDA_FIND_QUIETLY)
message("CUDA_TOOLKIT_ROOT_DIR not found or specified")
endif()
endif (NOT EXISTS ${CUDA_TOOLKIT_ROOT_DIR})
endif (NOT CUDA_TOOLKIT_ROOT_DIR)
endif ()
endif ()
# CUDA_NVCC_EXECUTABLE
find_program(CUDA_NVCC_EXECUTABLE
@ -595,7 +595,7 @@ find_library_local_first(CUDA_CUDA_LIBRARY cuda "\"cuda\" library (older version
# Add cuda library to the link line only if it is found.
if (CUDA_CUDA_LIBRARY)
set(CUDA_LIBRARIES ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
endif(CUDA_CUDA_LIBRARY)
endif()
mark_as_advanced(
CUDA_CUDA_LIBRARY
@ -607,7 +607,7 @@ mark_as_advanced(
macro(FIND_CUDA_HELPER_LIBS _name)
find_library_local_first(CUDA_${_name}_LIBRARY ${_name} "\"${_name}\" library")
mark_as_advanced(CUDA_${_name}_LIBRARY)
endmacro(FIND_CUDA_HELPER_LIBS)
endmacro()
#######################
# Disable emulation for v3.1 onward
@ -691,9 +691,9 @@ set(CUDA_SDK_SEARCH_PATH
# if(CMAKE_SIZEOF_VOID_P EQUAL 8)
# set(cuda_cutil_name cutil64)
# else(CMAKE_SIZEOF_VOID_P EQUAL 8)
# else()
# set(cuda_cutil_name cutil32)
# endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
# endif()
# find_library(CUDA_CUT_LIBRARY
# NAMES cutil ${cuda_cutil_name}
@ -743,8 +743,8 @@ find_package_handle_standard_args(CUDA
macro(CUDA_INCLUDE_DIRECTORIES)
foreach(dir ${ARGN})
list(APPEND CUDA_NVCC_INCLUDE_ARGS_USER -I${dir})
endforeach(dir ${ARGN})
endmacro(CUDA_INCLUDE_DIRECTORIES)
endforeach()
endmacro()
##############################################################################
@ -914,20 +914,20 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
if (CUDA_BUILD_EMULATION)
# Emulation.
set(nvcc_flags ${nvcc_flags} --device-emulation -D_DEVICEEMU -g)
else(CUDA_BUILD_EMULATION)
else()
# Device mode. No flags necessary.
endif(CUDA_BUILD_EMULATION)
endif()
if(CUDA_HOST_COMPILATION_CPP)
set(CUDA_C_OR_CXX CXX)
else(CUDA_HOST_COMPILATION_CPP)
else()
if(CUDA_VERSION VERSION_LESS "3.0")
set(nvcc_flags ${nvcc_flags} --host-compilation C)
else()
message(WARNING "--host-compilation flag is deprecated in CUDA version >= 3.0. Removing --host-compilation C flag" )
endif()
set(CUDA_C_OR_CXX C)
endif(CUDA_HOST_COMPILATION_CPP)
endif()
set(generated_extension ${CMAKE_${CUDA_C_OR_CXX}_OUTPUT_EXTENSION})
@ -1080,11 +1080,11 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
set(generated_file_basename "${cuda_target}_generated_${basename}.ptx")
set(format_flag "-ptx")
file(MAKE_DIRECTORY "${cuda_compile_output_dir}")
else( compile_to_ptx )
else()
set(generated_file_path "${cuda_compile_output_dir}/${CMAKE_CFG_INTDIR}")
set(generated_file_basename "${cuda_target}_generated_${basename}${generated_extension}")
set(format_flag "-c")
endif( compile_to_ptx )
endif()
# Set all of our file names. Make sure that whatever filenames that have
# generated_file_path in them get passed in through as a command line
@ -1118,17 +1118,17 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# Convience string for output ###########################################
if(CUDA_BUILD_EMULATION)
set(cuda_build_type "Emulation")
else(CUDA_BUILD_EMULATION)
else()
set(cuda_build_type "Device")
endif(CUDA_BUILD_EMULATION)
endif()
# Build the NVCC made dependency file ###################################
set(build_cubin OFF)
if ( NOT CUDA_BUILD_EMULATION AND CUDA_BUILD_CUBIN )
if ( NOT compile_to_ptx )
set ( build_cubin ON )
endif( NOT compile_to_ptx )
endif( NOT CUDA_BUILD_EMULATION AND CUDA_BUILD_CUBIN )
endif()
endif()
# Configure the build script
configure_file("${CUDA_run_nvcc}" "${custom_target_script}" @ONLY)
@ -1203,12 +1203,12 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
list(REMOVE_DUPLICATES CUDA_ADDITIONAL_CLEAN_FILES)
set(CUDA_ADDITIONAL_CLEAN_FILES ${CUDA_ADDITIONAL_CLEAN_FILES} CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.")
endif(${file} MATCHES ".*\\.cu$" AND NOT _is_header)
endforeach(file)
endif()
endforeach()
# Set the return parameter
set(${generated_files} ${_cuda_wrap_generated_files})
endmacro(CUDA_WRAP_SRCS)
endmacro()
###############################################################################
@ -1245,7 +1245,7 @@ macro(CUDA_ADD_LIBRARY cuda_target)
LINKER_LANGUAGE ${CUDA_C_OR_CXX}
)
endmacro(CUDA_ADD_LIBRARY cuda_target)
endmacro()
###############################################################################
@ -1279,7 +1279,7 @@ macro(CUDA_ADD_EXECUTABLE cuda_target)
LINKER_LANGUAGE ${CUDA_C_OR_CXX}
)
endmacro(CUDA_ADD_EXECUTABLE cuda_target)
endmacro()
###############################################################################
@ -1297,7 +1297,7 @@ macro(CUDA_COMPILE generated_files)
set( ${generated_files} ${_generated_files})
endmacro(CUDA_COMPILE)
endmacro()
###############################################################################
@ -1315,7 +1315,7 @@ macro(CUDA_COMPILE_PTX generated_files)
set( ${generated_files} ${_generated_files})
endmacro(CUDA_COMPILE_PTX)
endmacro()
###############################################################################
###############################################################################
@ -1364,4 +1364,4 @@ macro(CUDA_BUILD_CLEAN_TARGET)
# This is useful so that the files won't persist in the list after targets
# have been removed.
set(CUDA_ADDITIONAL_CLEAN_FILES "" CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.")
endmacro(CUDA_BUILD_CLEAN_TARGET)
endmacro()

View File

@ -76,7 +76,7 @@ if (${depend_text} MATCHES ".+")
list(APPEND dependency_list "${file_absolute}")
endif()
endforeach(file)
endforeach()
else()
# message("FOUND NO DEPENDS")

View File

@ -65,11 +65,11 @@ if (${file_text} MATCHES ".+")
# Skip the rest of this block.
# message("Skipping ${entry}")
# set(skip TRUE)
# else (${entry} MATCHES "^_")
# else ()
message("Kernel: ${entry}")
# endif (${entry} MATCHES "^_")
# endif ()
endif(${entry} MATCHES "[^g]name = ([^ ]+)")
endif()
# Skip the rest of the block if necessary
if(NOT skip)
@ -96,14 +96,14 @@ if (${file_text} MATCHES ".+")
message("")
endif()
endif(NOT skip)
endif()
endforeach(entry)
endforeach()
endif(line MATCHES "^code")
endif()
endforeach(line)
endforeach()
else()
# message("FOUND NO DEPENDS")

View File

@ -139,7 +139,7 @@ macro(cuda_execute_process status command)
endforeach()
# Echo the command
execute_process(COMMAND ${CMAKE_COMMAND} -E echo ${cuda_execute_process_string})
endif(verbose)
endif()
# Run the command
execute_process(COMMAND ${ARGN} RESULT_VARIABLE CUDA_result )
endmacro()
@ -277,4 +277,4 @@ if( build_cubin )
-P "${CUDA_parse_cubin}"
)
endif( build_cubin )
endif()

View File

@ -43,7 +43,7 @@ if(CURL_INCLUDE_DIR)
unset(curl_version_str)
break()
endif()
endforeach(_curl_version_header)
endforeach()
endif()
# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
@ -56,4 +56,4 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL
if(CURL_FOUND)
set(CURL_LIBRARIES ${CURL_LIBRARY})
set(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
endif(CURL_FOUND)
endif()

View File

@ -5,7 +5,7 @@
# find_package(CVS)
# if(CVS_FOUND)
# message("CVS found: ${CVS_EXECUTABLE}")
# endif(CVS_FOUND)
# endif()
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.

Some files were not shown because too many files have changed in this diff Show More