Commit 9c4bfe97 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: add a fix for VTK on the mac and a way to fix some projects with a single...

ENH: add a fix for VTK on the mac and a way to fix some projects with a single file in the cmake modules directory
parent 99368244
...@@ -96,10 +96,6 @@ IF(NOT CMAKE_C_LINK_EXECUTABLE) ...@@ -96,10 +96,6 @@ IF(NOT CMAKE_C_LINK_EXECUTABLE)
"<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_C_LINK_EXECUTABLE) ENDIF(NOT CMAKE_C_LINK_EXECUTABLE)
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
CMAKE_C_FLAGS CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG
......
...@@ -154,11 +154,6 @@ IF(NOT CMAKE_CXX_LINK_EXECUTABLE) ...@@ -154,11 +154,6 @@ IF(NOT CMAKE_CXX_LINK_EXECUTABLE)
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") "<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_CXX_LINK_EXECUTABLE) ENDIF(NOT CMAKE_CXX_LINK_EXECUTABLE)
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
CMAKE_BUILD_TOOL CMAKE_BUILD_TOOL
CMAKE_VERBOSE_MAKEFILE CMAKE_VERBOSE_MAKEFILE
......
...@@ -114,11 +114,6 @@ IF(NOT CMAKE_Fortran_LINK_EXECUTABLE) ...@@ -114,11 +114,6 @@ IF(NOT CMAKE_Fortran_LINK_EXECUTABLE)
ENDIF(NOT CMAKE_Fortran_LINK_EXECUTABLE) ENDIF(NOT CMAKE_Fortran_LINK_EXECUTABLE)
# Load the user define rules
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
CMAKE_Fortran_FLAGS CMAKE_Fortran_FLAGS
......
MESSAGE("VTK specific hacks go here in VTKCompatibility")
IF(APPLE)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_C_CREATE_SHARED_LIBRARY}")
SET(CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_C_CREATE_SHARED_MODULE}")
STRING( REGEX REPLACE "CMAKE_C_COMPILER" CMAKE_CXX_COMPILER CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE}")
STRING( REGEX REPLACE "CMAKE_C_COMPILER" CMAKE_CXX_COMPILER CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
ENDIF(APPLE)
...@@ -373,6 +373,20 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages, ...@@ -373,6 +373,20 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
} }
} }
} }
} // end for each language
std::string projectCompatibility = mf->GetDefinition("CMAKE_ROOT");
projectCompatibility += "/Modules/";
projectCompatibility += mf->GetDefinition("PROJECT_NAME");
projectCompatibility += "Compatibility.cmake";
if(cmSystemTools::FileExists(projectCompatibility.c_str()))
{
mf->ReadListFile(0,projectCompatibility.c_str());
}
std::string userMakeRules =
mf->GetSafeDefinition("CMAKE_USER_MAKE_RULES_OVERRIDE");
if(userMakeRules.size())
{
mf->ReadListFile(0,userMakeRules.c_str());
} }
} }
......
Supports Markdown
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