diff options
-rw-r--r-- | Source/cmFileCommand.cxx | 16 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 4 | ||||
-rw-r--r-- | Tests/SimpleInstall/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Tests/SimpleInstallS2/CMakeLists.txt | 11 |
4 files changed, 33 insertions, 9 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 1b49ff7..c178059 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -249,6 +249,8 @@ bool cmFileCommand::HandleInstallCommand( std::string destination = ""; std::string stype = "FILES"; const char* build_type = m_Makefile->GetDefinition("BUILD_TYPE"); + const char* debug_postfix + = m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX"); const char* destdir = cmSystemTools::GetEnv("DESTDIR"); std::string extra_dir = ""; @@ -451,6 +453,10 @@ bool cmFileCommand::HandleInstallCommand( case cmTarget::MODULE_LIBRARY: case cmTarget::STATIC_LIBRARY: case cmTarget::SHARED_LIBRARY: + if ( debug ) + { + fname = fnamewe + debug_postfix + ext; + } { // Handle shared library versioning const char* lib_version = 0; @@ -506,11 +512,15 @@ bool cmFileCommand::HandleInstallCommand( } } cmOStringStream str; - str << cmSystemTools::GetFilenamePath(ctarget) - << "/" << extra_dir << "/" - << fname; + str << cmSystemTools::GetFilenamePath(ctarget) << "/"; + if ( extra_dir.size() > 0 ) + { + str << extra_dir << "/"; + } + str << fname; ctarget = str.str(); } + break; case cmTarget::EXECUTABLE: if ( extra_dir.size() > 0 ) { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 1315bb6..14c78e8 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -482,14 +482,18 @@ int cmGlobalGenerator::TryCompile(const char *, const char *bindir, } int retVal; int timeout = cmGlobalGenerator::s_TryCompileTimeout; + bool hideconsole = cmSystemTools::GetRunCommandHideConsole(); + cmSystemTools::SetRunCommandHideConsole(true); if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), output, &retVal, 0, false, timeout)) { + cmSystemTools::SetRunCommandHideConsole(hideconsole); cmSystemTools::Error("Generator: execution of make failed."); // return to the original directory cmSystemTools::ChangeDirectory(cwd.c_str()); return 1; } + cmSystemTools::SetRunCommandHideConsole(hideconsole); // The SGI MipsPro 7.3 compiler does not return an error code when // the source has a #error in it! This is a work-around for such diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index fc36dd1..22f8387 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -17,11 +17,16 @@ IF(CMAKE_GENERATOR MATCHES "^Visual Studio") SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=${build_type}) ENDIF(MAKEPROGRAM MATCHES "- ${build_type}") ENDFOREACH(build_type) - IF(NOT EXTRA_INSTALL_FLAGS) + IF(NOT ${EXTRA_INSTALL_FLAGS}) IF(BUILD_TYPE) SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=${BUILD_TYPE}) ENDIF(BUILD_TYPE) - ENDIF(NOT EXTRA_INSTALL_FLAGS) + ENDIF(NOT ${EXTRA_INSTALL_FLAGS}) + IF(NOT DEFINED EXTRA_INSTALL_FLAGS) + IF(NOT "$ENV{SIMPLE_INSTALL_BUILD_TYPE}" MATCHES "^$") + SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=$ENV{SIMPLE_INSTALL_BUILD_TYPE}) + ENDIF(NOT "$ENV{SIMPLE_INSTALL_BUILD_TYPE}" MATCHES "^$") + ENDIF(NOT DEFINED EXTRA_INSTALL_FLAGS) ENDIF(CMAKE_GENERATOR MATCHES "^Visual Studio") MESSAGE("Extra install: ${EXTRA_INSTALL_FLAGS}") @@ -71,7 +76,7 @@ ELSE(STAGE2) ADD_DEPENDENCIES(SimpleInstall test3) ADD_DEPENDENCIES(test2 test3) - ADD_DEPENDENCIES(test4 test3) + ADD_DEPENDENCIES(test4 test2) INSTALL_TARGETS(/bin SimpleInstall) INSTALL_TARGETS(/lib test1 test2 test3 test4) diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index fc36dd1..22f8387 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/CMakeLists.txt @@ -17,11 +17,16 @@ IF(CMAKE_GENERATOR MATCHES "^Visual Studio") SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=${build_type}) ENDIF(MAKEPROGRAM MATCHES "- ${build_type}") ENDFOREACH(build_type) - IF(NOT EXTRA_INSTALL_FLAGS) + IF(NOT ${EXTRA_INSTALL_FLAGS}) IF(BUILD_TYPE) SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=${BUILD_TYPE}) ENDIF(BUILD_TYPE) - ENDIF(NOT EXTRA_INSTALL_FLAGS) + ENDIF(NOT ${EXTRA_INSTALL_FLAGS}) + IF(NOT DEFINED EXTRA_INSTALL_FLAGS) + IF(NOT "$ENV{SIMPLE_INSTALL_BUILD_TYPE}" MATCHES "^$") + SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=$ENV{SIMPLE_INSTALL_BUILD_TYPE}) + ENDIF(NOT "$ENV{SIMPLE_INSTALL_BUILD_TYPE}" MATCHES "^$") + ENDIF(NOT DEFINED EXTRA_INSTALL_FLAGS) ENDIF(CMAKE_GENERATOR MATCHES "^Visual Studio") MESSAGE("Extra install: ${EXTRA_INSTALL_FLAGS}") @@ -71,7 +76,7 @@ ELSE(STAGE2) ADD_DEPENDENCIES(SimpleInstall test3) ADD_DEPENDENCIES(test2 test3) - ADD_DEPENDENCIES(test4 test3) + ADD_DEPENDENCIES(test4 test2) INSTALL_TARGETS(/bin SimpleInstall) INSTALL_TARGETS(/lib test1 test2 test3 test4) |