Commit a002ea78 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: changes for RC5

parent 78a2c407
......@@ -7,7 +7,7 @@ SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 4)
SET(CMake_VERSION_PATCH 8)
# for an actual release this should not be defined
SET(CMake_VERSION_RC 4)
SET(CMake_VERSION_RC 5)
SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
......
Changes in CMake 2.4.8 RC 5
* Fix bug 6106 FindPerlLibs.cmake missing escaped $
* Allow NODEFAULTLIBS to have more than one value
* Suppress regeneration of makefiles during try compile avoid infinite
loop in trycompile with some vs 2005 builds.
* Rest of Fix for fix 5363, removes warning on vs 6
* Allow for debug libraries in InstallRequiredSystemLibraries.cmake for vs8
* Fix for bug 4605 JavaEmbedding.framework should not be used.
Changes in CMake 2.4.8 RC 4
* fix for cpack and messing up PATH with NSIS
Changes in CMake 2.4.8 RC 3
......
......@@ -6,7 +6,7 @@
# JAVA_AWT_LIB_PATH = the path to the jawt library
# JAVA_JVM_LIB_PATH = the path to the jvm library
# JAVA_INCLUDE_PATH = the include path to jni.h
# JAVA_INCLUDE_PATH2 = the include path to jni.h
# JAVA_INCLUDE_PATH2 = the include path to jni_md.h
# JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
#
......@@ -79,17 +79,33 @@ IF(APPLE)
IF(EXISTS /Library/Frameworks/JavaVM.framework)
SET(JAVA_HAVE_FRAMEWORK 1)
ENDIF(EXISTS /Library/Frameworks/JavaVM.framework)
IF(EXISTS /System/Library/Frameworks/JavaVM.framework)
SET(JAVA_HAVE_FRAMEWORK 1)
ENDIF(EXISTS /System/Library/Frameworks/JavaVM.framework)
IF(JAVA_HAVE_FRAMEWORK)
IF(NOT JAVA_AWT_LIBRARY)
SET (JAVA_AWT_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE)
ENDIF(NOT JAVA_AWT_LIBRARY)
IF(NOT JAVA_JVM_LIBRARY)
SET (JAVA_JVM_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE)
ENDIF(NOT JAVA_JVM_LIBRARY)
SET(JAVA_AWT_INCLUDE_DIRECTORIES ${JAVA_AWT_INCLUDE_DIRECTORIES}
IF(NOT JAVA_AWT_INCLUDE_PATH)
IF(EXISTS /System/Library/Frameworks/JavaVM.framework/Headers/jawt.h)
SET (JAVA_AWT_INCLUDE_PATH "/System/Library/Frameworks/JavaVM.framework/Headers" CACHE FILEPATH "jawt.h location" FORCE)
ENDIF(EXISTS /System/Library/Frameworks/JavaVM.framework/Headers/jawt.h)
ENDIF(NOT JAVA_AWT_INCLUDE_PATH)
# If using "-framework JavaVM", prefer its headers *before* the others in
# JAVA_AWT_INCLUDE_DIRECTORIES... (*prepend* to the list here)
#
SET(JAVA_AWT_INCLUDE_DIRECTORIES
~/Library/Frameworks/JavaVM.framework/Headers
/Library/Frameworks/JavaVM.framework/Headers
/System/Library/Frameworks/JavaVM.framework/Headers
${JAVA_AWT_INCLUDE_DIRECTORIES}
)
ENDIF(JAVA_HAVE_FRAMEWORK)
ELSE(APPLE)
......@@ -113,7 +129,9 @@ FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h
)
FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h
${JAVA_AWT_INCLUDE_DIRECTORIES} ${JAVA_INCLUDE_PATH} )
${JAVA_AWT_INCLUDE_DIRECTORIES}
${JAVA_INCLUDE_PATH}
)
MARK_AS_ADVANCED(
JAVA_AWT_LIBRARY
......
......@@ -32,7 +32,7 @@ FIND_PROGRAM(PERL_EXECUTABLE
IF(PERL_EXECUTABLE)
EXEC_PROGRAM(${PERL_EXECUTABLE}
ARGS -e "'use Config; print $Config{libperl}, \"\\n\"'"
ARGS -e "'use Config; print \$Config{libperl}, \"\\n\"'"
OUTPUT_VARIABLE PERL_LIBRARY_OUTPUT_VARIABLE
RETURN_VALUE PERL_LIBRARY_RETURN_VALUE
)
......@@ -42,13 +42,12 @@ IF(PERL_EXECUTABLE)
ENDFOREACH(path ${PERL_POSSIBLE_LIB_PATHS})
ENDIF(NOT PERL_LIBRARY_RETURN_VALUE)
EXEC_PROGRAM(${PERL_EXECUTABLE}
ARGS -e "'use Config; print $Config{cppflags}, \"\\n\"'"
ARGS -e "'use Config; print \$Config{cppflags}, \"\\n\"'"
OUTPUT_VARIABLE PERL_CPPFLAGS_OUTPUT_VARIABLE
RETURN_VALUE PERL_CPPFLAGS_RETURN_VALUE
)
IF(NOT PERL_CPPFLAGS_RETURN_VALUE)
SET(PERL_EXTRA_C_FLAGS ${PERL_CPPFLAGS_OUTPUT_VARIABLE})
SEPARATE_ARGUMENTS(PERL_EXTRA_C_FLAGS)
ENDIF(NOT PERL_CPPFLAGS_RETURN_VALUE)
ENDIF(PERL_EXECUTABLE)
......
# Hack for Visual Studio support
# Search for system runtime libraries based on the platform. This is
# not complete because it is used only for the release process by the
# developers.
# By including this file, all files in the CMAKE_INSTALL_DEBUG_LIBRARIES,
# will be installed with INSTALL_PROGRAMS into /bin for WIN32 and /lib
# for non-win32. If CMAKE_SKIP_INSTALL_RULES is set to TRUE before including
# this file, then the INSTALL command is not called. The use can use
# the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to use a custom install
# command and install them into any directory they want.
# If it is the MSVC compiler, then the microsoft run
# time libraries will be found add automatically added to the
# CMAKE_INSTALL_DEBUG_LIBRARIES, and installed.
# If CMAKE_INSTALL_DEBUG_LIBRARIES is set and it is the MSVC
# compiler, then the debug libraries are installed when available.
# If CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time
# libraries are installed as well as the CRT run time libraries.
IF(MSVC)
FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
IF(MSVC70)
......@@ -32,6 +42,18 @@ IF(MSVC)
"${MSVC80_CRT_DIR}/msvcp80.dll"
"${MSVC80_CRT_DIR}/msvcr80.dll"
)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC80_CRT_DIR
"${MSVC80_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT")
SET(__install__libs ${__install__libs}
"${MSVC80_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest"
"${MSVC80_CRT_DIR}/msvcm80d.dll"
"${MSVC80_CRT_DIR}/msvcp80d.dll"
"${MSVC80_CRT_DIR}/msvcr80d.dll"
)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
ENDIF(MSVC80)
IF(CMAKE_INSTALL_MFC_LIBRARIES)
IF(MSVC70)
......@@ -45,6 +67,18 @@ IF(MSVC)
)
ENDIF(MSVC71)
IF(MSVC80)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC80_MFC_DIR
"${MSVC80_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC80.DebugMFC")
SET(__install__libs ${__install__libs}
"${MSVC80_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest"
"${MSVC80_MFC_DIR}/mfc80d.dll"
"${MSVC80_MFC_DIR}/mfc80ud.dll"
"${MSVC80_MFC_DIR}/mfcm80d.dll"
"${MSVC80_MFC_DIR}/mfcm80ud.dll"
)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC80_MFC_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.MFC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
......@@ -56,6 +90,24 @@ IF(MSVC)
"${MSVC80_MFC_DIR}/mfcm80u.dll"
)
ENDIF(MSVC80)
IF(MSVC80)
# include the language dll's for vs8 as well as the actuall dll's
SET(MSVC80_MFCLOC_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.MFCLOC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
SET(__install__libs ${__install__libs}
"${MSVC80_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest"
"${MSVC80_MFCLOC_DIR}/mfc80chs.dll"
"${MSVC80_MFCLOC_DIR}/mfc80cht.dll"
"${MSVC80_MFCLOC_DIR}/mfc80enu.dll"
"${MSVC80_MFCLOC_DIR}/mfc80esp.dll"
"${MSVC80_MFCLOC_DIR}/mfc80deu.dll"
"${MSVC80_MFCLOC_DIR}/mfc80fra.dll"
"${MSVC80_MFCLOC_DIR}/mfc80ita.dll"
"${MSVC80_MFCLOC_DIR}/mfc80jpn.dll"
"${MSVC80_MFCLOC_DIR}/mfc80kor.dll"
)
ENDIF(MSVC80)
ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
FOREACH(lib
${__install__libs}
......@@ -70,11 +122,13 @@ ENDIF(MSVC)
# Include system runtime libraries in the installation if any are
# specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
IF(WIN32)
INSTALL_PROGRAMS(/bin ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
ELSE(WIN32)
INSTALL_PROGRAMS(/lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
ENDIF(WIN32)
ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
......@@ -588,6 +588,11 @@ cmLocalVisualStudio6Generator
std::vector<std::string>::iterator i;
for(i = this->Configurations.begin(); i != this->Configurations.end(); ++i)
{
// Strip the subdirectory name out of the configuration name.
std::string config = *i;
std::string::size_type pos = config.find_last_of(" ");
config = config.substr(pos+1, std::string::npos);
config = config.substr(0, config.size()-1);
if (i == this->Configurations.begin())
{
fout << "!IF \"$(CFG)\" == " << i->c_str() << std::endl;
......@@ -606,7 +611,8 @@ cmLocalVisualStudio6Generator
d != depends.end(); ++d)
{
// Lookup the real name of the dependency in case it is a CMake target.
std::string dep = this->GetRealDependency(d->c_str(), i->c_str());
std::string dep = this->GetRealDependency(d->c_str(),
config.c_str());
fout << "\\\n\t" <<
this->ConvertToOptionallyRelativeOutputPath(dep.c_str());
}
......
......@@ -382,7 +382,7 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] =
{"LinkIncremental", "INCREMENTAL:NO", "link incremental", "1", 0},
{"LinkIncremental", "INCREMENTAL:YES", "link incremental", "2", 0},
{"IgnoreDefaultLibraryNames", "NODEFAULTLIB:", "default libs to ignore", "",
cmVS7FlagTable::UserValue},
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable},
{"IgnoreAllDefaultLibraries", "NODEFAULTLIB", "ignore all default libs",
"TRUE", 0},
{0,0,0,0,0}
......@@ -1804,51 +1804,68 @@ cmLocalVisualStudio7GeneratorOptions
::CheckFlagTable(cmVS7FlagTable const* table, const char* flag,
bool& flag_handled)
{
// Look for an entry in the flag table matching this flag.
// Look for an entry in the flag table matching this flag.
for(cmVS7FlagTable const* entry = table; entry->IDEName; ++entry)
{
bool entry_found = false;
if(entry->special & cmVS7FlagTable::UserValue)
{
// This flag table entry accepts a user-specified value. If
// the entry specifies UserRequired we must match only if a
// non-empty value is given.
int n = static_cast<int>(strlen(entry->commandFlag));
if(strncmp(flag+1, entry->commandFlag, n) == 0 &&
(!(entry->special & cmVS7FlagTable::UserRequired) ||
static_cast<int>(strlen(flag+1)) > n))
{
bool entry_found = false;
if(entry->special & cmVS7FlagTable::UserValue)
if(entry->special & cmVS7FlagTable::UserIgnored)
{
// This flag table entry accepts a user-specified value. If
// the entry specifies UserRequired we must match only if a
// non-empty value is given.
int n = static_cast<int>(strlen(entry->commandFlag));
if(strncmp(flag+1, entry->commandFlag, n) == 0 &&
(!(entry->special & cmVS7FlagTable::UserRequired) ||
static_cast<int>(strlen(flag+1)) > n))
// Ignore the user-specified value.
this->FlagMap[entry->IDEName] = entry->value;
}
else if(entry->special & cmVS7FlagTable::SemicolonAppendable)
{
const char *new_value = flag+1+n;
std::map<cmStdString,cmStdString>::iterator itr;
itr = this->FlagMap.find(entry->IDEName);
if(itr != this->FlagMap.end())
{
if(entry->special & cmVS7FlagTable::UserIgnored)
{
// Ignore the user-specified value.
this->FlagMap[entry->IDEName] = entry->value;
}
else
{
// Use the user-specified value.
this->FlagMap[entry->IDEName] = flag+1+n;
}
entry_found = true;
// Append to old value (if present) with semicolons;
itr->second += ";";
itr->second += new_value;
}
else
{
this->FlagMap[entry->IDEName] = new_value;
}
}
else if(strcmp(flag+1, entry->commandFlag) == 0)
{
// This flag table entry provides a fixed value.
this->FlagMap[entry->IDEName] = entry->value;
entry_found = true;
}
// If the flag has been handled by an entry not requesting a
// search continuation we are done.
if(entry_found && !(entry->special & cmVS7FlagTable::Continue))
else
{
return true;
// Use the user-specified value.
this->FlagMap[entry->IDEName] = flag+1+n;
}
// If the entry was found the flag has been handled.
flag_handled = flag_handled || entry_found;
entry_found = true;
}
}
else if(strcmp(flag+1, entry->commandFlag) == 0)
{
// This flag table entry provides a fixed value.
this->FlagMap[entry->IDEName] = entry->value;
entry_found = true;
}
// If the flag has been handled by an entry not requesting a
// search continuation we are done.
if(entry_found && !(entry->special & cmVS7FlagTable::Continue))
{
return true;
}
// If the entry was found the flag has been handled.
flag_handled = flag_handled || entry_found;
}
return false;
}
......
......@@ -144,7 +144,11 @@ struct cmVS7FlagTable
UserIgnored = (1<<1), // ignore any user value
UserRequired = (1<<2), // match only when user value is non-empty
Continue = (1<<3), // continue looking for matching entries
SemicolonAppendable = (1<<4), // a flag that if specified multiple times
// should have its value appended to the
// old value with semicolons (e.g.
// /NODEFAULTLIB: =>
// IgnoreDefaultLibraryNames)
UserValueIgnored = UserValue | UserIgnored,
UserValueRequired = UserValue | UserRequired
};
......
......@@ -192,7 +192,8 @@ int cmTryCompileCommand::CoreTryCompileCode(
fprintf(fout, " %s ", flags);
}
fprintf(fout, " ${COMPILE_DEFINITIONS}\")\n");
fprintf(fout, "INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES})\n");
fprintf(fout, "INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES})\n");
fprintf(fout, "SET(CMAKE_SUPPRESS_REGENERATION 1)\n");
fprintf(fout, "LINK_DIRECTORIES(${LINK_DIRECTORIES})\n");
// handle any compile flags we need to pass on
if (compileFlags.size())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment