summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CMakeLists.txt2
-rw-r--r--Source/cmSourceFile.cxx10
-rw-r--r--Source/cmStandardIncludes.h5
3 files changed, 11 insertions, 6 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 6c38220..b898a5a 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -27,7 +27,7 @@ cmSourceGroup.cxx
# configure the .h file
CONFIGURE_FILE(
${CMake_SOURCE_DIR}/Source/cmConfigure.cmake.h.in
-${CMake_BINARY_DIR}/Source/cmConfigure.cmake.h )
+${CMake_BINARY_DIR}/Source/cmConfigure.h )
# add the include path to find the .h
INCLUDE_DIRECTORIES(${CMake_BINARY_DIR}/Source)
# let cmake know it is supposed to use it
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 0783115..29e7444 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -78,7 +78,15 @@ void cmSourceFile::SetName(const char* name, const char* dir)
if(pos != std::string::npos)
{
m_SourceExtension = hname.substr(pos+1, hname.size()-pos);
- m_SourceName = hname.substr(0, pos);
+ std::string::size_type pos2 = hname.rfind('/');
+ if(pos2 != std::string::npos)
+ {
+ m_SourceName = hname.substr(pos2+1, pos - pos2-1);
+ }
+ else
+ {
+ m_SourceName = hname.substr(0, pos);
+ }
}
m_HeaderFileOnly = false;
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index a4330bf..49b68ab 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -47,12 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// include configure generated header to define
// CMAKE_NO_ANSI_STREAM_HEADERS and CMAKE_NO_STD_NAMESPACE
-#ifdef CMAKE_HAS_AUTOCONF
+#if defined(CMAKE_HAS_AUTOCONF) || defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmConfigure.h"
#endif
-#ifdef CMAKE_BUILD_WITH_CMAKE
-#include "cmConfigure.cmake.h"
-#endif
#ifdef _MSC_VER
#pragma warning ( disable : 4786 )