parent
b2838626dd
commit
628f365140
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
|
MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
|
||||||
IF("${VAR}" MATCHES "^${VAR}$")
|
IF("${VAR}" MATCHES "^${VAR}$")
|
||||||
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
|
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||||
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
|
SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
|
||||||
|
@ -61,7 +61,7 @@ MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
|
||||||
IF("${${VAR}_EXITCODE}" EQUAL 0)
|
IF("${${VAR}_EXITCODE}" EQUAL 0)
|
||||||
SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
|
SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
|
||||||
MESSAGE(STATUS "Performing Test ${VAR} - Success")
|
MESSAGE(STATUS "Performing Test ${VAR} - Success")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
|
"Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
|
||||||
"${OUTPUT}\n"
|
"${OUTPUT}\n"
|
||||||
"Return value: ${${VAR}}\n"
|
"Return value: ${${VAR}}\n"
|
||||||
|
@ -74,7 +74,7 @@ MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
|
||||||
ENDIF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
|
ENDIF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
|
||||||
|
|
||||||
MESSAGE(STATUS "Performing Test ${VAR} - Failed")
|
MESSAGE(STATUS "Performing Test ${VAR} - Failed")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"Performing C SOURCE FILE Test ${VAR} failed with the following output:\n"
|
"Performing C SOURCE FILE Test ${VAR} failed with the following output:\n"
|
||||||
"${OUTPUT}\n"
|
"${OUTPUT}\n"
|
||||||
"Return value: ${${VAR}_EXITCODE}\n"
|
"Return value: ${${VAR}_EXITCODE}\n"
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
|
MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
|
||||||
IF("${VAR}" MATCHES "^${VAR}$")
|
IF("${VAR}" MATCHES "^${VAR}$")
|
||||||
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
|
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||||
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
|
SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
|
||||||
|
@ -62,9 +62,9 @@ MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
|
||||||
IF("${${VAR}_EXITCODE}" EQUAL 0)
|
IF("${${VAR}_EXITCODE}" EQUAL 0)
|
||||||
SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
|
SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
|
||||||
MESSAGE(STATUS "Performing Test ${VAR} - Success")
|
MESSAGE(STATUS "Performing Test ${VAR} - Success")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
|
"Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
|
||||||
"${OUTPUT}\n"
|
"${OUTPUT}\n"
|
||||||
"Return value: ${${VAR}}\n"
|
"Return value: ${${VAR}}\n"
|
||||||
"Source file was:\n${SOURCE}\n")
|
"Source file was:\n${SOURCE}\n")
|
||||||
ELSE("${${VAR}_EXITCODE}" EQUAL 0)
|
ELSE("${${VAR}_EXITCODE}" EQUAL 0)
|
||||||
|
@ -75,9 +75,9 @@ MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
|
||||||
ENDIF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
|
ENDIF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
|
||||||
|
|
||||||
MESSAGE(STATUS "Performing Test ${VAR} - Failed")
|
MESSAGE(STATUS "Performing Test ${VAR} - Failed")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n"
|
"Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n"
|
||||||
"${OUTPUT}\n"
|
"${OUTPUT}\n"
|
||||||
"Return value: ${${VAR}_EXITCODE}\n"
|
"Return value: ${${VAR}_EXITCODE}\n"
|
||||||
"Source file was:\n${SOURCE}\n")
|
"Source file was:\n${SOURCE}\n")
|
||||||
ENDIF("${${VAR}_EXITCODE}" EQUAL 0)
|
ENDIF("${${VAR}_EXITCODE}" EQUAL 0)
|
||||||
|
|
|
@ -50,13 +50,13 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
|
||||||
if(${VARIABLE})
|
if(${VARIABLE})
|
||||||
set(${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
|
set(${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
|
||||||
message(STATUS "Looking for Fortran ${FUNCTION} - found")
|
message(STATUS "Looking for Fortran ${FUNCTION} - found")
|
||||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
|
"Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
|
||||||
"${OUTPUT}\n\n")
|
"${OUTPUT}\n\n")
|
||||||
else(${VARIABLE})
|
else(${VARIABLE})
|
||||||
message(STATUS "Looking for Fortran ${FUNCTION} - not found")
|
message(STATUS "Looking for Fortran ${FUNCTION} - not found")
|
||||||
set(${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}")
|
set(${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}")
|
||||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
|
"Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
|
||||||
"${OUTPUT}\n\n")
|
"${OUTPUT}\n\n")
|
||||||
endif(${VARIABLE})
|
endif(${VARIABLE})
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
|
MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
|
||||||
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
||||||
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
|
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||||
"-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
|
"-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
MESSAGE(STATUS "Looking for ${FUNCTION}")
|
MESSAGE(STATUS "Looking for ${FUNCTION}")
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
@ -55,13 +55,13 @@ MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
|
||||||
IF(${VARIABLE})
|
IF(${VARIABLE})
|
||||||
SET(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}")
|
SET(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}")
|
||||||
MESSAGE(STATUS "Looking for ${FUNCTION} - found")
|
MESSAGE(STATUS "Looking for ${FUNCTION} - found")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Determining if the function ${FUNCTION} exists passed with the following output:\n"
|
"Determining if the function ${FUNCTION} exists passed with the following output:\n"
|
||||||
"${OUTPUT}\n\n")
|
"${OUTPUT}\n\n")
|
||||||
ELSE(${VARIABLE})
|
ELSE(${VARIABLE})
|
||||||
MESSAGE(STATUS "Looking for ${FUNCTION} - not found")
|
MESSAGE(STATUS "Looking for ${FUNCTION} - not found")
|
||||||
SET(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}")
|
SET(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"Determining if the function ${FUNCTION} exists failed with the following output:\n"
|
"Determining if the function ${FUNCTION} exists failed with the following output:\n"
|
||||||
"${OUTPUT}\n\n")
|
"${OUTPUT}\n\n")
|
||||||
ENDIF(${VARIABLE})
|
ENDIF(${VARIABLE})
|
||||||
|
|
|
@ -28,19 +28,19 @@
|
||||||
|
|
||||||
MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
|
MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
|
||||||
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
||||||
SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
|
SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
|
||||||
"-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
|
"-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
|
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
|
||||||
SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
|
SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
SET(CHECK_LIBRARY_EXISTS_LIBRARIES
|
SET(CHECK_LIBRARY_EXISTS_LIBRARIES
|
||||||
${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
|
${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
|
||||||
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
TRY_COMPILE(${VARIABLE}
|
TRY_COMPILE(${VARIABLE}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_ROOT}/Modules/CheckFunctionExists.c
|
${CMAKE_ROOT}/Modules/CheckFunctionExists.c
|
||||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||||
CMAKE_FLAGS
|
CMAKE_FLAGS
|
||||||
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION}
|
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION}
|
||||||
-DLINK_DIRECTORIES:STRING=${LOCATION}
|
-DLINK_DIRECTORIES:STRING=${LOCATION}
|
||||||
"-DLINK_LIBRARIES:STRING=${CHECK_LIBRARY_EXISTS_LIBRARIES}"
|
"-DLINK_LIBRARIES:STRING=${CHECK_LIBRARY_EXISTS_LIBRARIES}"
|
||||||
|
@ -49,14 +49,14 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
|
||||||
IF(${VARIABLE})
|
IF(${VARIABLE})
|
||||||
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found")
|
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found")
|
||||||
SET(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}")
|
SET(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
|
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
|
||||||
"passed with the following output:\n"
|
"passed with the following output:\n"
|
||||||
"${OUTPUT}\n\n")
|
"${OUTPUT}\n\n")
|
||||||
ELSE(${VARIABLE})
|
ELSE(${VARIABLE})
|
||||||
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found")
|
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found")
|
||||||
SET(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}")
|
SET(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
|
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
|
||||||
"failed with the following output:\n"
|
"failed with the following output:\n"
|
||||||
"${OUTPUT}\n\n")
|
"${OUTPUT}\n\n")
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# - Check if the variable exists.
|
# - Check if the variable exists.
|
||||||
# CHECK_VARIABLE_EXISTS(VAR VARIABLE)
|
# CHECK_VARIABLE_EXISTS(VAR VARIABLE)
|
||||||
#
|
#
|
||||||
# VAR - the name of the variable
|
# VAR - the name of the variable
|
||||||
# VARIABLE - variable to store the result
|
# VARIABLE - variable to store the result
|
||||||
#
|
#
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
|
MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
|
||||||
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
||||||
SET(MACRO_CHECK_VARIABLE_DEFINITIONS
|
SET(MACRO_CHECK_VARIABLE_DEFINITIONS
|
||||||
"-DCHECK_VARIABLE_EXISTS=${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
"-DCHECK_VARIABLE_EXISTS=${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
MESSAGE(STATUS "Looking for ${VAR}")
|
MESSAGE(STATUS "Looking for ${VAR}")
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
@ -47,13 +47,13 @@ MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
|
||||||
IF(${VARIABLE})
|
IF(${VARIABLE})
|
||||||
SET(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}")
|
SET(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}")
|
||||||
MESSAGE(STATUS "Looking for ${VAR} - found")
|
MESSAGE(STATUS "Looking for ${VAR} - found")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Determining if the variable ${VAR} exists passed with the following output:\n"
|
"Determining if the variable ${VAR} exists passed with the following output:\n"
|
||||||
"${OUTPUT}\n\n")
|
"${OUTPUT}\n\n")
|
||||||
ELSE(${VARIABLE})
|
ELSE(${VARIABLE})
|
||||||
SET(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}")
|
SET(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}")
|
||||||
MESSAGE(STATUS "Looking for ${VAR} - not found")
|
MESSAGE(STATUS "Looking for ${VAR} - not found")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"Determining if the variable ${VAR} exists failed with the following output:\n"
|
"Determining if the variable ${VAR} exists failed with the following output:\n"
|
||||||
"${OUTPUT}\n\n")
|
"${OUTPUT}\n\n")
|
||||||
ENDIF(${VARIABLE})
|
ENDIF(${VARIABLE})
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// This file is used to compile all the commands
|
// This file is used to compile all the commands
|
||||||
// that CMake knows about at compile time.
|
// that CMake knows about at compile time.
|
||||||
// This is sort of a boot strapping approach since you would
|
// This is sort of a boot strapping approach since you would
|
||||||
// like to have CMake to build CMake.
|
// like to have CMake to build CMake.
|
||||||
#include "cmCommands.h"
|
#include "cmCommands.h"
|
||||||
#include "cmAddCustomCommandCommand.cxx"
|
#include "cmAddCustomCommandCommand.cxx"
|
||||||
#include "cmAddCustomTargetCommand.cxx"
|
#include "cmAddCustomTargetCommand.cxx"
|
||||||
|
@ -111,7 +111,7 @@ void GetBootstrapCommands(std::list<cmCommand*>& commands)
|
||||||
commands.push_back(new cmDefinePropertyCommand);
|
commands.push_back(new cmDefinePropertyCommand);
|
||||||
commands.push_back(new cmElseCommand);
|
commands.push_back(new cmElseCommand);
|
||||||
commands.push_back(new cmEnableLanguageCommand);
|
commands.push_back(new cmEnableLanguageCommand);
|
||||||
commands.push_back(new cmEnableTestingCommand);
|
commands.push_back(new cmEnableTestingCommand);
|
||||||
commands.push_back(new cmEndForEachCommand);
|
commands.push_back(new cmEndForEachCommand);
|
||||||
commands.push_back(new cmEndFunctionCommand);
|
commands.push_back(new cmEndFunctionCommand);
|
||||||
commands.push_back(new cmEndIfCommand);
|
commands.push_back(new cmEndIfCommand);
|
||||||
|
|
|
@ -25,7 +25,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
||||||
else if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endwhile"))
|
else if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endwhile"))
|
||||||
{
|
{
|
||||||
// if this is the endwhile for this while loop then execute
|
// if this is the endwhile for this while loop then execute
|
||||||
if (!this->Depth)
|
if (!this->Depth)
|
||||||
{
|
{
|
||||||
// Remove the function blocker for this scope or bail.
|
// Remove the function blocker for this scope or bail.
|
||||||
cmsys::auto_ptr<cmFunctionBlocker>
|
cmsys::auto_ptr<cmFunctionBlocker>
|
||||||
|
@ -33,16 +33,16 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
||||||
if(!fb.get()) { return false; }
|
if(!fb.get()) { return false; }
|
||||||
|
|
||||||
std::string errorString;
|
std::string errorString;
|
||||||
|
|
||||||
std::vector<std::string> expandedArguments;
|
std::vector<std::string> expandedArguments;
|
||||||
mf.ExpandArguments(this->Args, expandedArguments);
|
mf.ExpandArguments(this->Args, expandedArguments);
|
||||||
cmake::MessageType messageType;
|
cmake::MessageType messageType;
|
||||||
bool isTrue =
|
bool isTrue =
|
||||||
cmIfCommand::IsTrue(expandedArguments,errorString,
|
cmIfCommand::IsTrue(expandedArguments,errorString,
|
||||||
&mf, messageType);
|
&mf, messageType);
|
||||||
|
|
||||||
while (isTrue)
|
while (isTrue)
|
||||||
{
|
{
|
||||||
if (errorString.size())
|
if (errorString.size())
|
||||||
{
|
{
|
||||||
std::string err = "had incorrect arguments: ";
|
std::string err = "had incorrect arguments: ";
|
||||||
|
@ -86,7 +86,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
||||||
}
|
}
|
||||||
expandedArguments.clear();
|
expandedArguments.clear();
|
||||||
mf.ExpandArguments(this->Args, expandedArguments);
|
mf.ExpandArguments(this->Args, expandedArguments);
|
||||||
isTrue =
|
isTrue =
|
||||||
cmIfCommand::IsTrue(expandedArguments,errorString,
|
cmIfCommand::IsTrue(expandedArguments,errorString,
|
||||||
&mf, messageType);
|
&mf, messageType);
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
||||||
|
|
||||||
// record the command
|
// record the command
|
||||||
this->Functions.push_back(lff);
|
this->Functions.push_back(lff);
|
||||||
|
|
||||||
// always return true
|
// always return true
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ ShouldRemove(const cmListFileFunction& lff, cmMakefile& )
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmWhileCommand
|
bool cmWhileCommand
|
||||||
::InvokeInitialPass(const std::vector<cmListFileArgument>& args,
|
::InvokeInitialPass(const std::vector<cmListFileArgument>& args,
|
||||||
cmExecutionStatus &)
|
cmExecutionStatus &)
|
||||||
{
|
{
|
||||||
if(args.size() < 1)
|
if(args.size() < 1)
|
||||||
|
@ -131,12 +131,12 @@ bool cmWhileCommand
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a function blocker
|
// create a function blocker
|
||||||
cmWhileFunctionBlocker *f = new cmWhileFunctionBlocker();
|
cmWhileFunctionBlocker *f = new cmWhileFunctionBlocker();
|
||||||
f->Args = args;
|
f->Args = args;
|
||||||
this->Makefile->AddFunctionBlocker(f);
|
this->Makefile->AddFunctionBlocker(f);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ ENDIF(WIN32)
|
||||||
# does, it appends library to the list.
|
# does, it appends library to the list.
|
||||||
SET(CURL_LIBS "")
|
SET(CURL_LIBS "")
|
||||||
MACRO(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
|
MACRO(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
|
||||||
CHECK_LIBRARY_EXISTS("${LIBRARY};${CURL_LIBS}" ${SYMBOL} ""
|
CHECK_LIBRARY_EXISTS("${LIBRARY};${CURL_LIBS}" ${SYMBOL} ""
|
||||||
${VARIABLE})
|
${VARIABLE})
|
||||||
IF(${VARIABLE})
|
IF(${VARIABLE})
|
||||||
SET(CURL_LIBS ${CURL_LIBS} ${LIBRARY})
|
SET(CURL_LIBS ${CURL_LIBS} ${LIBRARY})
|
||||||
|
@ -180,7 +180,7 @@ IF(CMAKE_USE_OPENSSL)
|
||||||
SET(USE_SSLEAY TRUE)
|
SET(USE_SSLEAY TRUE)
|
||||||
SET(USE_OPENSSL TRUE)
|
SET(USE_OPENSSL TRUE)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
FIND_PATH(SSLINCLUDE openssl/crypto.h
|
FIND_PATH(SSLINCLUDE openssl/crypto.h
|
||||||
PATHS c:/hoffman/Tools/openssl_w32vc6-0.9.8g/inc32)
|
PATHS c:/hoffman/Tools/openssl_w32vc6-0.9.8g/inc32)
|
||||||
INCLUDE_DIRECTORIES(${SSLINCLUDE})
|
INCLUDE_DIRECTORIES(${SSLINCLUDE})
|
||||||
FIND_LIBRARY(LIBEAY NAMES libeay32)
|
FIND_LIBRARY(LIBEAY NAMES libeay32)
|
||||||
|
@ -221,7 +221,7 @@ IF(HAVE_FEATURES_H)
|
||||||
getenv.c
|
getenv.c
|
||||||
hash.c
|
hash.c
|
||||||
http.c
|
http.c
|
||||||
if2ip.c
|
if2ip.c
|
||||||
mprintf.c
|
mprintf.c
|
||||||
multi.c
|
multi.c
|
||||||
sendf.c
|
sendf.c
|
||||||
|
@ -287,9 +287,9 @@ ENDIF(NOT CURL_SPECIAL_LIBZ)
|
||||||
CHECK_INCLUDE_FILE_CONCAT("sys/socket.h" HAVE_SYS_SOCKET_H)
|
CHECK_INCLUDE_FILE_CONCAT("sys/socket.h" HAVE_SYS_SOCKET_H)
|
||||||
CHECK_INCLUDE_FILE_CONCAT("netinet/in.h" HAVE_NETINET_IN_H)
|
CHECK_INCLUDE_FILE_CONCAT("netinet/in.h" HAVE_NETINET_IN_H)
|
||||||
CHECK_INCLUDE_FILE_CONCAT("net/if.h" HAVE_NET_IF_H)
|
CHECK_INCLUDE_FILE_CONCAT("net/if.h" HAVE_NET_IF_H)
|
||||||
CHECK_INCLUDE_FILE_CONCAT("netinet/if_ether.h"
|
CHECK_INCLUDE_FILE_CONCAT("netinet/if_ether.h"
|
||||||
HAVE_NETINET_IF_ETHER_H)
|
HAVE_NETINET_IF_ETHER_H)
|
||||||
CHECK_INCLUDE_FILE_CONCAT("netinet/tcp.h"
|
CHECK_INCLUDE_FILE_CONCAT("netinet/tcp.h"
|
||||||
HAVE_NETINET_TCP_H)
|
HAVE_NETINET_TCP_H)
|
||||||
CHECK_INCLUDE_FILE_CONCAT("sys/select.h" HAVE_SYS_SELECT_H)
|
CHECK_INCLUDE_FILE_CONCAT("sys/select.h" HAVE_SYS_SELECT_H)
|
||||||
CHECK_INCLUDE_FILE_CONCAT("utime.h" HAVE_UTIME_H)
|
CHECK_INCLUDE_FILE_CONCAT("utime.h" HAVE_UTIME_H)
|
||||||
|
@ -421,7 +421,7 @@ IF(CMAKE_USE_OPENSSL)
|
||||||
CHECK_SYMBOL_EXISTS(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS)
|
CHECK_SYMBOL_EXISTS(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS)
|
||||||
CHECK_SYMBOL_EXISTS(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN)
|
CHECK_SYMBOL_EXISTS(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN)
|
||||||
CHECK_SYMBOL_EXISTS(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD)
|
CHECK_SYMBOL_EXISTS(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD)
|
||||||
CHECK_SYMBOL_EXISTS(CRYPTO_cleanup_all_ex_data "${CURL_INCLUDES}"
|
CHECK_SYMBOL_EXISTS(CRYPTO_cleanup_all_ex_data "${CURL_INCLUDES}"
|
||||||
HAVE_CRYPTO_CLEANUP_ALL_EX_DATA)
|
HAVE_CRYPTO_CLEANUP_ALL_EX_DATA)
|
||||||
ENDIF(CMAKE_USE_OPENSSL)
|
ENDIF(CMAKE_USE_OPENSSL)
|
||||||
CHECK_SYMBOL_EXISTS(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R)
|
CHECK_SYMBOL_EXISTS(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R)
|
||||||
|
@ -485,7 +485,7 @@ ENDIF(NOT HAVE_SIGSETJMP)
|
||||||
# For other curl specific tests, use this macro.
|
# For other curl specific tests, use this macro.
|
||||||
MACRO(CURL_INTERNAL_TEST CURL_TEST)
|
MACRO(CURL_INTERNAL_TEST CURL_TEST)
|
||||||
IF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
|
IF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
|
||||||
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
|
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||||
"-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
|
"-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
SET(CURL_TEST_ADD_LIBRARIES
|
SET(CURL_TEST_ADD_LIBRARIES
|
||||||
|
@ -502,18 +502,18 @@ MACRO(CURL_INTERNAL_TEST CURL_TEST)
|
||||||
IF(${CURL_TEST})
|
IF(${CURL_TEST})
|
||||||
SET(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
SET(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||||
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Performing Curl Test ${CURL_TEST} passed with the following output:\n"
|
"Performing Curl Test ${CURL_TEST} passed with the following output:\n"
|
||||||
"${OUTPUT}\n")
|
"${OUTPUT}\n")
|
||||||
ELSE(${CURL_TEST})
|
ELSE(${CURL_TEST})
|
||||||
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||||
SET(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
SET(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||||
"${OUTPUT}\n")
|
"${OUTPUT}\n")
|
||||||
ENDIF(${CURL_TEST})
|
ENDIF(${CURL_TEST})
|
||||||
ENDIF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
|
ENDIF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
|
||||||
ENDMACRO(CURL_INTERNAL_TEST)
|
ENDMACRO(CURL_INTERNAL_TEST)
|
||||||
|
|
||||||
# Do curl specific tests
|
# Do curl specific tests
|
||||||
#OPTION(CURL_HAVE_DISABLED_NONBLOCKING "Disable non-blocking socket detection" OFF)
|
#OPTION(CURL_HAVE_DISABLED_NONBLOCKING "Disable non-blocking socket detection" OFF)
|
||||||
|
@ -527,7 +527,7 @@ IF(NOT CURL_HAVE_DISABLED_NONBLOCKING)
|
||||||
HAVE_SO_NONBLOCK
|
HAVE_SO_NONBLOCK
|
||||||
)
|
)
|
||||||
ENDIF(NOT CURL_HAVE_DISABLED_NONBLOCKING)
|
ENDIF(NOT CURL_HAVE_DISABLED_NONBLOCKING)
|
||||||
FOREACH(CURL_TEST
|
FOREACH(CURL_TEST
|
||||||
${CURL_NONBLOCKING_TESTS}
|
${CURL_NONBLOCKING_TESTS}
|
||||||
TIME_WITH_SYS_TIME
|
TIME_WITH_SYS_TIME
|
||||||
HAVE_O_NONBLOCKHAVE_GETHOSTBYADDR_R_5
|
HAVE_O_NONBLOCKHAVE_GETHOSTBYADDR_R_5
|
||||||
|
@ -627,12 +627,12 @@ SET(CMAKE_REQUIRED_FLAGS)
|
||||||
|
|
||||||
# Check for nonblocking
|
# Check for nonblocking
|
||||||
SET(HAVE_DISABLED_NONBLOCKING 1)
|
SET(HAVE_DISABLED_NONBLOCKING 1)
|
||||||
IF(HAVE_FIONBIO OR
|
IF(HAVE_FIONBIO OR
|
||||||
HAVE_IOCTLSOCKET OR
|
HAVE_IOCTLSOCKET OR
|
||||||
HAVE_IOCTLSOCKET_CASE OR
|
HAVE_IOCTLSOCKET_CASE OR
|
||||||
HAVE_O_NONBLOCK)
|
HAVE_O_NONBLOCK)
|
||||||
SET(HAVE_DISABLED_NONBLOCKING)
|
SET(HAVE_DISABLED_NONBLOCKING)
|
||||||
ENDIF(HAVE_FIONBIO OR
|
ENDIF(HAVE_FIONBIO OR
|
||||||
HAVE_IOCTLSOCKET OR
|
HAVE_IOCTLSOCKET OR
|
||||||
HAVE_IOCTLSOCKET_CASE OR
|
HAVE_IOCTLSOCKET_CASE OR
|
||||||
HAVE_O_NONBLOCK)
|
HAVE_O_NONBLOCK)
|
||||||
|
|
Loading…
Reference in New Issue