Commit 989d9b74 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: merge in RC 5

parent ccdab21b
......@@ -354,7 +354,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6)
SET(CMake_VERSION_PATCH 3)
SET(CMake_VERSION_RC 4)
SET(CMake_VERSION_RC 5)
# CVS versions are odd, if this is an odd minor version
# then set the CMake_VERSION_DATE variable
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
......
Changes in CMake 2.6.3 RC 5
- add EXCLUDE, INCLUDE to ctest_test command in ctest -S scripts
- Set CMAKE_SYSTEM in ctest -S scripts by reading CMakeDetermineSystem
- Fix for GetLibraryNamesInternal called on imported target issue on osx
- Add FortranCInterface.cmake module to discover Fortran/C interfaces
- Fix Fortran compiler specified with -D issue
- Add support for the MS masm and masm64 assemblers, works with nmake/make
- Improvments to FindQt4.cmake
- InstallRequiredSystemLibraries fix for win64
- Fix flags for Sun Fortran, and g77
- Fix imported library issue with OSX
- Fix -D and CACHE FORCE issue
- Have kwsys submit dashboards to cdash.org
Changes in CMake 2.6.3 RC 4
- Fix for SccProvider in visual studio
- fix for missing package_source target
......
# support for AT&T syntax assemblers, e.g. GNU as
SET(ASM_DIALECT "-ATT")
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm)
INCLUDE(CMakeASMInformation)
......
# determine the compiler to use for ASM using AT&T syntax
# determine the compiler to use for ASM using AT&T syntax, e.g. GNU as
SET(ASM_DIALECT "-ATT")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as)
......
......@@ -17,7 +17,7 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
IF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "Assembler" NO_DEFAULT_PATH)
ENDIF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} DOC "Assembler")
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_TOOLCHAIN_LOCATION} DOC "Assembler")
ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
......
......@@ -53,7 +53,7 @@ IF(NOT CMAKE_Fortran_COMPILER)
# CMake/Source/CMakeLists.txt, IF YOU CHANGE THIS LIST,
# PLEASE UPDATE THAT FILE AS WELL!
SET(CMAKE_Fortran_COMPILER_LIST
ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran g95 f90
ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran gfortran-4 g95 f90
pgf90 xlf90 epcf90 fort77 frt pgf77 xlf fl32 af77 g77 f77
)
ENDIF(CMAKE_Fortran_COMPILER_INIT)
......@@ -63,6 +63,32 @@ IF(NOT CMAKE_Fortran_COMPILER)
IF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER)
SET(CMAKE_Fortran_COMPILER "${CMAKE_Fortran_COMPILER_INIT}" CACHE FILEPATH "Fortran compiler" FORCE)
ENDIF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER)
ELSE(NOT CMAKE_Fortran_COMPILER)
# 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
# CMAKE_Fortran_COMPILER and the 2nd one as CMAKE_Fortran_COMPILER_ARG1
LIST(LENGTH CMAKE_Fortran_COMPILER _CMAKE_Fortran_COMPILER_LIST_LENGTH)
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)
# if a compiler was specified by the user but without path,
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
# if the C compiler already had a path, reuse it for searching the CXX compiler
GET_FILENAME_COMPONENT(_CMAKE_USER_Fortran_COMPILER_PATH "${CMAKE_Fortran_COMPILER}" PATH)
IF(NOT _CMAKE_USER_Fortran_COMPILER_PATH)
FIND_PROGRAM(CMAKE_Fortran_COMPILER_WITH_PATH NAMES ${CMAKE_Fortran_COMPILER})
MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER_WITH_PATH)
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)
MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER)
......
......@@ -4,6 +4,7 @@
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
SET(ASM_DIALECT "-ATT")
INCLUDE(CMakeTestASMCompiler)
SET(ASM_DIALECT)
# - Configure a project for testing with CTest/Dart
# This file configures a project to use the CTest/Dart
# - Configure a project for testing with CTest/CDash
# This file configures a project to use the CTest/CDash/Dart
# testing/dashboard process. This module should be included
# in the CMakeLists.txt file at the top of a project. Typical usage:
# INCLUDE(CTest)
......
......@@ -643,8 +643,8 @@ IF (QT4_QMAKE_FOUND)
FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient_debug QtAssistantClientd QtAssistantClientd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTASSISTANT_LIBRARY
FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient QtAssistantClient4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient_debug QtAssistantClientd QtAssistantClientd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient QtAssistantClient4 QtAssistant QtAssistant4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient_debug QtAssistantClientd QtAssistantClientd4 QtAssistant_debug QtAssistantd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTHELP_LIBRARY
FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene QtCLucene4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
......@@ -752,9 +752,30 @@ IF (QT4_QMAKE_FOUND)
#######################################
# find moc and uic using qmake
QT_QUERY_QMAKE(QT_MOC_EXECUTABLE_INTERNAL "QMAKE_MOC")
QT_QUERY_QMAKE(QT_UIC_EXECUTABLE_INTERNAL "QMAKE_UIC")
# make sure we have / and not \ as qmake gives on windows
FILE(TO_CMAKE_PATH
"${QT_MOC_EXECUTABLE_INTERNAL}" QT_MOC_EXECUTABLE_INTERNAL)
# make sure we have / and not \ as qmake gives on windows
FILE(TO_CMAKE_PATH
"${QT_UIC_EXECUTABLE_INTERNAL}" QT_UIC_EXECUTABLE_INTERNAL)
IF(QT_QMAKE_CHANGED)
SET(QT_MOC_EXECUTABLE
${QT_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable" FORCE)
SET(QT_UIC_EXECUTABLE
${QT_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable" FORCE)
ELSE(QT_QMAKE_CHANGED)
SET(QT_MOC_EXECUTABLE
${QT_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable")
SET(QT_UIC_EXECUTABLE
${QT_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable")
ENDIF(QT_QMAKE_CHANGED)
IF(QT_QMAKE_CHANGED)
SET(QT_MOC_EXECUTABLE NOTFOUND)
SET(QT_UIC_EXECUTABLE NOTFOUND)
SET(QT_UIC3_EXECUTABLE NOTFOUND)
SET(QT_RCC_EXECUTABLE NOTFOUND)
SET(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND)
......@@ -762,18 +783,6 @@ IF (QT4_QMAKE_FOUND)
SET(QT_LUPDATE_EXECUTABLE NOTFOUND)
SET(QT_LRELEASE_EXECUTABLE NOTFOUND)
ENDIF(QT_QMAKE_CHANGED)
FIND_PROGRAM(QT_MOC_EXECUTABLE
NAMES moc
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH
)
FIND_PROGRAM(QT_UIC_EXECUTABLE
NAMES uic
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH
)
FIND_PROGRAM(QT_UIC3_EXECUTABLE
NAMES uic3
......@@ -855,12 +864,14 @@ IF (QT4_QMAKE_FOUND)
SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
IF(_infileLength GREATER _binlength)
STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
ENDIF(_infileLength GREATER _binlength)
IF(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}")
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
ELSE(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}")
IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
ELSE(_infileLength GREATER _binlength)
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
ENDIF(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}")
ENDIF(_infileLength GREATER _binlength)
SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
STRING(REPLACE ".." "__" _outfile ${_outfile})
GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
......
# FortranCInterface.cmake
#
# This file defines the function create_fortran_c_interface.
# this function is used to create a configured header file
# that contains a mapping from C to a Fortran function using
# the correct name mangling scheme as defined by the current
# fortran compiler.
#
# The function tages a list of functions and the name of
# a header file to configure.
#
# This file also defines some helper functions that are used
# to detect the fortran name mangling scheme used by the
# current Fortran compiler.
# test_fortran_mangling - test a single fortran mangling
# discover_fortran_mangling - loop over all combos of fortran
# name mangling and call test_fortran_mangling until one of them
# works.
# discover_fortran_module_mangling - try different types of
# fortran modle name mangling to find one that works
#
#
#
# this function tests a single fortran mangling.
# CODE - test code to try should define a subroutine called "sub"
# PREFIX - string to put in front of sub
# POSTFIX - string to put after sub
# ISUPPER - if TRUE then sub will be called as SUB
# DOC - string used in status checking Fortran ${DOC} linkage
# SUB - the name of the SUB to call
# RESULT place to store result TRUE if this linkage works, FALSE
# if not.
#
function(test_fortran_mangling CODE PREFIX ISUPPER POSTFIX DOC SUB RESULT)
if(ISUPPER)
string(TOUPPER "${SUB}" sub)
else(ISUPPER)
string(TOLOWER "${SUB}" sub)
endif(ISUPPER)
set(FUNCTION "${PREFIX}${sub}${POSTFIX}")
# create a fortran file with sub called sub
#
set(TMP_DIR
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckFortranLink")
file(REMOVE_RECURSE "${TMP_DIR}")
file(WRITE "${TMP_DIR}/test.f" "${CODE}" )
message(STATUS "checking Fortran ${DOC} linkage: ${FUNCTION}")
file(WRITE "${TMP_DIR}/ctof.c"
"
extern ${FUNCTION}();
int main() { ${FUNCTION}(); return 0;}
"
)
file(WRITE "${TMP_DIR}/CMakeLists.txt"
"
project(testf C Fortran)
add_library(flib test.f)
add_executable(ctof ctof.c)
target_link_libraries(ctof flib)
"
)
set(FORTRAN_NAME_MANGLE_TEST FALSE)
try_compile(FORTRAN_NAME_MANGLE_TEST "${TMP_DIR}" "${TMP_DIR}"
testf
OUTPUT_VARIABLE output)
if(FORTRAN_NAME_MANGLE_TEST)
set(${RESULT} TRUE PARENT_SCOPE)
else()
set(${RESULT} FALSE PARENT_SCOPE)
endif()
endfunction(test_fortran_mangling)
# this function discovers the name mangling scheme used
# for functions in a fortran module.
function(discover_fortran_module_mangling prefix suffix found)
set(CODE
"
module test_interface
interface dummy
module procedure sub
end interface
contains
subroutine sub
end subroutine
end module test_interface
")
set(worked FALSE)
foreach(interface
"test_interface$"
"TEST_INTERFACE_mp_"
"_test_interface__"
"__test_interface__"
"__test_interface_NMOD_"
"__test_interface_MOD_")
test_fortran_mangling("${CODE}" "${interface}"
${FORTRAN_C_MANGLING_UPPERCASE} "" "module" "sub" worked)
if(worked)
# if this is the upper case module match then
# lower case it for the extraction of pre and post strings
if("${interface}" MATCHES "TEST_INTERFACE")
string(TOLOWER "${interface}" interface)
endif()
string(REGEX REPLACE "(.*)test_interface(.*)" "\\1" pre "${interface}")
string(REGEX REPLACE "(.*)test_interface(.*)" "\\2" post "${interface}")
set(${prefix} "${pre}" PARENT_SCOPE)
set(${suffix} "${post}" PARENT_SCOPE)
set(${found} TRUE PARENT_SCOPE)
return()
endif(worked)
endforeach(interface)
if(NOT worked)
message(STATUS "Failed to find C binding to Fortran module functions.")
set(${prefix} "BROKEN_C_FORTRAN_MODULE_BINDING" PARENT_SCOPE)
set(${suffix} "BROKEN_C_FORTRAN_MODULE_BINDING" PARENT_SCOPE)
set(${found} FALSE PARENT_SCOPE)
endif(NOT worked)
endfunction(discover_fortran_module_mangling)
function(discover_fortran_mangling prefix isupper suffix extra_under_score
found )
set(CODE
"
subroutine sub
end subroutine sub
")
foreach(post "_" "")
foreach(isup FALSE TRUE)
foreach(pre "" "_" "__")
set(worked FALSE)
test_fortran_mangling("${CODE}" "${pre}" ${isup}
"${post}" "function" sub worked )
if(worked)
message(STATUS "found Fortran function linkage")
set(${isupper} "${isup}" PARENT_SCOPE)
set(${prefix} "${pre}" PARENT_SCOPE)
set(${suffix} "${post}" PARENT_SCOPE)
set(${found} TRUE PARENT_SCOPE)
set(CODE
"
subroutine my_sub
end subroutine my_sub
")
set(worked FALSE)
test_fortran_mangling("${CODE}" "${pre}" ${isup}
"${post}" "function with _ " my_sub worked )
if(worked)
set(${extra_under_score} FALSE PARENT_SCOPE)
else(worked)
test_fortran_mangling("${CODE}" "${pre}" ${isup}
"${post}_" "function with _ " my_sub worked )
if(worked)
set(${extra_under_score} TRUE PARENT_SCOPE)
endif(worked)
endif(worked)
return()
endif()
endforeach()
endforeach()
endforeach()
set(${found} FALSE PARENT_SCOPE)
endfunction(discover_fortran_mangling)
function(create_fortran_c_interface NAMESPACE FUNCTIONS HEADER)
if(NOT FORTRAN_C_MANGLING_FOUND)
# find regular fortran function mangling
discover_fortran_mangling(prefix isupper suffix extra_under found)
if(NOT found)
message(SEND_ERROR "Could not find fortran c name mangling.")
return()
endif(NOT found)
# find fortran module function mangling
set(FORTRAN_C_PREFIX "${prefix}" CACHE INTERNAL
"PREFIX for Fortran to c name mangling")
set(FORTRAN_C_SUFFIX "${suffix}" CACHE INTERNAL
"SUFFIX for Fortran to c name mangling")
set(FORTRAN_C_MANGLING_UPPERCASE ${isupper} CACHE INTERNAL
"Was fortran to c mangling found" )
set(FORTRAN_C_MANGLING_EXTRA_UNDERSCORE ${extra_under} CACHE INTERNAL
"If a function has a _ in the name does the compiler append an extra _" )
set(FORTRAN_C_MANGLING_FOUND TRUE CACHE INTERNAL
"Was fortran to c mangling found" )
set(prefix )
set(suffix )
set(found FALSE)
# only try this if the compiler is F90 compatible
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
discover_fortran_module_mangling(prefix suffix found)
endif(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
if(found)
message(STATUS "found Fortran module linkage")
else(found)
message(STATUS "Failed to find Fortran module linkage")
endif(found)
set(FORTRAN_C_MODULE_PREFIX "${prefix}" CACHE INTERNAL
"PREFIX for Fortran to c name mangling")
set(FORTRAN_C_MODULE_SUFFIX "${suffix}" CACHE INTERNAL
"SUFFIX for Fortran to c name mangling")
set(FORTRAN_C_MODULE_MANGLING_FOUND ${found} CACHE INTERNAL
"Was for Fortran to c name mangling found for modules")
endif(NOT FORTRAN_C_MANGLING_FOUND)
foreach(f ${${FUNCTIONS}})
if(FORTRAN_C_MANGLING_UPPERCASE)
string(TOUPPER "${f}" fcase)
else()
string(TOLOWER "${f}" fcase)
endif()
if("${f}" MATCHES ":")
string(REGEX REPLACE "(.*):(.*)" "\\1" module "${f}")
string(REGEX REPLACE "(.*):(.*)" "\\2" function "${f}")
string(REGEX REPLACE "(.*):(.*)" "\\1" module_case "${fcase}")
string(REGEX REPLACE "(.*):(.*)" "\\2" function_case "${fcase}")
set(HEADER_CONTENT "${HEADER_CONTENT}
#define ${NAMESPACE}${module}_${function} ${FORTRAN_C_MODULE_PREFIX}${module_case}${FORTRAN_C_MODULE_SUFFIX}${function_case}
")
else("${f}" MATCHES ":")
set(function "${FORTRAN_C_PREFIX}${fcase}${FORTRAN_C_SUFFIX}")
if("${f}" MATCHES "_" AND FORTRAN_C_MANGLING_EXTRA_UNDERSCORE)
set(function "${function}_")
endif("${f}" MATCHES "_" AND FORTRAN_C_MANGLING_EXTRA_UNDERSCORE)
set(HEADER_CONTENT "${HEADER_CONTENT}
#define ${NAMESPACE}${f} ${function}
")
endif("${f}" MATCHES ":")
endforeach(f)
configure_file(
"${CMAKE_ROOT}/Modules/FortranCInterface.h.in"
${HEADER} @ONLY)
message(STATUS "created ${HEADER}")
endfunction()
/* This file is automatically generated by CMake, DO NOT EDIT.
It contains a mapping from Fortran functions so they can
be called from C or C++. */
@HEADER_CONTENT@
......@@ -14,12 +14,14 @@
IF(MSVC)
FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
IF(MSVC70)
SET(__install__libs
"${SYSTEMROOT}/system32/msvcp70.dll"
"${SYSTEMROOT}/system32/msvcr70.dll"
)
ENDIF(MSVC70)
IF(MSVC71)
SET(__install__libs
"${SYSTEMROOT}/system32/msvcp71.dll"
......@@ -33,10 +35,15 @@ IF(MSVC)
SET(CMAKE_MSVC_ARCH x86)
ENDIF(CMAKE_CL_64)
GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)
IF(MSVC80)
# Find the runtime library redistribution directory.
FIND_PATH(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist"
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist"
"${base_dir}/VC/redist"
)
MARK_AS_ADVANCED(MSVC80_REDIST_DIR)
SET(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT")
......@@ -62,16 +69,18 @@ IF(MSVC)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
ENDIF(MSVC80)
IF(MSVC90)
# Find the runtime library redistribution directory.
FIND_PATH(MSVC90_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]/../../VC/redist"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]/../../VC/redist"
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]/../../VC/redist"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]/../../VC/redist"
"${base_dir}/VC/redist"
)
MARK_AS_ADVANCED(MSVC90_REDIST_DIR)
SET(MSVC90_CRT_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
SET(__install__libs
......@@ -91,6 +100,7 @@ IF(MSVC)
)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
ENDIF(MSVC90)
IF(CMAKE_INSTALL_MFC_LIBRARIES)
IF(MSVC70)
SET(__install__libs ${__install__libs}
......@@ -142,6 +152,7 @@ IF(MSVC)
"${MSVC80_MFCLOC_DIR}/mfc80kor.dll"
)
ENDIF(MSVC80)
IF(MSVC90)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC90_MFC_DIR
......@@ -184,6 +195,7 @@ IF(MSVC)
ENDIF(MSVC90)
ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
FOREACH(lib
${__install__libs}
)
......@@ -205,5 +217,3 @@ IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
ENDIF(WIN32)
ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
SET(CMAKE_Fortran_MODDIR_FLAG "-moddir=")
SET(CMAKE_Fortran_MODPATH_FLAG "-M")
set(CMAKE_Fortran_MODDIR_FLAG "-moddir=")
set(CMAKE_Fortran_MODPATH_FLAG "-M")
set(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG "-R")
set(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-KPIC")
......@@ -14,3 +14,10 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
SET(CMAKE_LIBRARY_PATH_FLAG "-L")
SET(CMAKE_LINK_LIBRARY_FLAG "-l")
SET (CMAKE_Fortran_FLAGS_INIT "")
SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-O1")
SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2")
SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-02 -g")
......@@ -380,10 +380,35 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
f->CTestScriptHandler = this;
this->Makefile->AddFunctionBlocker(f);
/* Execute CMakeDetermineSystem and CMakeSystemSpecificInformation, so
that variables like CMAKE_SYSTEM and also the search paths for libraries,
header and executables are set correctly and can be used. Makes new-style
ctest scripting easier. */
std::string systemFile =
this->Makefile->GetModulesFile("CMakeDetermineSystem.cmake");
if (!this->Makefile->ReadListFile(0, systemFile.c_str()) ||
cmSystemTools::GetErrorOccuredFlag())
{
return 2;
}
systemFile =
this->Makefile->GetModulesFile("CMakeSystemSpecificInformation.cmake");
if (!this->Makefile->ReadListFile(0, systemFile.c_str()) ||
cmSystemTools::GetErrorOccuredFlag())
{
cmCTestLog(this->CTest, DEBUG, "Error in read: " << systemFile.c_str()
<< std::endl);
return 2;
}
// finally read in the script
if (!this->Makefile->ReadListFile(0, script.c_str()) ||
cmSystemTools::GetErrorOccuredFlag())
{
cmCTestLog(this->CTest, DEBUG, "Error in read script: "
<< script.c_str()
<< std::endl);
return 2;
}
......
......@@ -24,6 +24,8 @@ cmCTestTestCommand::cmCTestTestCommand()
this->Arguments[ctt_START] = "START";
this->Arguments[ctt_END] = "END";
this->Arguments[ctt_STRIDE] = "STRIDE";
this->Arguments[ctt_EXCLUDE] = "EXCLUDE";
this->Arguments[ctt_INCLUDE] = "INCLUDE";
this->Arguments[ctt_LAST] = 0;
this->Last = ctt_LAST;
}
......@@ -68,6 +70,14 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
handler->SetOption("TestsToRunInformation",
testsToRunString.str().c_str());
}
if(this->Values[ctt_EXCLUDE])
{
handler->SetOption("ExcludeRegularExpression", this->Values[ctt_EXCLUDE]);
}
if(this->Values[ctt_INCLUDE])
{
handler->SetOption("IncludeRegularExpression", this->Values[ctt_INCLUDE]);
}
return handler;
}
......
......@@ -44,7 +44,7 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "CTEST_TEST";}
virtual const char* GetName() { return "ctest_test";}
/**