summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmBuildSharedLibrariesCommand.cxx26
-rw-r--r--Source/cmake.cxx14
2 files changed, 14 insertions, 26 deletions
diff --git a/Source/cmBuildSharedLibrariesCommand.cxx b/Source/cmBuildSharedLibrariesCommand.cxx
index 781ec80..676ce2c 100644
--- a/Source/cmBuildSharedLibrariesCommand.cxx
+++ b/Source/cmBuildSharedLibrariesCommand.cxx
@@ -43,27 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// cmBuildSharedLibrariesCommand
bool cmBuildSharedLibrariesCommand::InitialPass(std::vector<std::string>& args)
{
- // Now check and see if the value has been stored in the cache
- // already, if so use that value and don't look for the program
- const char* cacheValue
- = cmCacheManager::GetInstance()->GetCacheValue("BUILD_SHARED_LIBS");
- if(!cacheValue)
- {
- cmCacheManager::GetInstance()->
- AddCacheEntry("BUILD_SHARED_LIBS",
- false,
- "If ON, the resulting project or makefiles will "
- "produce shared libraries. WARNING! On some "
- "UNIX platforms, changing this setting will require"
- " removing all .o files, as they will have to be recompiled "
- " with -fpic or some other flag.");
- m_Makefile->AddDefinition("BUILD_SHARED_LIBS", false);
- }
- else
- {
- m_Makefile->AddDefinition("BUILD_SHARED_LIBS",
- cmCacheManager::
- GetInstance()->IsOn("BUILD_SHARED_LIBS"));
- }
- return true;
+ this->SetError("This command has been deprecated. The BUILD_SHARED_LIBS\n"
+ "cache entry is now always added by CMake.\n");
+ return false;
}
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 6b67ef0..f54e556 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -231,9 +231,11 @@ int cmake::Generate(const std::vector<std::string>& args)
mf.GenerateMakefile();
// Before saving the cache
- // if the project did not define LIBRARY_OUTPUT_PATH and
- // EXECUTABLE_OUTPUT_PATH, add them now, so users
- // can edit the values in the cache.
+ // if the project did not define one of the entries below, add them now
+ // so users can edit the values in the cache:
+ // LIBRARY_OUTPUT_PATH
+ // EXECUTABLE_OUTPUT_PATH
+ // BUILD_SHARED_LIBS
if(!cmCacheManager::GetInstance()->GetCacheValue("LIBRARY_OUTPUT_PATH"))
{
cmCacheManager::GetInstance()->AddCacheEntry("LIBRARY_OUTPUT_PATH", "",
@@ -246,6 +248,12 @@ int cmake::Generate(const std::vector<std::string>& args)
"Single output directory for building all executables.",
cmCacheManager::PATH);
}
+ if(!cmCacheManager::GetInstance()->GetCacheValue("BUILD_SHARED_LIBS"))
+ {
+ cmCacheManager::GetInstance()->AddCacheEntry("BUILD_SHARED_LIBS", "OFF",
+ "Build with shared libraries.",
+ cmCacheManager::BOOL);
+ }
cmCacheManager::GetInstance()->SaveCache(&mf);