summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindCUDA.cmake17
-rw-r--r--Modules/FindHDF5.cmake38
-rw-r--r--Modules/FindPNG.cmake14
-rw-r--r--Modules/Platform/Windows-MSVC.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGeneratorExpression.cxx16
-rw-r--r--Source/cmTarget.cxx2
-rwxr-xr-xbootstrap5
8 files changed, 31 insertions, 65 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 0390ae4..8270ad4 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -1292,22 +1292,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# Make sure the build system knows the file is generated.
set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE)
- # Don't add the object file to the list of generated files if we are using
- # visual studio and we are attaching the build rule to the cuda file. VS
- # will add our object file to the linker automatically for us.
- set(cuda_add_generated_file TRUE)
-
- if(NOT compile_to_ptx AND CMAKE_GENERATOR MATCHES "Visual Studio" AND CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE)
- # Visual Studio 8 crashes when you close the solution when you don't add the object file.
- if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 8")
- #message("Not adding ${generated_file}")
- set(cuda_add_generated_file FALSE)
- endif()
- endif()
-
- if(cuda_add_generated_file)
- list(APPEND _cuda_wrap_generated_files ${generated_file})
- endif()
+ list(APPEND _cuda_wrap_generated_files ${generated_file})
# Add the other files that we want cmake to clean on a cleanup ##########
list(APPEND CUDA_ADDITIONAL_CLEAN_FILES "${cmake_dependency_file}")
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 8514164..0c246a1 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -289,27 +289,13 @@ if( NOT HDF5_FOUND )
ENV HDF5_ROOT
PATH_SUFFIXES lib Lib )
select_library_configurations( HDF5_${LIB} )
- # even though we adjusted the individual library names in
- # select_library_configurations, we still need to distinguish
- # between debug and release variants because HDF5_LIBRARIES will
- # need to specify different lists for debug and optimized builds.
- # We can't just use the HDF5_${LIB}_LIBRARY variable (which was set
- # up by the selection macro above) because it may specify debug and
- # optimized variants for a particular library, but a list of
- # libraries is allowed to specify debug and optimized only once.
- list( APPEND HDF5_${LANGUAGE}_LIBRARIES_DEBUG
- ${HDF5_${LIB}_LIBRARY_DEBUG} )
- list( APPEND HDF5_${LANGUAGE}_LIBRARIES_RELEASE
- ${HDF5_${LIB}_LIBRARY_RELEASE} )
+ list(APPEND HDF5_${LANGUAGE}_LIBRARIES ${HDF5_${LIB}_LIBRARY})
endforeach()
list( APPEND HDF5_LIBRARY_DIRS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} )
# Append the libraries for this language binding to the list of all
# required libraries.
- list( APPEND HDF5_LIBRARIES_DEBUG
- ${HDF5_${LANGUAGE}_LIBRARIES_DEBUG} )
- list( APPEND HDF5_LIBRARIES_RELEASE
- ${HDF5_${LANGUAGE}_LIBRARIES_RELEASE} )
+ list(APPEND HDF5_LIBRARIES ${HDF5_${LANGUAGE}_LIBRARIES})
endforeach()
# We may have picked up some duplicates in various lists during the above
@@ -329,30 +315,10 @@ if( NOT HDF5_FOUND )
if( HDF5_INCLUDE_DIRS )
_remove_duplicates_from_beginning( HDF5_INCLUDE_DIRS )
endif()
- if( HDF5_LIBRARIES_DEBUG )
- _remove_duplicates_from_beginning( HDF5_LIBRARIES_DEBUG )
- endif()
- if( HDF5_LIBRARIES_RELEASE )
- _remove_duplicates_from_beginning( HDF5_LIBRARIES_RELEASE )
- endif()
if( HDF5_LIBRARY_DIRS )
_remove_duplicates_from_beginning( HDF5_LIBRARY_DIRS )
endif()
- # Construct the complete list of HDF5 libraries with debug and optimized
- # variants when the generator supports them.
- if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
- set( HDF5_LIBRARIES )
- foreach( _lib ${HDF5_LIBRARIES_DEBUG} )
- list( APPEND HDF5_LIBRARIES debug ${_lib} )
- endforeach()
- foreach( _lib ${HDF5_LIBRARIES_RELEASE} )
- list( APPEND HDF5_LIBRARIES optimized ${_lib} )
- endforeach()
- else()
- set( HDF5_LIBRARIES ${HDF5_LIBRARIES_RELEASE} )
- endif()
-
# If the HDF5 include directory was found, open H5pubconf.h to determine if
# HDF5 was compiled with parallel IO support
set( HDF5_IS_PARALLEL FALSE )
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index 33c2971..a2577d2 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -58,15 +58,19 @@ if(ZLIB_FOUND)
list(APPEND PNG_NAMES png${v} libpng${v})
list(APPEND PNG_NAMES_DEBUG png${v}d libpng${v}d)
endforeach()
-message(STATUS "PNG r: ${PNG_NAMES} d: ${PNG_NAMES_DEBUG}")
unset(_PNG_VERSION_SUFFIXES)
- find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES})
- find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG})
+ # For compatiblity with versions prior to this multi-config search, honor
+ # any PNG_LIBRARY that is already specified and skip the search.
+ if(NOT PNG_LIBRARY)
+ find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES})
+ find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG})
+ include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+ select_library_configurations(PNG)
+ mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG)
+ endif()
unset(PNG_NAMES)
unset(PNG_NAMES_DEBUG)
- include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
- select_library_configurations(PNG)
# Set by select_library_configurations(), but we want the one from
# find_package_handle_standard_args() below.
unset(PNG_FOUND)
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 8cb7fd5..d9881f2 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -144,7 +144,7 @@ if(WINCE)
set(CMAKE_C_STANDARD_LIBRARIES_INIT "coredll.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib")
set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:oldnames.lib")
- if (MSVC_VERSION LESS 1500)
+ if (MSVC_VERSION LESS 1600)
set(CMAKE_C_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT} corelibc.lib")
endif ()
else()
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 7f9319c..31311bb 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -2,5 +2,5 @@
set(CMake_VERSION_MAJOR 2)
set(CMake_VERSION_MINOR 8)
set(CMake_VERSION_PATCH 11)
-set(CMake_VERSION_TWEAK 20130912)
+set(CMake_VERSION_TWEAK 20130925)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index e962313..127cf6b 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -192,11 +192,12 @@ static std::string stripAllGeneratorExpressions(const std::string &input)
std::string result;
std::string::size_type pos = 0;
std::string::size_type lastPos = pos;
+ int nestingLevel = 0;
while((pos = input.find("$<", lastPos)) != input.npos)
{
result += input.substr(lastPos, pos - lastPos);
pos += 2;
- int nestingLevel = 1;
+ nestingLevel = 1;
const char *c = input.c_str() + pos;
const char * const cStart = c;
for ( ; *c; ++c)
@@ -224,7 +225,10 @@ static std::string stripAllGeneratorExpressions(const std::string &input)
pos += traversed;
lastPos = pos;
}
- result += input.substr(lastPos);
+ if (nestingLevel == 0)
+ {
+ result += input.substr(lastPos);
+ }
return cmGeneratorExpression::StripEmptyListElements(result);
}
@@ -253,6 +257,7 @@ static std::string stripExportInterface(const std::string &input,
{
std::string result;
+ int nestingLevel = 0;
std::string::size_type pos = 0;
std::string::size_type lastPos = pos;
while (true)
@@ -282,7 +287,7 @@ static std::string stripExportInterface(const std::string &input,
const bool gotInstallInterface = input[pos + 2] == 'I';
pos += gotInstallInterface ? sizeof("$<INSTALL_INTERFACE:") - 1
: sizeof("$<BUILD_INTERFACE:") - 1;
- int nestingLevel = 1;
+ nestingLevel = 1;
const char *c = input.c_str() + pos;
const char * const cStart = c;
for ( ; *c; ++c)
@@ -331,7 +336,10 @@ static std::string stripExportInterface(const std::string &input,
pos += traversed;
lastPos = pos;
}
- result += input.substr(lastPos);
+ if (nestingLevel == 0)
+ {
+ result += input.substr(lastPos);
+ }
return cmGeneratorExpression::StripEmptyListElements(result);
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ce0d0f2..ac655da 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6449,7 +6449,7 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
<< newExplicitLibraries
<< "\n"
<< linkIfaceProp << ":\n "
- << explicitLibraries << "\n";
+ << (explicitLibraries ? explicitLibraries : "(empty)") << "\n";
this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
}
// Fall through
diff --git a/bootstrap b/bootstrap
index fb4a0a0..9784d5d 100755
--- a/bootstrap
+++ b/bootstrap
@@ -692,7 +692,10 @@ if ${cmake_system_linux}; then
# avoid binutils problem with large binaries, e.g. when building CMake in debug mode
# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50230
if ${cmake_machine_parisc}; then
- cmake_ld_flags="${LDFLAGS} -Wl,--unique=.text.*"
+ # if -O[s23] is given the effect is inverted, so do not use the flag then
+ if [ "`echo "${CXXFLAGS}" | sed -r '/^(.* )?(-O[s234])( .*)?$/s/.*/-Os/'`" != "-Os" ]; then
+ cmake_ld_flags="${LDFLAGS} -Wl,--unique=.text.*"
+ fi
fi
fi