Commit b4ae8bad authored by Bill Hoffman's avatar Bill Hoffman

RC 4 merge

parent ebd0c2d3
......@@ -141,12 +141,13 @@ MACRO(CMAKE_SETUP_TESTING)
# cmake.
SET(CMAKE_CTEST_COMMAND "${EXECUTABLE_OUTPUT_PATH}/ctest")
SET(CMAKE_CMAKE_COMMAND "${EXECUTABLE_OUTPUT_PATH}/cmake")
SET(CMAKE_CPACK_COMMAND "${EXECUTABLE_OUTPUT_PATH}/cpack")
ENDIF(BUILD_TESTING)
# configure some files for testing
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/Templates/CTestScript.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/CTestScript.cmake"
@ONLY)
@ONLY)
CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage
${CMake_BINARY_DIR}/Tests/.NoDartCoverage)
CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage
......@@ -315,7 +316,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 8)
SET(CMake_VERSION_PATCH 0)
SET(CMake_VERSION_RC 3)
SET(CMake_VERSION_RC 4)
# We use odd minor numbers for development versions.
# Use a date for the development patch level.
......
......@@ -53,4 +53,7 @@ SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
# Exclude try_compile sources from coverage results:
"/CMakeFiles/CMakeTmp/"
# Exclude Qt source files from coverage results:
"[A-Za-z]./[Qq]t/qt-.+-opensource-src"
)
Changes in CMake 2.8.0 RC 4
- Fix try_compile when file cannot be found
- Add new module to test manifest installation issues on windows.
- Add more test coverage
-Improvements in finding MPI on windows. ENH: reorganized searching mpi for mpi components (include,lib,bin) using a single set of search paths instead of seperately mainted lists of paths for each.
- Look for nvcc in the 32 bit bin directory before the 64 bin directory.
- BUG: hardcore some values so output matches cmVS10CLFlagTable.h (addresses bug #9753)
- Avoid Intel linker crash in BuildDepends test
- Fix Intel Fortran SHARED libraries on Linux
- Fix working dir issue for ctest
- Fix if() command and CMP0012 OLD/NEW behavior
- Allow for /D to change install directory on the command line for NSIS
- Move SetErrorMode around calls to generate and configure instead of setting it for the whole application for cmake-gui on windows. Allows for bad installs of windows shell programs to not break file completion.
- Fix Intel and MinGW Fortran DLL import libraries
- Fix Xcode dylib version default
- Fix the showing of non-cpp files in the IDE for VS 10
- Fix optionally-valued booleans in VS 10 flag table
- Detect and set Unicode character set in VS 10
- Add support for the g95 Fortran compiler
- Test all target types in Fortran
- Add Xcode file association for Fortran
- Fix VS 10 flag table for precompiled headers
- Fix VS 10 .sln files for Windows Explorer
- Fix Microsoft.Cpp.$(Platform).user.props in VS10b2
- Fix up file(DOWNLOAD ) a bit, better error checking and uses of long not double for timeout as curl needs, bug# 9748
- Add a VS 10 Win64 generator
- Fix for bug#9686 convert java_home to a cmake path before using.
- fix for bug# 9751, add check for MSVC10
- Fix for bugs #9756, #9690 and #9755, header files were not included, and link_directories we incorrect
- Add a module to test an install tree to verify that the MS CRT version is correct.
- Fix seg fault for empty ENV{} call bug #9747
- Better fix for finding the MSBuild that matches the VS 10 install.
- make testing the CodeBlocks and Eclipse generators easier by not requiring the CMAKE_EDIT_COMMAND variable
- Do not link library dependencies in VS solutions
- Ctest was broken for subdirs. Restored working directory state for tests so that their executables could be found.
- Fixes version detection using osg/Version on Mac OSX when OSG is installed as a framework
- Avoid C++ linker language in VS Fortran project
- Avoid duplicate ZERO_CHECK in VS solutions
- Fixed bug 8319, search for the Python shared library in the standard locations.
- Fix bug#9714, should not crash when version file is not where it should be...
- Fix ctest output alignment for cases where total tests run is not the same width as max test index.
- make it more robust wrt. #9621
- Add another possible error message that curl might emit with an empty drop location.
- Fix issue #5668 - use CollapseFullPath when determining if covered file is within source or binary tree. Allows gcc/gcov coverage analysis using MinGW on Windows.
- CTest-side support for compiler name and compiler version information. Requires CDash update to show on CDash.
- Add a bunch more testing coverage.
Changes in CMake 2.8.0 RC 3
- CTest Added OS Platform (cpu architecture) detection support to windows system
- Several minor FindBoost changes to address posts on mailing list
......
......@@ -21,13 +21,18 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
IF(WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
SET(_INTEL_WINDOWS 1)
ENDIF()
# Disable deprecation warnings for standard C functions.
# really only needed for newer versions of VS, but should
# not hurt other versions, and this will work into the
# future
IF(MSVC)
IF(MSVC OR _INTEL_WINDOWS)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
ENDIF(MSVC)
ELSE()
ENDIF()
#silence duplicate symbol warnings on AIX
IF(CMAKE_SYSTEM MATCHES "AIX.*")
......
......@@ -6,6 +6,8 @@
PRINT *, 'INFO:compiler[Intel]'
#elif defined(__SUNPRO_F90) || defined(__SUNPRO_F95)
PRINT *, 'INFO:compiler[SunPro]'
#elif defined(__G95__)
PRINT *, 'INFO:compiler[G95]'
#elif defined(__GNUC__)
PRINT *, 'INFO:compiler[GNU]'
#elif defined(__IBMC__)
......
......@@ -21,8 +21,8 @@ ENDIF(NOT CMAKE_CROSSCOMPILING)
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES MSBuild
HINTS
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/v4.0.20506/"
c:/WINDOWS/Microsoft.NET/Framework/v4.0.20506/
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
"c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
)
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
......
# CMakeVerifyManifest.cmake
#
# This script is used to verify that embeded manifests and
# side by side manifests for a project match. To run this
# script, cd to a directory and run the script with cmake -P.
# On the command line you can pass in versions that are OK even
# if not found in the .manifest files. For example,
# cmake -Dallow_versions=8.0.50608.0 -PCmakeVerifyManifest.cmake
# could be used to allow an embeded manifest of 8.0.50608.0
# to be used in a project even if that version was not found
# in the .manifest file.
# This script first recursively globs *.manifest files from
# the current directory. Then globs *.exe and *.dll. Each
# .exe and .dll is scanned for embeded manifests and the versions
# of CRT are compared to those found in the .manifest files
# from the first glob.
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# crt_version:
# function to extract the CRT version from a file
# this can be passed a .exe, .dll, or a .manifest file
# it will put the list of versions found into the variable
# specified by list_var
function(crt_version file list_var)
file(STRINGS "${file}" strings REGEX "Microsoft.VC...CRT" NEWLINE_CONSUME)
foreach(s ${strings})
set(has_match 1)
string(REGEX
REPLACE ".*<assembly.*\"Microsoft.VC...CRT\".*version=\"([^\"]*)\".*</assembly>.*$" "\\1"
version "${s}")
if(NOT "${version}" STREQUAL "")
list(APPEND version_list ${version})
else()
message(FATAL_ERROR "Parse error could not find version in [${s}]")
endif()
endforeach(s)
if(NOT DEFINED has_match)
message("Information: no embeded manifest in: ${file}")
return()
endif()
list(APPEND version_list ${${list_var}})
list(REMOVE_DUPLICATES version_list)
if(version_list)
set(${list_var} ${version_list} PARENT_SCOPE)
endif()
endfunction(crt_version)
set(fatal_error FALSE)
# check_version:
#
# test a file against the shipped manifest versions
# for a directory
function(check_version file manifest_versions)
set(manifest_versions ${manifest_versions} ${allow_versions})
# collect versions for a given file
crt_version(${file} file_versions)
# see if the versions
foreach(ver ${file_versions})
list(FIND manifest_versions "${ver}" found_version)
if("${found_version}" EQUAL -1)
message("ERROR: ${file} uses ${ver} not found in shipped manifests:[${manifest_versions}].")
set(fatal_error TRUE PARENT_SCOPE)
endif()
endforeach(ver)
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}]")
endif()
endfunction()
# collect up the versions of CRT that are shipped
# in .manifest files
set(manifest_version_list )
file(GLOB_RECURSE manifest_files "*.manifest")
foreach(f ${manifest_files})
crt_version("${f}" manifest_version_list)
endforeach(f)
list(LENGTH manifest_version_list LEN)
if(LEN EQUAL 0)
message(FATAL_ERROR "No .manifest files found, no version check can be done.")
endif()
message("Versions found in ${manifest_files}: ${manifest_version_list}")
if(DEFINED allow_versions)
message("Extra versions allowed: ${allow_versions}")
endif()
# now find all .exe and .dll files
# and call check_version on each of them
file(GLOB_RECURSE exe_files "*.exe")
file(GLOB_RECURSE dll_files "*.dll")
set(exe_files ${exe_files} ${dll_files})
foreach(f ${exe_files})
check_version(${f} "${manifest_version_list}")
endforeach()
# report a fatal error if there were any so that cmake will return
# a non zero value
if(fatal_error)
message(FATAL_ERROR "This distribution embeds dll "
" versions that it does not ship, and may not work on other machines.")
endif()
set(CMAKE_Fortran_FLAGS_INIT "")
set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
set(CMAKE_Fortran_MODDIR_FLAG "-fmod=")
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
......@@ -45,7 +45,10 @@ UpdateCommand: @UPDATE_COMMAND@
UpdateOptions: @UPDATE_OPTIONS@
UpdateType: @UPDATE_TYPE@
# Dynamic analisys and coverage
# Compiler info
Compiler: @CMAKE_CXX_COMPILER@
# Dynamic analysis and coverage
PurifyCommand: @PURIFYCOMMAND@
ValgrindCommand: @VALGRIND_COMMAND@
ValgrindCommandOptions: @VALGRIND_COMMAND_OPTIONS@
......
......@@ -32,7 +32,7 @@
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
MACRO(SET_FEATURE_INFO _name _desc)
FUNCTION(SET_FEATURE_INFO _name _desc)
SET(_url "${ARGV2}")
SET(_comment "${ARGV3}")
SET_PROPERTY(GLOBAL PROPERTY ${_name}_DESCRIPTION "${_desc}" )
......@@ -42,10 +42,10 @@ MACRO(SET_FEATURE_INFO _name _desc)
IF(_comment MATCHES ".+")
SET_PROPERTY(GLOBAL PROPERTY ${_name}_COMMENT "${_comment}" )
ENDIF(_comment MATCHES ".+")
ENDMACRO(SET_FEATURE_INFO)
ENDFUNCTION(SET_FEATURE_INFO)
MACRO(_PRINT_FEATURES _property _text)
FUNCTION(_PRINT_FEATURES _property _text)
SET(_currentFeatureText "${_text}")
GET_PROPERTY(_EnabledFeatures GLOBAL PROPERTY ${_property})
FOREACH(_currentFeature ${_EnabledFeatures})
......@@ -64,15 +64,15 @@ MACRO(_PRINT_FEATURES _property _text)
ENDIF(_info)
ENDFOREACH(_currentFeature)
MESSAGE(STATUS "${_currentFeatureText}\n")
ENDMACRO(_PRINT_FEATURES)
ENDFUNCTION(_PRINT_FEATURES)
MACRO(PRINT_ENABLED_FEATURES)
FUNCTION(PRINT_ENABLED_FEATURES)
_PRINT_FEATURES( ENABLED_FEATURES "Enabled features:")
ENDMACRO(PRINT_ENABLED_FEATURES)
ENDFUNCTION(PRINT_ENABLED_FEATURES)
MACRO(PRINT_DISABLED_FEATURES)
FUNCTION(PRINT_DISABLED_FEATURES)
_PRINT_FEATURES( DISABLED_FEATURES "Disabled features:")
ENDMACRO(PRINT_DISABLED_FEATURES)
ENDFUNCTION(PRINT_DISABLED_FEATURES)
......@@ -569,6 +569,8 @@ ELSE (_boost_IN_CACHE)
endif()
elseif (MSVC90)
SET (_boost_COMPILER "-vc90")
elseif (MSVC10)
SET (_boost_COMPILER "-vc100")
elseif (MSVC80)
SET (_boost_COMPILER "-vc80")
elseif (MSVC71)
......
......@@ -469,8 +469,8 @@ endif (NOT CUDA_TOOLKIT_ROOT_DIR)
# CUDA_NVCC_EXECUTABLE
find_program(CUDA_NVCC_EXECUTABLE
NAMES nvcc
PATHS "${CUDA_TOOLKIT_ROOT_DIR}/bin64"
"${CUDA_TOOLKIT_ROOT_DIR}/bin"
PATHS "${CUDA_TOOLKIT_ROOT_DIR}/bin"
"${CUDA_TOOLKIT_ROOT_DIR}/bin64"
ENV CUDA_BIN_PATH
NO_DEFAULT_PATH
)
......
......@@ -67,11 +67,14 @@ SET(JAVA_AWT_LIBRARY_DIRECTORIES
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/lib"
)
FILE(TO_CMAKE_PATH "$ENV{JAVA_HOME}" _JAVA_HOME)
JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES
$ENV{JAVA_HOME}/jre/lib/{libarch}
$ENV{JAVA_HOME}/jre/lib
$ENV{JAVA_HOME}/lib
$ENV{JAVA_HOME}
${_JAVA_HOME}/jre/lib/{libarch}
${_JAVA_HOME}/jre/lib
${_JAVA_HOME}/lib
${_JAVA_HOME}
/usr/lib
/usr/local/lib
/usr/lib/jvm/java/lib
......@@ -106,7 +109,7 @@ SET(JAVA_AWT_INCLUDE_DIRECTORIES
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/include"
$ENV{JAVA_HOME}/include
${_JAVA_HOME}/include
/usr/include
/usr/local/include
/usr/lib/java/include
......
This diff is collapsed.
......@@ -96,13 +96,22 @@ if(OSG_INCLUDE_DIR)
message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
"Detected OSG_INCLUDE_DIR = ${OSG_INCLUDE_DIR}")
endif()
file(READ "${OSG_INCLUDE_DIR}/osg/Version" _osg_Version_contents)
set(_osg_Version_file "${OSG_INCLUDE_DIR}/osg/Version")
if("${OSG_INCLUDE_DIR}" MATCHES "\\.framework$" AND NOT EXISTS "${_osg_Version_file}")
set(_osg_Version_file "${OSG_INCLUDE_DIR}/Headers/Version")
endif()
if(EXISTS "${_osg_Version_file}")
file(READ "${_osg_Version_file}" _osg_Version_contents)
else()
set(_osg_Version_contents "unknown")
endif()
string(REGEX MATCH ".*#define OSG_VERSION_MAJOR[ \t]+[0-9]+.*"
_osg_old_defines ${_osg_Version_contents})
_osg_old_defines "${_osg_Version_contents}")
string(REGEX MATCH ".*#define OPENSCENEGRAPH_MAJOR_VERSION[ \t]+[0-9]+.*"
_osg_new_defines ${_osg_Version_contents})
_osg_new_defines "${_osg_Version_contents}")
if(_osg_old_defines)
string(REGEX REPLACE ".*#define OSG_VERSION_MAJOR[ \t]+([0-9]+).*"
"\\1" _osg_VERSION_MAJOR ${_osg_Version_contents})
......
......@@ -41,8 +41,6 @@ FOREACH(_CURRENT_VERSION 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
PATH_SUFFIXES
python${_CURRENT_VERSION}/config
# Avoid finding the .dll in the PATH. We want the .lib.
NO_SYSTEM_ENVIRONMENT_PATH
)
......
......@@ -3,27 +3,27 @@
# This module can be used to find Squish (currently support is aimed at version 3).
#
# ---- Variables and Macros
# SQUISH_FOUND If false, don't try to use Squish
# SQUISH_VERSION_MAJOR The major version of Squish found
# SQUISH_VERSION_MINOR The minor version of Squish found
# SQUISH_VERSION_PATCH The patch version of Squish found
# SQUISH_FOUND If false, don't try to use Squish
# SQUISH_VERSION_MAJOR The major version of Squish found
# SQUISH_VERSION_MINOR The minor version of Squish found
# SQUISH_VERSION_PATCH The patch version of Squish found
#
# SQUISH_INSTALL_DIR The Squish installation directory (containing bin, lib, etc)
# SQUISH_SERVER_EXECUTABLE The squishserver executable
# SQUISH_CLIENT_EXECUTABLE The squishrunner executable
# SQUISH_INSTALL_DIR The Squish installation directory (containing bin, lib, etc)
# SQUISH_SERVER_EXECUTABLE The squishserver executable
# SQUISH_CLIENT_EXECUTABLE The squishrunner executable
#
# SQUISH_INSTALL_DIR_FOUND Was the install directory found?
# SQUISH_SERVER_EXECUTABLE_FOUND Was the server executable found?
# SQUISH_CLIENT_EXECUTABLE_FOUND Was the client executable found?
# SQUISH_INSTALL_DIR_FOUND Was the install directory found?
# SQUISH_SERVER_EXECUTABLE_FOUND Was the server executable found?
# SQUISH_CLIENT_EXECUTABLE_FOUND Was the client executable found?
#
# macro SQUISH_ADD_TEST(testName applicationUnderTest testSuite testCase)
#
# ---- Typical Use
# ENABLE_TESTING()
# FIND_PACKAGE(Squish)
# IF (SQUISH_FOUND)
# SQUISH_ADD_TEST(myTestName myApplication testSuiteName testCaseName)
# ENDIF (SQUISH_FOUND)
# ENABLE_TESTING()
# FIND_PACKAGE(Squish)
# IF (SQUISH_FOUND)
# SQUISH_ADD_TEST(myTestName myApplication testSuiteName testCaseName)
# ENDIF (SQUISH_FOUND)
#
#=============================================================================
......
......@@ -18,7 +18,7 @@
Var ADD_TO_PATH_ALL_USERS
Var ADD_TO_PATH_CURRENT_USER
Var INSTALL_DESKTOP
Var IS_DEFAULT_INSTALLDIR
;--------------------------------
;Include Modern UI
......@@ -892,8 +892,19 @@ Function .onInit
; Reads components status for registry
!insertmacro SectionList "InitSection"
; check to see if /D has been used to change
; the install directory by comparing it to the
; install directory that is expected to be the
; default
StrCpy $IS_DEFAULT_INSTALLDIR 0
StrCmp "$INSTDIR" "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
StrCpy $IS_DEFAULT_INSTALLDIR 1
StrCpy $SV_ALLUSERS "JustMe"
StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
; if default install dir then change the default
; if it is installed for JustMe
StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
ClearErrors
UserInfo::GetName
......@@ -917,8 +928,9 @@ Function .onInit
;Get installation folder from registry if available
done:
StrCmp $SV_ALLUSERS "AllUsers" 0 +2
StrCpy $INSTDIR "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
StrCmp $SV_ALLUSERS "AllUsers" 0 +3
StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
StrCpy $INSTDIR "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"
......
......@@ -8,7 +8,7 @@ IF(XIAR)
ENDIF(XIAR)
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared")
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared -i_dynamic -nofor_main")
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-i_dynamic")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,-rpath,")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":")
......
......@@ -20,4 +20,5 @@ SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-O1")
SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2")
SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-02 -g")
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"<CMAKE_Fortran_COMPILER> <CMAKE_SHARED_LIBRARY_Fortran_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
......@@ -12,7 +12,7 @@ SET(CMAKE_Fortran_MODDIR_FLAG "-module:")
SET(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"link ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /dll <LINK_FLAGS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
"link ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /dll <LINK_FLAGS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
......@@ -26,7 +26,7 @@ SET(CMAKE_Fortran_COMPILE_OBJECT
SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
SET(CMAKE_Fortran_LINK_EXECUTABLE
"<CMAKE_Fortran_COMPILER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> -link <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
"<CMAKE_Fortran_COMPILER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> -link /implib:<TARGET_IMPLIB> <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
INCLUDE(Platform/Windows-Intel)
......
......@@ -303,6 +303,8 @@ IF (WIN32)
cmLocalVisualStudio10Generator.h
cmGlobalVisualStudio10Generator.h
cmGlobalVisualStudio10Generator.cxx
cmGlobalVisualStudio10Win64Generator.h
cmGlobalVisualStudio10Win64Generator.cxx
cmGlobalVisualStudioGenerator.cxx
cmGlobalVisualStudioGenerator.h
cmGlobalWatcomWMakeGenerator.cxx
......
......@@ -23,7 +23,6 @@
#include <cmsys/SystemTools.hxx>
#include <cm_zlib.h>
#include <libtar/libtar.h>
#include <memory> // auto_ptr
#include <fcntl.h>
#include <errno.h>
......@@ -219,9 +218,8 @@ int cmCPackTGZGenerator::CompressFiles(const char* outFileName,
&mydata
};
// Ok, this libtar is not const safe. for now use auto_ptr hack
// Ok, this libtar is not const safe. Make a non-const copy of outFileName
char* realName = new char[ strlen(outFileName) + 1 ];
std::auto_ptr<char> realNamePtr(realName);
strcpy(realName, outFileName);
int flags = O_WRONLY | O_CREAT;
int options = 0;
......@@ -239,6 +237,7 @@ int cmCPackTGZGenerator::CompressFiles(const char* outFileName,
{
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem with tar_open(): "
<< strerror(errno) << std::endl);
delete [] realName;
return 0;
}
......@@ -257,6 +256,7 @@ int cmCPackTGZGenerator::CompressFiles(const char* outFileName,
<< pathname << "\"): "
<< strerror(errno) << std::endl);
tar_close(t);
delete [] realName;
return 0;
}
}
......@@ -265,6 +265,7 @@ int cmCPackTGZGenerator::CompressFiles(const char* outFileName,
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem with tar_append_eof(): "
<< strerror(errno) << std::endl);
tar_close(t);
delete [] realName;
return 0;
}
......@@ -272,8 +273,10 @@ int cmCPackTGZGenerator::CompressFiles(const char* outFileName,
{
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem with tar_close(): "
<< strerror(errno) << std::endl);
delete [] realName;
return 0;
}
delete [] realName;
return 1;
}
......
......@@ -25,7 +25,7 @@ cmCTestBatchTestHandler::~cmCTestBatchTestHandler()
void cmCTestBatchTestHandler::RunTests()
{
this->WriteBatchScript();
//this->SubmitBatchScript();
this->SubmitBatchScript();
}
//---------------------------------------------------------
......@@ -128,16 +128,16 @@ void cmCTestBatchTestHandler::SubmitBatchScript()
args.push_back(this->Script);
args.push_back("-o");
args.push_back(this->CTest->GetBinaryDir()
+ "/Testing/CTestBatchOutput.txt");
+ "/Testing/CTestBatch.txt");
sbatch.SetCommand("sbatch");
sbatch.SetCommandArguments(args);
if(sbatch.StartProcess())
/*if(sbatch.StartProcess())
{
//success condition
}
else
{
//fail condition
}
}*/
}
......@@ -251,7 +251,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
tarIt != this->BuildTargets.end(); ++ tarIt )
{
double remainingTime = 0;
if (this->Timeout)
if (this->Timeout > 0)
{
remainingTime = this->Timeout - cmSystemTools::GetTime() + clock_start;
if (remainingTime <= 0)
......@@ -376,7 +376,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
// how much time is remaining
double remainingTime = 0;
if (this->Timeout)
if (this->Timeout > 0)
{
remainingTime = this->Timeout - cmSystemTools::GetTime() + clock_start;
if (remainingTime <= 0)
......
This diff is collapsed.
......@@ -81,6 +81,10 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test)
cmCTestRunTest* testRun = new cmCTestRunTest(this->TestHandler);
testRun->SetIndex(test);
testRun->SetTestProperties(this->Properties[test]);
std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory();
cmSystemTools::ChangeDirectory(this->Properties[test]->Directory.c_str());
if(testRun->StartTest(this->Total))
{
this->RunningTests.insert(testRun);
......@@ -92,6 +96,7 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test)
testRun->EndTest(this->Completed, this->Total, false);
this->Failed->push_back(this->Properties[test]->Name);
}
cmSystemTools::ChangeDirectory(current_dir.c_str());
}
//---------------------------------------------------------
......@@ -339,6 +344,9 @@ void cmCTestMultiProcessHandler::PrintTestList()
{
count++;
cmCTestTestHandler::cmCTestTestProperties& p = *it->second;
//push working dir
std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory();
cmSystemTools::ChangeDirectory(p.Directory.c_str());
cmCTestRunTest testRun(this->TestHandler);
testRun.SetIndex(p.Index);
......@@ -360,6 +368,8 @@ void cmCTestMultiProcessHandler::PrintTestList()
<< indexStr.str().c_str());
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
cmCTestLog(this->CTest, HANDLER_OUTPUT, p.Name.c_str() << std::endl);
//pop working dir
cmSystemTools::ChangeDirectory(current_dir.c_str());
}
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl << "Total Tests: "
<< this->Total << std::endl);
......
......@@ -301,7 +301,7 @@ bool cmCTestRunTest::StartTest(size_t total)
{
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(2*getNumWidth(total) + 8)
<< "Start "
<< std::setw(getNumWidth(total))
<< std::setw(getNumWidth(this->TestHandler->GetMaxIndex()))
<< this->TestProperties->Index << ": "
<< this->TestProperties->Name << std::endl);
this->ComputeArguments();
......@@ -419,11 +419,11 @@ bool cmCTestRunTest::CreateProcess(double testTimeOut,
// determine how much time we have
double timeout = this->CTest->GetRemainingTimeAllowed() - 120;
if (this->CTest->GetTimeOut() && this->CTest->GetTimeOut() < timeout)
if (this->CTest->GetTimeOut() > 0 && this->CTest->GetTimeOut() < timeout)
{
timeout = this->CTest->GetTimeOut();
}
if (testTimeOut
if (testTimeOut > 0
&& testTimeOut < this->CTest->GetRemainingTimeAllowed())
{
timeout = testTimeOut;
......
......@@ -16,11 +16,6 @@
#include <QTranslator>
#include <QLocale>
#include "QMacInstallDialog.h"
#ifdef Q_OS_WIN
#include "windows.h" // for SetErrorMode
#endif
#include "CMakeSetupDialog.h"
#include "cmDocumentation.h"
#include "cmake.h"
......@@ -103,10 +98,6 @@ int main(int argc, char** argv)
}
QApplication app(argc, argv);
#ifdef Q_OS_WIN