summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindHDF5.cmake19
-rw-r--r--Modules/FindJava.cmake5
-rw-r--r--Modules/FindX11.cmake53
-rw-r--r--Modules/Platform/AIX-VisualAge-Fortran.cmake1
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx11
-rw-r--r--Source/CTest/cmCTestTestHandler.h13
-rw-r--r--Source/cmComputeTargetDepends.cxx8
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx45
-rw-r--r--Source/cmLocalVisualStudio10Generator.cxx16
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx4
-rw-r--r--Source/cmLocalVisualStudio7Generator.h3
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx7
-rw-r--r--Source/cmXCodeObject.cxx2
-rw-r--r--Source/kwsys/hash_fun.hxx.in24
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake2
-rw-r--r--Tests/CMakeLists.txt6
-rw-r--r--Tests/FortranOnly/CMakeLists.txt42
-rw-r--r--Tests/FortranOnly/checksayhello.cmake7
-rw-r--r--Tests/FortranOnly/checktestf2.cmake8
-rw-r--r--Tests/FortranOnly/hello.f5
-rw-r--r--Tests/FortranOnly/testf.f6
-rw-r--r--Tests/FortranOnly/world.f5
22 files changed, 229 insertions, 63 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 6f01ea0..bc60638 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -10,8 +10,8 @@
# are specified, then the find module will default to finding only the HDF5 C
# library. If one or more COMPONENTS are specified, the module will attempt to
# find the language bindings for the specified components. The only valid
-# components are C, CXX, Fortran, and HL. If the COMPONENTS argument is not
-# given, the module will attempt to find only the C bindings.
+# components are C, CXX, Fortran, HL, and Fortran_HL. If the COMPONENTS
+# argument is not given, the module will attempt to find only the C bindings.
#
# On UNIX systems, this module will read the variable HDF5_USE_STATIC_LIBRARIES
# to determine whether or not to prefer a static link to a dynamic link for HDF5
@@ -34,6 +34,8 @@
# HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings
# HDF5_Fortran_LIBRARIES - Required libraries for the HDF5 Fortran bindings
# HDF5_HL_LIBRARIES - Required libraries for the HDF5 high level API
+# HDF5_Fortran_HL_LIBRARIES - Required libraries for the high level Fortran
+# bindings.
# HDF5_LIBRARIES - Required libraries for all requested bindings
# HDF5_FOUND - true if HDF5 was found on the system
# HDF5_LIBRARY_DIRS - the full set of library directories
@@ -67,6 +69,7 @@ set( HDF5_VALID_COMPONENTS
CXX
Fortran
HL
+ Fortran_HL
)
# Validate the list of find components.
@@ -189,6 +192,7 @@ if( NOT HDF5_FOUND )
set( HDF5_CXX_TARGET hdf5_cpp )
set( HDF5_HL_TARGET hdf5_hl )
set( HDF5_Fortran_TARGET hdf5_fortran )
+ set( HDF5_Fortran_HL_TARGET hdf5_hl_fortran )
foreach( _component ${HDF5_LANGUAGE_BINDINGS} )
list( FIND HDF5_VALID_COMPONENTS ${_component} _component_location )
get_target_property( _comp_location ${HDF5_${_component}_TARGET} LOCATION )
@@ -211,7 +215,10 @@ if( NOT HDF5_FOUND )
set( HDF5_C_LIBRARY_NAMES_INIT hdf5 )
set( HDF5_HL_LIBRARY_NAMES_INIT hdf5_hl ${HDF5_C_LIBRARY_NAMES_INIT} )
set( HDF5_CXX_LIBRARY_NAMES_INIT hdf5_cpp ${HDF5_C_LIBRARY_NAMES_INIT} )
- set( HDF5_Fortran_LIBRARY_NAMES_INIT hdf5_fortran ${HDF5_C_LIBRARY_NAMES_INIT} )
+ set( HDF5_Fortran_LIBRARY_NAMES_INIT hdf5_fortran
+ ${HDF5_C_LIBRARY_NAMES_INIT} )
+ set( HDF5_Fortran_HL_LIBRARY_NAMES_INIT hdf5hl_fortran
+ ${HDF5_Fortran_LIBRARY_NAMES_INIT} )
foreach( LANGUAGE ${HDF5_LANGUAGE_BINDINGS} )
if( HDF5_${LANGUAGE}_COMPILE_LINE )
@@ -222,8 +229,8 @@ if( NOT HDF5_FOUND )
HDF5_${LANGUAGE}_LIBRARY_NAMES
)
- # take a guess that the includes may be in the 'include' sibling directory
- # of a library directory.
+ # take a guess that the includes may be in the 'include' sibling
+ # directory of a library directory.
foreach( dir ${HDF5_${LANGUAGE}_LIBRARY_DIRS} )
list( APPEND HDF5_${LANGUAGE}_INCLUDE_FLAGS ${dir}/../include )
endforeach()
@@ -233,7 +240,7 @@ if( NOT HDF5_FOUND )
list( APPEND HDF5_DEFINITIONS ${HDF5_${LANGUAGE}_DEFINITIONS} )
# find the HDF5 include directories
- if(${LANGUAGE} STREQUAL "Fortran")
+ if(${LANGUAGE} MATCHES "Fortran.*")
set(HDF5_INCLUDE_FILENAME hdf5.mod)
else()
set(HDF5_INCLUDE_FILENAME hdf5.h)
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index 1b11a34..34a7077 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -130,11 +130,6 @@ IF(Java_JAVA_EXECUTABLE)
else( )
set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH}.${Java_VERSION_TWEAK})
endif( )
- # display info
- #MESSAGE( STATUS "Java version ${Java_VERSION_STRING} configured successfully!" ) # keep me, used for debug
- IF(NOT Java_FIND_QUIETLY)
- MESSAGE( STATUS "Java version ${Java_VERSION} configured successfully!" )
- ENDIF(NOT Java_FIND_QUIETLY)
ENDIF()
ENDIF(Java_JAVA_EXECUTABLE)
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index df44979..9df3f01 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -6,6 +6,7 @@
#
# and also the following more fine grained variables:
# Include paths: X11_ICE_INCLUDE_PATH, X11_ICE_LIB, X11_ICE_FOUND
+# X11_SM_INCLUDE_PATH, X11_SM_LIB, X11_SM_FOUND
# X11_X11_INCLUDE_PATH, X11_X11_LIB
# X11_Xaccessrules_INCLUDE_PATH, X11_Xaccess_FOUND
# X11_Xaccessstr_INCLUDE_PATH, X11_Xaccess_FOUND
@@ -27,6 +28,7 @@
# X11_Xinput_INCLUDE_PATH, X11_Xinput_LIB, X11_Xinput_FOUND
# X11_Xkb_INCLUDE_PATH, X11_Xkb_FOUND
# X11_Xkblib_INCLUDE_PATH, X11_Xkb_FOUND
+# X11_Xkbfile_INCLUDE_PATH, X11_Xkbfile_LIB, X11_Xkbfile_FOUND
# X11_Xpm_INCLUDE_PATH, X11_Xpm_LIB, X11_Xpm_FOUND
# X11_XTest_INCLUDE_PATH, X11_XTest_LIB, X11_XTest_FOUND
# X11_Xrandr_INCLUDE_PATH, X11_Xrandr_LIB, X11_Xrandr_FOUND
@@ -35,6 +37,8 @@
# X11_Xt_INCLUDE_PATH, X11_Xt_LIB, X11_Xt_FOUND
# X11_Xutil_INCLUDE_PATH, X11_Xutil_FOUND
# X11_Xv_INCLUDE_PATH, X11_Xv_LIB, X11_Xv_FOUND
+# X11_XSync_INCLUDE_PATH, (in X11_Xext_LIB), X11_XSync_FOUND
+
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
@@ -57,11 +61,11 @@ IF (UNIX)
SET(CMAKE_FIND_FRAMEWORK NEVER)
SET(X11_INC_SEARCH_PATH
/usr/pkg/xorg/include
- /usr/X11R6/include
- /usr/X11R7/include
+ /usr/X11R6/include
+ /usr/X11R7/include
/usr/include/X11
- /usr/openwin/include
- /usr/openwin/share/include
+ /usr/openwin/include
+ /usr/openwin/share/include
/opt/graphics/OpenGL/include
)
@@ -69,7 +73,7 @@ IF (UNIX)
/usr/pkg/xorg/lib
/usr/X11R6/lib
/usr/X11R7/lib
- /usr/openwin/lib
+ /usr/openwin/lib
)
FIND_PATH(X11_X11_INCLUDE_PATH X11/X.h ${X11_INC_SEARCH_PATH})
@@ -77,9 +81,10 @@ IF (UNIX)
# Look for includes; keep the list sorted by name of the cmake *_INCLUDE_PATH
# variable (which doesn't need to match the include file name).
-
+
# Solaris lacks XKBrules.h, so we should skip kxkbd there.
FIND_PATH(X11_ICE_INCLUDE_PATH X11/ICE/ICE.h ${X11_INC_SEARCH_PATH})
+ FIND_PATH(X11_SM_INCLUDE_PATH X11/SM/SM.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xaccessrules_INCLUDE_PATH X11/extensions/XKBrules.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xaccessstr_INCLUDE_PATH X11/extensions/XKBstr.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xau_INCLUDE_PATH X11/Xauth.h ${X11_INC_SEARCH_PATH})
@@ -97,6 +102,7 @@ IF (UNIX)
FIND_PATH(X11_Xinput_INCLUDE_PATH X11/extensions/XInput.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xkb_INCLUDE_PATH X11/extensions/XKB.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xkblib_INCLUDE_PATH X11/XKBlib.h ${X11_INC_SEARCH_PATH})
+ FIND_PATH(X11_Xkbfile_INCLUDE_PATH X11/extensions/XKBfile.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xpm_INCLUDE_PATH X11/xpm.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_XTest_INCLUDE_PATH X11/extensions/XTest.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_XShm_INCLUDE_PATH X11/extensions/XShm.h ${X11_INC_SEARCH_PATH})
@@ -107,6 +113,7 @@ IF (UNIX)
FIND_PATH(X11_Xutil_INCLUDE_PATH X11/Xutil.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xt_INCLUDE_PATH X11/Intrinsic.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xv_INCLUDE_PATH X11/extensions/Xvlib.h ${X11_INC_SEARCH_PATH})
+ FIND_PATH(X11_XSync_INCLUDE_PATH X11/extensions/sync.h ${X11_INC_SEARCH_PATH})
FIND_LIBRARY(X11_X11_LIB X11 ${X11_LIB_SEARCH_PATH})
@@ -125,6 +132,7 @@ IF (UNIX)
FIND_LIBRARY(X11_Xi_LIB Xi ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xinerama_LIB Xinerama ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xinput_LIB Xi ${X11_LIB_SEARCH_PATH})
+ FIND_LIBRARY(X11_Xkbfile_LIB xkbfile ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xpm_LIB Xpm ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xrandr_LIB Xrandr ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
@@ -277,15 +285,30 @@ IF (UNIX)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkb_INCLUDE_PATH} )
ENDIF (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH)
+ IF (X11_Xkbfile_INCLUDE_PATH AND X11_Xkbfile_LIB AND X11_Xlib_INCLUDE_PATH)
+ SET(X11_Xkbfile_FOUND TRUE)
+ SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkbfile_INCLUDE_PATH} )
+ ENDIF (X11_Xkbfile_INCLUDE_PATH AND X11_Xkbfile_LIB AND X11_Xlib_INCLUDE_PATH)
+
IF (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB)
SET(X11_Xinput_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinput_INCLUDE_PATH})
ENDIF (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB)
+ IF (X11_XSync_INCLUDE_PATH)
+ SET(X11_XSync_FOUND TRUE)
+ SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XSync_INCLUDE_PATH})
+ ENDIF (X11_XSync_INCLUDE_PATH)
+
IF(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH)
SET(X11_ICE_FOUND TRUE)
ENDIF(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH)
+ IF(X11_SM_LIB AND X11_SM_INCLUDE_PATH)
+ SET(X11_SM_FOUND TRUE)
+ ENDIF(X11_SM_LIB AND X11_SM_INCLUDE_PATH)
+
+
# Deprecated variable for backwards compatibility with CMake 1.4
IF (X11_X11_INCLUDE_PATH AND X11_LIBRARIES)
SET(X11_FOUND 1)
@@ -306,11 +329,11 @@ IF (UNIX)
CHECK_LIBRARY_EXISTS("${X11_LIBRARIES}" "XOpenDisplay" "${X11_LIBRARY_DIR}" X11_LIB_X11_SOLO)
IF(NOT X11_LIB_X11_SOLO)
# Find library needed for dnet_ntoa.
- CHECK_LIBRARY_EXISTS("dnet" "dnet_ntoa" "" X11_LIB_DNET_HAS_DNET_NTOA)
+ CHECK_LIBRARY_EXISTS("dnet" "dnet_ntoa" "" X11_LIB_DNET_HAS_DNET_NTOA)
IF (X11_LIB_DNET_HAS_DNET_NTOA)
SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -ldnet)
ELSE (X11_LIB_DNET_HAS_DNET_NTOA)
- CHECK_LIBRARY_EXISTS("dnet_stub" "dnet_ntoa" "" X11_LIB_DNET_STUB_HAS_DNET_NTOA)
+ CHECK_LIBRARY_EXISTS("dnet_stub" "dnet_ntoa" "" X11_LIB_DNET_STUB_HAS_DNET_NTOA)
IF (X11_LIB_DNET_STUB_HAS_DNET_NTOA)
SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -ldnet_stub)
ENDIF (X11_LIB_DNET_STUB_HAS_DNET_NTOA)
@@ -320,11 +343,11 @@ IF (UNIX)
# Find library needed for gethostbyname.
CHECK_FUNCTION_EXISTS("gethostbyname" CMAKE_HAVE_GETHOSTBYNAME)
IF(NOT CMAKE_HAVE_GETHOSTBYNAME)
- CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
+ CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
IF (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lnsl)
ELSE (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
- CHECK_LIBRARY_EXISTS("bsd" "gethostbyname" "" CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
+ CHECK_LIBRARY_EXISTS("bsd" "gethostbyname" "" CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
IF (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lbsd)
ENDIF (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
@@ -334,7 +357,7 @@ IF (UNIX)
# Find library needed for connect.
CHECK_FUNCTION_EXISTS("connect" CMAKE_HAVE_CONNECT)
IF(NOT CMAKE_HAVE_CONNECT)
- CHECK_LIBRARY_EXISTS("socket" "connect" "" CMAKE_LIB_SOCKET_HAS_CONNECT)
+ CHECK_LIBRARY_EXISTS("socket" "connect" "" CMAKE_LIB_SOCKET_HAS_CONNECT)
IF (CMAKE_LIB_SOCKET_HAS_CONNECT)
SET (X11_X_EXTRA_LIBS -lsocket ${X11_X_EXTRA_LIBS})
ENDIF (CMAKE_LIB_SOCKET_HAS_CONNECT)
@@ -343,7 +366,7 @@ IF (UNIX)
# Find library needed for remove.
CHECK_FUNCTION_EXISTS("remove" CMAKE_HAVE_REMOVE)
IF(NOT CMAKE_HAVE_REMOVE)
- CHECK_LIBRARY_EXISTS("posix" "remove" "" CMAKE_LIB_POSIX_HAS_REMOVE)
+ CHECK_LIBRARY_EXISTS("posix" "remove" "" CMAKE_LIB_POSIX_HAS_REMOVE)
IF (CMAKE_LIB_POSIX_HAS_REMOVE)
SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lposix)
ENDIF (CMAKE_LIB_POSIX_HAS_REMOVE)
@@ -352,7 +375,7 @@ IF (UNIX)
# Find library needed for shmat.
CHECK_FUNCTION_EXISTS("shmat" CMAKE_HAVE_SHMAT)
IF(NOT CMAKE_HAVE_SHMAT)
- CHECK_LIBRARY_EXISTS("ipc" "shmat" "" CMAKE_LIB_IPS_HAS_SHMAT)
+ CHECK_LIBRARY_EXISTS("ipc" "shmat" "" CMAKE_LIB_IPS_HAS_SHMAT)
IF (CMAKE_LIB_IPS_HAS_SHMAT)
SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lipc)
ENDIF (CMAKE_LIB_IPS_HAS_SHMAT)
@@ -422,6 +445,8 @@ IF (UNIX)
X11_Xdmcp_INCLUDE_PATH
X11_Xkb_INCLUDE_PATH
X11_Xkblib_INCLUDE_PATH
+ X11_Xkbfile_INCLUDE_PATH
+ X11_Xkbfile_LIB
X11_Xscreensaver_INCLUDE_PATH
X11_Xscreensaver_LIB
X11_Xpm_INCLUDE_PATH
@@ -437,6 +462,8 @@ IF (UNIX)
X11_ICE_LIB
X11_ICE_INCLUDE_PATH
X11_SM_LIB
+ X11_SM_INCLUDE_PATH
+ X11_XSync_INCLUDE_PATH
)
SET(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE})
ENDIF (UNIX)
diff --git a/Modules/Platform/AIX-VisualAge-Fortran.cmake b/Modules/Platform/AIX-VisualAge-Fortran.cmake
new file mode 100644
index 0000000..19e59d6
--- /dev/null
+++ b/Modules/Platform/AIX-VisualAge-Fortran.cmake
@@ -0,0 +1 @@
+include(Platform/AIX-XL-Fortran)
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index b824e47..9b12393 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -33,6 +33,7 @@
#include <float.h>
#include <memory> // auto_ptr
+#include <set>
//----------------------------------------------------------------------
class cmCTestSubdirCommand : public cmCommand
@@ -617,9 +618,13 @@ int cmCTestTestHandler::ProcessHandler()
<< "The following tests FAILED:" << std::endl);
this->StartLogFile("TestsFailed", ofs);
- std::vector<cmCTestTestHandler::cmCTestTestResult>::iterator ftit;
- for(ftit = this->TestResults.begin();
- ftit != this->TestResults.end(); ++ftit)
+ typedef std::set<cmCTestTestHandler::cmCTestTestResult,
+ cmCTestTestResultLess> SetOfTests;
+ SetOfTests resultsSet(this->TestResults.begin(),
+ this->TestResults.end());
+
+ for(SetOfTests::iterator ftit = resultsSet.begin();
+ ftit != resultsSet.end(); ++ftit)
{
if ( ftit->Status != cmCTestTestHandler::COMPLETED )
{
diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h
index 3089d35..8e59e59 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -125,7 +125,16 @@ public:
cmCTestTestProperties* Properties;
};
- // add configuraitons to a search path for an executable
+ struct cmCTestTestResultLess
+ {
+ bool operator() (const cmCTestTestResult &lhs,
+ const cmCTestTestResult &rhs) const
+ {
+ return lhs.TestCount < rhs.TestCount;
+ }
+ };
+
+ // add configurations to a search path for an executable
static void AddConfigurations(cmCTest *ctest,
std::vector<std::string> &attempted,
std::vector<std::string> &attemptedConfigs,
@@ -141,7 +150,7 @@ public:
typedef std::vector<cmCTestTestProperties> ListOfTests;
protected:
- // comput a final test list
+ // compute a final test list
virtual int PreProcessHandler();
virtual int PostProcessHandler();
virtual void GenerateTestCommand(std::vector<std::string>& args);
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index a4ca363..3a0ed06 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -276,9 +276,11 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
for(std::set<cmStdString>::const_iterator i = utils.begin();
i != utils.end(); ++i)
{
- cmTarget* transitive_dependee =
- dependee->GetMakefile()->FindTargetToUse(i->c_str());
- this->AddTargetDepend(depender_index, transitive_dependee, false);
+ if(cmTarget* transitive_dependee =
+ dependee->GetMakefile()->FindTargetToUse(i->c_str()))
+ {
+ this->AddTargetDepend(depender_index, transitive_dependee, false);
+ }
}
}
else
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index b3e2e7a..fd9dacd 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -336,6 +336,9 @@ cmGlobalXCodeGenerator::PostBuildMakeTarget(std::string const& tName,
}
//----------------------------------------------------------------------------
+#define CMAKE_CHECK_BUILD_SYSTEM_TARGET "ZERO_CHECK"
+
+//----------------------------------------------------------------------------
void
cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& gens)
@@ -366,8 +369,18 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
makecommand.push_back(this->CurrentXCodeHackMakefile.c_str());
makecommand.push_back(""); // placeholder, see below
- // Add Re-Run CMake rules
- this->CreateReRunCMakeFile(root, gens);
+ // Add ZERO_CHECK
+ bool regenerate = !mf->IsOn("CMAKE_SUPPRESS_REGENERATION");
+ if (regenerate)
+ {
+ this->CreateReRunCMakeFile(root, gens);
+ std::string file = this->ConvertToRelativeForMake(
+ this->CurrentReRunCMakeMakefile.c_str());
+ cmSystemTools::ReplaceString(file, "\\ ", " ");
+ mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, true, no_depends,
+ no_working_directory,
+ "make", "-f", file.c_str());
+ }
// now make the allbuild depend on all the non-utility targets
// in the project
@@ -379,10 +392,17 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
{
continue;
}
+
cmTargets& tgts = lg->GetMakefile()->GetTargets();
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++)
{
cmTarget& target = l->second;
+
+ if (regenerate && (l->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET))
+ {
+ target.AddUtility(CMAKE_CHECK_BUILD_SYSTEM_TARGET);
+ }
+
// make all exe, shared libs and modules
// run the depend check makefile as a post build rule
// this will make sure that when the next target is built
@@ -402,8 +422,8 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
cmTarget::POST_BUILD,
"Depend check for xcode",
dir.c_str());
-
}
+
if(!target.GetPropertyAsBool("EXCLUDE_FROM_ALL"))
{
allbuild->AddUtility(target.GetName());
@@ -1114,11 +1134,6 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases,
commands.push_back(*(*i)->GetCustomCommand());
}
}
- std::vector<cmCustomCommand> reruncom;
- cmXCodeObject* cmakeReRunPhase =
- this->CreateBuildPhase("CMake ReRun", "cmakeReRunPhase",
- cmtarget, reruncom);
- buildPhases->AddObject(cmakeReRunPhase);
// create prebuild phase
cmXCodeObject* cmakeRulesBuildPhase =
this->CreateBuildPhase("CMake Rules",
@@ -1207,20 +1222,6 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
const & commands,
const char* name)
{
- if(strcmp(name, "cmakeReRunPhase") == 0)
- {
- std::string cdir = this->CurrentMakefile->GetHomeOutputDirectory();
- cdir = this->ConvertToRelativeForMake(cdir.c_str());
- std::string makecmd = "make -C ";
- makecmd += cdir;
- makecmd += " -f ";
- makecmd +=
- this->ConvertToRelativeForMake(this->CurrentReRunCMakeMakefile.c_str());
- cmSystemTools::ReplaceString(makecmd, "\\ ", "\\\\ ");
- buildphase->AddAttribute("shellScript",
- this->CreateString(makecmd.c_str()));
- return;
- }
// collect multiple outputs of custom commands into a set
// which will be used for every configuration
diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx
index 1850c16..ef378f9 100644
--- a/Source/cmLocalVisualStudio10Generator.cxx
+++ b/Source/cmLocalVisualStudio10Generator.cxx
@@ -93,10 +93,18 @@ void cmLocalVisualStudio10Generator::Generate()
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
{
- cmVisualStudio10TargetGenerator tg(
- &l->second, static_cast<cmGlobalVisualStudio10Generator*>(
- this->GetGlobalGenerator()));
- tg.Generate();
+ if(static_cast<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator)
+ ->TargetIsFortranOnly(l->second))
+ {
+ this->CreateSingleVCProj(l->first.c_str(),l->second);
+ }
+ else
+ {
+ cmVisualStudio10TargetGenerator tg(
+ &l->second, static_cast<cmGlobalVisualStudio10Generator*>(
+ this->GetGlobalGenerator()));
+ tg.Generate();
+ }
}
this->WriteStampFiles();
}
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 3e76f59..525a5da 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1622,6 +1622,10 @@ WriteCustomRule(std::ostream& fout,
}
std::string script = this->ConstructScript(command, i->c_str());
+ if(this->FortranProject)
+ {
+ cmSystemTools::ReplaceString(script, "$(Configuration)", i->c_str());
+ }
fout << "\t\t\t\t\t<Tool\n"
<< "\t\t\t\t\tName=\"" << customTool << "\"\n"
<< "\t\t\t\t\tDescription=\""
diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h
index 4fdbc58..35f659f 100644
--- a/Source/cmLocalVisualStudio7Generator.h
+++ b/Source/cmLocalVisualStudio7Generator.h
@@ -75,6 +75,8 @@ public:
virtual void ReadAndStoreExternalGUID(const char* name,
const char* path);
+protected:
+ void CreateSingleVCProj(const char *lname, cmTarget &tgt);
private:
typedef cmVisualStudioGeneratorOptions Options;
typedef cmLocalVisualStudio7GeneratorFCInfo FCInfo;
@@ -85,7 +87,6 @@ private:
void WriteVCProjHeader(std::ostream& fout, const char *libName,
cmTarget &tgt, std::vector<cmSourceGroup> &sgs);
void WriteVCProjFooter(std::ostream& fout, cmTarget &target);
- void CreateSingleVCProj(const char *lname, cmTarget &tgt);
void WriteVCProjFile(std::ostream& fout, const char *libName,
cmTarget &tgt);
void WriteConfigurations(std::ostream& fout,
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index ac4296c..8cba84c 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1578,6 +1578,13 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences()
i != depends.end(); ++i)
{
cmTarget* dt = *i;
+ // skip fortran targets as they can not be processed by MSBuild
+ // the only reference will be in the .sln file
+ if(static_cast<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator)
+ ->TargetIsFortranOnly(*dt))
+ {
+ continue;
+ }
this->WriteString("<ProjectReference Include=\"", 2);
cmMakefile* mf = dt->GetMakefile();
std::string name = dt->GetName();
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 71c7c25..30e5076 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -241,7 +241,7 @@ void cmXCodeObject::PrintString(std::ostream& os,cmStdString String)
// considered special by the Xcode project file parser.
bool needQuote =
(String.empty() ||
- String.find_first_of(" <>.+-=@$[]") != String.npos);
+ String.find_first_of(" <>.+-=@$[],") != String.npos);
const char* quote = needQuote? "\"" : "";
// Print the string, quoted and escaped as necessary.
diff --git a/Source/kwsys/hash_fun.hxx.in b/Source/kwsys/hash_fun.hxx.in
index f21efc5..926ec92 100644
--- a/Source/kwsys/hash_fun.hxx.in
+++ b/Source/kwsys/hash_fun.hxx.in
@@ -38,7 +38,7 @@
#define @KWSYS_NAMESPACE@_hash_fun_hxx
#include <@KWSYS_NAMESPACE@/Configure.hxx>
-
+#include <@KWSYS_NAMESPACE@/FundamentalType.h>
#include <@KWSYS_NAMESPACE@/cstddef> // size_t
namespace @KWSYS_NAMESPACE@
@@ -110,6 +110,28 @@ struct hash<unsigned long> {
size_t operator()(unsigned long __x) const { return __x; }
};
+// use long long or __int64
+#if @KWSYS_NAMESPACE@_USE_LONG_LONG
+@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
+struct hash<long long> {
+ size_t operator()(long long __x) const { return __x; }
+};
+
+@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
+struct hash<unsigned long long> {
+ size_t operator()(unsigned long long __x) const { return __x; }
+};
+#elif @KWSYS_NAMESPACE@_USE___INT64
+@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
+struct hash<__int64> {
+ size_t operator()(__int64 __x) const { return __x; }
+};
+@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
+struct hash<unsigned __int64> {
+ size_t operator()(unsigned __int64 __x) const { return __x; }
+};
+#endif // use long long or __int64
+
} // namespace @KWSYS_NAMESPACE@
#endif
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index 23308ff..1620393 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2011)
SET(KWSYS_DATE_STAMP_MONTH 08)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 04)
+SET(KWSYS_DATE_STAMP_DAY 16)
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 4bf83b7..757947e 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -16,6 +16,8 @@ MACRO(ADD_TEST_MACRO NAME COMMAND)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${dir}")
ENDMACRO(ADD_TEST_MACRO)
+INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CheckFortran.cmake)
+
# Fake a user home directory to avoid polluting the real one.
IF(DEFINED ENV{HOME} AND NOT CTEST_NO_TEST_HOME)
SET(TEST_HOME "${CMake_BINARY_DIR}/Tests/CMakeFiles/TestHome")
@@ -155,6 +157,9 @@ IF(BUILD_TESTING)
ADD_TEST_MACRO(MissingSourceFile MissingSourceFile)
SET_TESTS_PROPERTIES(MissingSourceFile PROPERTIES
PASS_REGULAR_EXPRESSION "CMake Error at CMakeLists.txt:3 \\(add_executable\\):[ \r\n]*Cannot find source file:[ \r\n]*DoesNotExist/MissingSourceFile.c")
+ IF(CMAKE_Fortran_COMPILER)
+ ADD_TEST_MACRO(FortranOnly FortranOnly)
+ ENDIF()
ADD_TEST_MACRO(COnly COnly)
ADD_TEST_MACRO(CxxOnly CxxOnly)
ADD_TEST_MACRO(IPO COnly/COnly)
@@ -1879,7 +1884,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
# fortran does not work for IDE builds because
# CMAKE_STANDARD_LIBRARIES needs to be per language
IF(CMAKE_TEST_GENERATOR MATCHES "Make|KDevelop")
- INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CheckFortran.cmake)
IF(CMAKE_Fortran_COMPILER)
ADD_TEST(Fortran ${CMAKE_CTEST_COMMAND}
--build-and-test
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
new file mode 100644
index 0000000..3c4f0e7
--- /dev/null
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -0,0 +1,42 @@
+cmake_minimum_required (VERSION 2.8)
+project(FortranOnly Fortran)
+message("CTEST_FULL_OUTPUT ")
+
+# create a library with hello and world functions
+add_library(FortranOnlylib hello.f world.f)
+# create an executable that calls hello and world
+add_executable(FortranOnly testf.f)
+target_link_libraries(FortranOnly FortranOnlylib)
+
+# create a custom command that runs FortranOnly and puts
+# the output into the file testfhello.txt
+add_custom_command(OUTPUT ${FortranOnly_BINARY_DIR}/testfhello.txt
+ COMMAND ${FortranOnly_BINARY_DIR}/${CMAKE_CFG_INTDIR}/FortranOnly
+ > testfhello.txt)
+# create a second executable FortranOnly2 that has
+# testfhello.txt has an source file so that it will
+# run the above custom command.
+add_executable(FortranOnly2 testfhello.txt testf.f)
+target_link_libraries(FortranOnly2 FortranOnlylib)
+# create a custom target to check the content of testfhello.txt
+# by running the cmake script checktestf2.cmake
+add_custom_target(checktestf2 ALL
+ COMMAND ${CMAKE_COMMAND}
+ -P ${FortranOnly_SOURCE_DIR}/checktestf2.cmake)
+
+# create a custom target that runs FortranOnly exectuable and creates
+# a file out.txt that should have hello world in it.
+add_custom_target(sayhello ALL
+ COMMAND ${FortranOnly_BINARY_DIR}/${CMAKE_CFG_INTDIR}/FortranOnly > out.txt
+)
+# make sure stuff is built in the right order
+add_dependencies(checktestf2 FortranOnly2)
+add_dependencies(sayhello FortranOnly)
+add_dependencies(FortranOnly2 FortranOnly)
+
+# add a custom target that checkes that out.txt has the correct
+# content
+add_custom_target(checksayhello ALL
+ COMMAND ${CMAKE_COMMAND} -P ${FortranOnly_SOURCE_DIR}/checksayhello.cmake
+ )
+add_dependencies(checksayhello sayhello)
diff --git a/Tests/FortranOnly/checksayhello.cmake b/Tests/FortranOnly/checksayhello.cmake
new file mode 100644
index 0000000..5352290
--- /dev/null
+++ b/Tests/FortranOnly/checksayhello.cmake
@@ -0,0 +1,7 @@
+file(READ out.txt IN)
+message("${IN}")
+if(IN MATCHES Hello AND IN MATCHES World)
+ message("Passed")
+else()
+ message(FATAL_ERROR "Hello world not found")
+endif()
diff --git a/Tests/FortranOnly/checktestf2.cmake b/Tests/FortranOnly/checktestf2.cmake
new file mode 100644
index 0000000..f0e6be3
--- /dev/null
+++ b/Tests/FortranOnly/checktestf2.cmake
@@ -0,0 +1,8 @@
+file(READ testfhello.txt IN)
+message("${IN}")
+if(IN MATCHES Hello AND IN MATCHES World)
+ message("Passed")
+else()
+ message(FATAL_ERROR "Hello world not found")
+endif()
+file(WRITE testfhello2.txt ${IN})
diff --git a/Tests/FortranOnly/hello.f b/Tests/FortranOnly/hello.f
new file mode 100644
index 0000000..63e6408
--- /dev/null
+++ b/Tests/FortranOnly/hello.f
@@ -0,0 +1,5 @@
+ SUBROUTINE HELLO
+
+ PRINT *, 'Hello'
+
+ END
diff --git a/Tests/FortranOnly/testf.f b/Tests/FortranOnly/testf.f
new file mode 100644
index 0000000..4909181
--- /dev/null
+++ b/Tests/FortranOnly/testf.f
@@ -0,0 +1,6 @@
+ PROGRAM TESTF
+
+ CALL HELLO()
+ CALL WORLD()
+
+ END
diff --git a/Tests/FortranOnly/world.f b/Tests/FortranOnly/world.f
new file mode 100644
index 0000000..deae3fa
--- /dev/null
+++ b/Tests/FortranOnly/world.f
@@ -0,0 +1,5 @@
+ SUBROUTINE WORLD
+
+ PRINT *, 'World!'
+
+ END