Nmake build: move most of hard-coded values to config parameters
This commit is contained in:
parent
521d8d9410
commit
f670003d24
|
@ -87,7 +87,7 @@ void cmBorlandMakefileGenerator2::OutputMakeVariables(std::ostream& fout)
|
|||
"CMAKE_COMMAND = ${CMAKE_COMMAND}\n"
|
||||
"CMAKE_STANDARD_WINDOWS_LIBRARIES = @CMAKE_STANDARD_WINDOWS_LIBRARIES@\n"
|
||||
"CMAKE_C_COMPILER = @CMAKE_C_COMPILER@ \n"
|
||||
"CMAKE_CFLAGS = @CMAKE_CFLAGS@ @BUILD_FLAGS@\n"
|
||||
"CMAKE_C_FLAGS = @CMAKE_C_FLAGS@ @BUILD_FLAGS@\n"
|
||||
"CMAKE_CXX_COMPILER = @CMAKE_CXX_COMPILER@\n"
|
||||
"CMAKE_CXXFLAGS = -P @CMAKE_CXX_FLAGS@ @BUILD_FLAGS@\n";
|
||||
std::string buildType = "CMAKE_CXX_FLAGS_";
|
||||
|
@ -249,7 +249,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
|||
std::string ext = source.GetSourceExtension();
|
||||
if(ext == "c" )
|
||||
{
|
||||
compileCommand = "$(CMAKE_C_COMPILER) $(CMAKE_CFLAGS) ";
|
||||
compileCommand = "$(CMAKE_C_COMPILER) $(CMAKE_C_FLAGS) ";
|
||||
compileCommand += extraCompileFlags;
|
||||
if(shared)
|
||||
{
|
||||
|
|
|
@ -51,12 +51,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
cmNMakeMakefileGenerator::cmNMakeMakefileGenerator()
|
||||
{
|
||||
m_LibraryPathOption = "-LIBPATH:";
|
||||
this->SetObjectFileExtension(".obj");
|
||||
this->SetExecutableExtension(".exe");
|
||||
m_LibraryPathOption = "$(CMAKE_C_LIBPATH_FLAG)";
|
||||
this->SetObjectFileExtension("$(CMAKE_OBJECT_FILE_SUFFIX)");
|
||||
this->SetExecutableExtension("$(CMAKE_EXECUTABLE_SUFFIX)");
|
||||
this->SetLibraryPrefix("");
|
||||
this->SetSharedLibraryExtension(".dll");
|
||||
this->SetStaticLibraryExtension(".lib");
|
||||
this->SetStaticLibraryExtension("$(CMAKE_STATICLIB_SUFFIX)");
|
||||
this->SetSharedLibraryExtension("$(CMAKE_SHLIB_SUFFIX)");
|
||||
m_QuoteNextCommand = true; // most of the time command should be quoted
|
||||
}
|
||||
|
||||
|
@ -148,9 +148,23 @@ void cmNMakeMakefileGenerator::OutputMakeVariables(std::ostream& fout)
|
|||
"CMAKE_COMMAND = ${CMAKE_COMMAND}\n"
|
||||
"CMAKE_STANDARD_WINDOWS_LIBRARIES = @CMAKE_STANDARD_WINDOWS_LIBRARIES@\n"
|
||||
"CMAKE_C_COMPILER = @CMAKE_C_COMPILER@\n"
|
||||
"CMAKE_CFLAGS = @CMAKE_CFLAGS@ @BUILD_FLAGS@\n"
|
||||
"CMAKE_C_FLAGS = @CMAKE_C_FLAGS@ @BUILD_FLAGS@\n"
|
||||
|
||||
"CMAKE_C_OUTPUT_OBJECT_FILE_FLAG = @CMAKE_C_OUTPUT_OBJECT_FILE_FLAG@\n"
|
||||
"CMAKE_C_OUTPUT_EXECUTABLE_FILE_FLAG = @CMAKE_C_OUTPUT_EXECUTABLE_FILE_FLAG@\n"
|
||||
"CMAKE_LINKER = @CMAKE_LINKER@\n"
|
||||
"CMAKE_C_LINK_EXECUTABLE_FLAG = @CMAKE_C_LINK_EXECUTABLE_FLAG@\n"
|
||||
"CMAKE_C_LIBPATH_FLAG = @CMAKE_C_LIBPATH_FLAG@\n"
|
||||
"CMAKE_LINKER_FLAGS = @CMAKE_LINKER_FLAGS@\n"
|
||||
"CMAKE_LINKER_SHARED_LIBRARY_FLAG = @CMAKE_LINKER_SHARED_LIBRARY_FLAG@\n"
|
||||
"CMAKE_LINKER_STATIC_LIBRARY_FLAG = @CMAKE_LINKER_STATIC_LIBRARY_FLAG@\n"
|
||||
"CMAKE_LINKER_OUTPUT_FILE_FLAG = @CMAKE_LINKER_OUTPUT_FILE_FLAG@\n"
|
||||
"CMAKE_CXXFLAGS = @CMAKE_CXX_FLAGS@ @BUILD_FLAGS@\n"
|
||||
"CMAKE_CXX_COMPILER = @CMAKE_CXX_COMPILER@\n"
|
||||
"CMAKE_CXXFLAGS = @CMAKE_CXX_FLAGS@ @BUILD_FLAGS@\n";
|
||||
"CMAKE_OBJECT_FILE_SUFFIX = @CMAKE_OBJECT_FILE_SUFFIX@\n"
|
||||
"CMAKE_EXECUTABLE_SUFFIX = @CMAKE_EXECUTABLE_SUFFIX@\n"
|
||||
"CMAKE_STATICLIB_SUFFIX = @CMAKE_STATICLIB_SUFFIX@\n"
|
||||
"CMAKE_SHLIB_SUFFIX = @CMAKE_SHLIB_SUFFIX@\n";
|
||||
std::string buildType = "CMAKE_CXX_FLAGS_";
|
||||
buildType += m_Makefile->GetDefinition("CMAKE_BUILD_TYPE");
|
||||
buildType = cmSystemTools::UpperCase(buildType);
|
||||
|
@ -315,7 +329,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
|||
std::string ext = source.GetSourceExtension();
|
||||
if(ext == "c" )
|
||||
{
|
||||
compileCommand = "$(CMAKE_C_COMPILER) $(CMAKE_CFLAGS) ";
|
||||
compileCommand = "$(CMAKE_C_COMPILER) $(CMAKE_C_FLAGS) ";
|
||||
compileCommand += extraCompileFlags;
|
||||
if(shared)
|
||||
{
|
||||
|
@ -324,7 +338,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
|||
compileCommand += "$(INCLUDE_FLAGS) -c ";
|
||||
compileCommand +=
|
||||
cmSystemTools::EscapeSpaces(source.GetFullPath().c_str());
|
||||
compileCommand += " /Fo";
|
||||
compileCommand += " $(CMAKE_C_OUTPUT_OBJECT_FILE_FLAG)";
|
||||
compileCommand += objectFile;
|
||||
}
|
||||
else if (ext == "rc")
|
||||
|
@ -352,7 +366,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
|||
compileCommand += "$(INCLUDE_FLAGS) -c ";
|
||||
compileCommand +=
|
||||
cmSystemTools::EscapeSpaces(source.GetFullPath().c_str());
|
||||
compileCommand += " /Fo";
|
||||
compileCommand += " $(CMAKE_C_OUTPUT_OBJECT_FILE_FLAG)";
|
||||
compileCommand += objectFile;
|
||||
}
|
||||
m_QuoteNextCommand = false;
|
||||
|
@ -368,13 +382,13 @@ void cmNMakeMakefileGenerator::OutputSharedLibraryRule(std::ostream& fout,
|
|||
const char* name,
|
||||
const cmTarget &t)
|
||||
{
|
||||
std::string target = m_LibraryOutputPath + name + ".dll";
|
||||
std::string target = m_LibraryOutputPath + name + m_SharedLibraryExtension;
|
||||
std::string depend = "$(";
|
||||
depend += name;
|
||||
depend += "_SRC_OBJS) $(" + std::string(name) + "_DEPEND_LIBS)";
|
||||
std::string command = "link /dll @<<\n";
|
||||
command += "$(" + std::string(name) + "_SRC_OBJS) /out:";
|
||||
std::string dllpath = m_LibraryOutputPath + std::string(name) + ".dll";
|
||||
std::string command = "$(CMAKE_LINKER) $(CMAKE_LINKER_SHARED_LIBRARY_FLAG) @<<\n";
|
||||
command += "$(" + std::string(name) + "_SRC_OBJS) $(CMAKE_LINKER_OUTPUT_FILE_FLAG)";
|
||||
std::string dllpath = m_LibraryOutputPath + std::string(name) + m_SharedLibraryExtension;
|
||||
command += cmSystemTools::EscapeSpaces(dllpath.c_str());
|
||||
command += " ";
|
||||
std::strstream linklibs;
|
||||
|
@ -411,11 +425,11 @@ void cmNMakeMakefileGenerator::OutputStaticLibraryRule(std::ostream& fout,
|
|||
const char* name,
|
||||
const cmTarget &)
|
||||
{
|
||||
std::string target = m_LibraryOutputPath + std::string(name) + ".lib";
|
||||
std::string target = m_LibraryOutputPath + std::string(name) + m_StaticLibraryExtension;
|
||||
std::string depend = "$(";
|
||||
depend += std::string(name) + "_SRC_OBJS)";
|
||||
std::string command = "link -lib @<<\n\t/nologo /out:";
|
||||
std::string libpath = m_LibraryOutputPath + std::string(name) + ".lib";
|
||||
std::string command = "$(CMAKE_LINKER) $(CMAKE_LINKER_STATIC_LIBRARY_FLAG) @<<\n\t$(CMAKE_LINKER_FLAGS) $(CMAKE_LINKER_OUTPUT_FILE_FLAG)";
|
||||
std::string libpath = m_LibraryOutputPath + std::string(name) + m_StaticLibraryExtension;
|
||||
command += cmSystemTools::EscapeSpaces(libpath.c_str());
|
||||
command += " $(";
|
||||
command += std::string(name) + "_SRC_OBJS)";
|
||||
|
@ -435,16 +449,16 @@ void cmNMakeMakefileGenerator::OutputExecutableRule(std::ostream& fout,
|
|||
const cmTarget &t)
|
||||
{
|
||||
std::string target = m_ExecutableOutputPath + name;
|
||||
target += ".exe";
|
||||
target += m_ExecutableExtension;
|
||||
std::string depend = "$(";
|
||||
depend += std::string(name) + "_SRC_OBJS) $(" + std::string(name) + "_DEPEND_LIBS)";
|
||||
std::string command =
|
||||
"$(CMAKE_CXX_COMPILER) $(CMAKE_CXXFLAGS) ";
|
||||
command += "$(" + std::string(name) + "_SRC_OBJS) ";
|
||||
std::string path = m_ExecutableOutputPath + name + ".exe";
|
||||
command += " /Fe" +
|
||||
std::string path = m_ExecutableOutputPath + name + m_ExecutableExtension;
|
||||
command += " $(CMAKE_C_OUTPUT_EXECUTABLE_FILE_FLAG)" +
|
||||
cmSystemTools::EscapeSpaces(path.c_str());
|
||||
command += " /link ";
|
||||
command += " $(CMAKE_C_LINK_EXECUTABLE_FLAG) ";
|
||||
if(t.GetType() == cmTarget::WIN32_EXECUTABLE)
|
||||
{
|
||||
command += " /subsystem:windows ";
|
||||
|
@ -506,7 +520,8 @@ void cmNMakeMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
|
|||
if (lib->first.size() == 0) continue;
|
||||
if(emitted.insert(lib->first).second)
|
||||
{
|
||||
cmRegularExpression reg(".*\\.lib$");
|
||||
std::string regexp = ".*\\" + m_StaticLibraryExtension + "$";
|
||||
cmRegularExpression reg(regexp.c_str());
|
||||
// if it ends in .lib, then it is a full path and should
|
||||
// be escaped, and does not need .lib added
|
||||
if(reg.find(lib->first))
|
||||
|
@ -518,7 +533,7 @@ void cmNMakeMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
|
|||
{
|
||||
librariesLinked += m_LibraryLinkOption;
|
||||
librariesLinked += lib->first;
|
||||
librariesLinked += ".lib ";
|
||||
librariesLinked += m_StaticLibraryExtension + " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -543,7 +558,7 @@ std::string cmNMakeMakefileGenerator::GetOutputExtension(const char* s)
|
|||
{
|
||||
return ".res";
|
||||
}
|
||||
return ".obj";
|
||||
return m_ObjectFileExtension;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1187,7 +1187,7 @@ void cmUnixMakefileGenerator::OutputMakeVariables(std::ostream& fout)
|
|||
"CMAKE_AR = @CMAKE_AR@\n"
|
||||
"CMAKE_AR_ARGS = @CMAKE_AR_ARGS@\n"
|
||||
"CMAKE_C_COMPILER = @CMAKE_C_COMPILER@\n"
|
||||
"CMAKE_CFLAGS = @CMAKE_C_FLAGS@\n"
|
||||
"CMAKE_C_FLAGS = @CMAKE_C_FLAGS@\n"
|
||||
"CMAKE_SHLIB_CFLAGS = @CMAKE_SHLIB_CFLAGS@\n"
|
||||
"\n"
|
||||
"CMAKE_CXX_COMPILER = @CMAKE_CXX_COMPILER@\n"
|
||||
|
@ -1490,7 +1490,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
|||
std::string ext = source.GetSourceExtension();
|
||||
if(ext == "c" )
|
||||
{
|
||||
compileCommand = "$(CMAKE_C_COMPILER) $(CMAKE_CFLAGS) ";
|
||||
compileCommand = "$(CMAKE_C_COMPILER) $(CMAKE_C_FLAGS) ";
|
||||
compileCommand += extraCompileFlags;
|
||||
if(shared)
|
||||
{
|
||||
|
|
|
@ -168,14 +168,14 @@ protected:
|
|||
protected:
|
||||
std::string m_ExecutableOutputPath;
|
||||
std::string m_LibraryOutputPath;
|
||||
private:
|
||||
bool m_CacheOnly;
|
||||
bool m_Recurse;
|
||||
std::string m_SharedLibraryExtension;
|
||||
std::string m_ObjectFileExtension;
|
||||
std::string m_ExecutableExtension;
|
||||
std::string m_StaticLibraryExtension;
|
||||
std::string m_SharedLibraryExtension;
|
||||
std::string m_LibraryPrefix;
|
||||
private:
|
||||
bool m_CacheOnly;
|
||||
bool m_Recurse;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,31 +1,118 @@
|
|||
# microsoft specific config file
|
||||
# Microsoft specific config file
|
||||
|
||||
SET (WORDS_BIGENDIAN )
|
||||
|
||||
SET (HAVE_LIMITS_H 1)
|
||||
|
||||
SET (HAVE_UNISTD_H 1)
|
||||
SET (CMAKE_CXX_COMPILER cl CACHE FILEPATH
|
||||
"Name of C++ compiler used.")
|
||||
|
||||
SET (CMAKE_C_COMPILER cl CACHE FILEPATH
|
||||
"Name of C compiler used.")
|
||||
SET (CMAKE_CFLAGS "/W3 /Zm1000" CACHE STRING
|
||||
|
||||
SET (CMAKE_C_FLAGS "/W3 /Zm1000" CACHE STRING
|
||||
"Flags for C compiler.")
|
||||
|
||||
SET (CMAKE_C_OUTPUT_OBJECT_FILE_FLAG "/Fo" CACHE STRING
|
||||
"Flags used to specify output filename. No space will be appended.")
|
||||
|
||||
SET (CMAKE_C_OUTPUT_EXECUTABLE_FILE_FLAG "/Fe" CACHE STRING
|
||||
"Flags used to specify executable filename. No space will be appended.")
|
||||
|
||||
SET (CMAKE_C_LINK_EXECUTABLE_FLAG "/link" CACHE STRING
|
||||
"Flags used to create an executable.")
|
||||
|
||||
SET (CMAKE_C_LIBPATH_FLAG "-LIBPATH:" CACHE STRING
|
||||
"Flags used to specify a link path. No space will be appended.")
|
||||
|
||||
SET (CMAKE_LINKER link CACHE FILEPATH
|
||||
"Name of linker used.")
|
||||
|
||||
SET (CMAKE_LINKER_FLAGS "/nologo" CACHE STRING
|
||||
"Flags used by the linker.")
|
||||
|
||||
SET (CMAKE_LINKER_SHARED_LIBRARY_FLAG "/dll" CACHE STRING
|
||||
"Flags used to create a shared library.")
|
||||
|
||||
SET (CMAKE_LINKER_STATIC_LIBRARY_FLAG "-lib" CACHE STRING
|
||||
"Flags used to create a static library.")
|
||||
|
||||
SET (CMAKE_LINKER_OUTPUT_FILE_FLAG "/out:" CACHE STRING
|
||||
"Flags used to specify output filename. No space will be appended.")
|
||||
|
||||
SET (CMAKE_BUILD_TYPE Debug CACHE STRING
|
||||
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel")
|
||||
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.")
|
||||
|
||||
SET (CMAKE_CXX_COMPILER cl CACHE FILEPATH
|
||||
"Name of C++ compiler used.")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS_RELEASE "/MD /O2" CACHE STRING
|
||||
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files)")
|
||||
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /Zi /O2" CACHE STRING
|
||||
"Flags used by the compiler during Release with Debug Info builds")
|
||||
"Flags used by the compiler during Release with Debug Info builds.")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS_MINSIZEREL "/MD /O1" CACHE STRING
|
||||
"Flags used by the compiler during release minsize builds")
|
||||
"Flags used by the compiler during release minsize builds.")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS_DEBUG "/MDd /Zi /Od /GZ" CACHE STRING
|
||||
"Flags used by the compiler during debug builds")
|
||||
"Flags used by the compiler during debug builds.")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS "/W3 /Zm1000 /GX /GR" CACHE STRING
|
||||
"Flags used by the compiler during all build types, /GX /GR are for exceptions and rtti in VC++, /Zm1000 increases the compiler's memory allocation to support ANSI C++/stdlib")
|
||||
SET (CMAKE_USE_WIN32_THREADS 1 CACHE BOOL "Use the win32 thread library")
|
||||
SET (CMAKE_STANDARD_WINDOWS_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" CACHE STRING "Libraries linked by defalut with all applications")
|
||||
SET (CMAKE_SHLIB_SUFFIX ".dll" CACHE STRING "Shared library suffix")
|
||||
SET (CMAKE_MODULE_SUFFIX ".dll" CACHE STRING "Module library suffix")
|
||||
SET (CMAKE_MAKE_PROGRAM "nmake" CACHE STRING "Program used to build from makefiles.")
|
||||
"Flags used by the compiler during all build types, /GX /GR are for exceptions and rtti in VC++, /Zm1000 increases the compiler's memory allocation to support ANSI C++/stdlib.")
|
||||
|
||||
SET (CMAKE_USE_WIN32_THREADS 1 CACHE BOOL
|
||||
"Use the win32 thread library.")
|
||||
|
||||
SET (CMAKE_STANDARD_WINDOWS_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" CACHE STRING
|
||||
"Libraries linked by defalut with all applications.")
|
||||
|
||||
SET (CMAKE_OBJECT_FILE_SUFFIX ".obj" CACHE STRING
|
||||
"Object file suffix.")
|
||||
|
||||
SET (CMAKE_EXECUTABLE_SUFFIX ".exe" CACHE STRING
|
||||
"Executable suffix.")
|
||||
|
||||
SET (CMAKE_STATICLIB_SUFFIX ".lib" CACHE STRING
|
||||
"Static library suffix.")
|
||||
|
||||
SET (CMAKE_SHLIB_SUFFIX ".dll" CACHE STRING
|
||||
"Shared library suffix.")
|
||||
|
||||
SET (CMAKE_MODULE_SUFFIX ".dll" CACHE STRING
|
||||
"Module library suffix.")
|
||||
|
||||
SET (CMAKE_MAKE_PROGRAM "nmake" CACHE STRING
|
||||
"Program used to build from makefiles.")
|
||||
|
||||
# The following variables are advanced
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
WORDS_BIGENDIAN
|
||||
HAVE_LIMITS_H
|
||||
HAVE_UNISTD_H
|
||||
CMAKE_C_COMPILER
|
||||
CMAKE_C_FLAGS
|
||||
CMAKE_C_OUTPUT_OBJECT_FILE_FLAG
|
||||
CMAKE_C_OUTPUT_EXECUTABLE_FILE_FLAG
|
||||
CMAKE_C_LINK_EXECUTABLE_FLAG
|
||||
CMAKE_C_LIBPATH_FLAG
|
||||
CMAKE_LINKER
|
||||
CMAKE_LINKER_FLAGS
|
||||
CMAKE_LINKER_SHARED_LIBRARY_FLAG
|
||||
CMAKE_LINKER_STATIC_LIBRARY_FLAG
|
||||
CMAKE_LINKER_OUTPUT_FILE_FLAG
|
||||
CMAKE_BUILD_TYPE
|
||||
CMAKE_CXX_COMPILER
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGSCMAKE_USE_WIN32_THREADS
|
||||
CMAKE_STANDARD_WINDOWS_LIBRARIES
|
||||
CMAKE_OBJECT_FILE_SUFFIX
|
||||
CMAKE_EXECUTABLE_SUFFIX
|
||||
CMAKE_STATICLIB_SUFFIX
|
||||
CMAKE_SHLIB_SUFFIX
|
||||
CMAKE_MODULE_SUFFIX
|
||||
CMAKE_MAKE_PROGRAM
|
||||
)
|
||||
|
|
|
@ -2,76 +2,140 @@
|
|||
# CMakeLocal.make.in should be in the directory where you run configure
|
||||
# in, which need not be the source directory
|
||||
#
|
||||
SET (CMAKE_INSTALL_PREFIX @prefix@ CACHE PATH
|
||||
"Install path prefix, prepended onto install directories")
|
||||
SET (CMAKE_WORDS_BIGENDIAN @CMAKE_WORDS_BIGENDIAN@ )
|
||||
SET (CMAKE_USE_SPROC @CMAKE_USE_SPROC@ CACHE BOOL "Use sproc libs.")
|
||||
SET (CMAKE_WORDS_BIGENDIAN @CMAKE_WORDS_BIGENDIAN@
|
||||
"Byte ordering is big-endian.")
|
||||
|
||||
SET (CMAKE_USE_SPROC @CMAKE_USE_SPROC@ CACHE BOOL
|
||||
"Use sproc libs.")
|
||||
|
||||
SET (CMAKE_USE_PTHREADS @CMAKE_USE_PTHREADS@ CACHE BOOL
|
||||
"Use the pthreads library")
|
||||
"Use the pthreads library.")
|
||||
|
||||
SET (CMAKE_USE_WIN32_THREADS @CMAKE_USE_WIN32_THREADS@ CACHE BOOL
|
||||
"Use the win32 thread library")
|
||||
"Use the win32 thread library.")
|
||||
|
||||
SET (CMAKE_HP_PTHREADS @CMAKE_HP_PTHREADS@ CACHE BOOL
|
||||
"Use HP pthreads")
|
||||
"Use HP pthreads.")
|
||||
|
||||
SET (CMAKE_LIB_EXT @CMAKE_LIB_EXT@ CACHE STRING
|
||||
"Library extension used by this machine" )
|
||||
"Library extension used by this machine.")
|
||||
|
||||
SET (CMAKE_RANLIB "@RANLIB@" CACHE FILEPATH
|
||||
"Library randomizer program used on archive libraries.")
|
||||
|
||||
SET (CMAKE_AR "@CMAKE_AR@" CACHE FILEPATH
|
||||
"Archive program used to make archive libraries.")
|
||||
|
||||
SET (CMAKE_AR_ARGS "@CMAKE_AR_ARGS@" CACHE STRING
|
||||
"Arguments for CMAKE_AR program to create an archive library.")
|
||||
SET (CMAKE_CXX_COMPILER "@CXX@" CACHE FILEPATH "CXX compiler used.")
|
||||
|
||||
SET (CMAKE_CXX_COMPILER "@CXX@" CACHE FILEPATH
|
||||
"Name of C++ compiler used.")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS "@CXXFLAGS@" CACHE STRING
|
||||
"Flags used by CXX compiler")
|
||||
"Flags used by CXX compiler.")
|
||||
|
||||
SET (CMAKE_TEMPLATE_FLAGS "@CMAKE_TEMPLATE_FLAGS@" CACHE STRING
|
||||
"CXX template flags used by compiler")
|
||||
"CXX template flags used by compiler.")
|
||||
|
||||
SET (CMAKE_C_COMPILER "@CC@" CACHE FILEPATH
|
||||
"C compiler used.")
|
||||
SET (CMAKE_C_FLAGS "@CFLAGS@" CACHE STRING "C compiler flags")
|
||||
"Name of C compiler used.")
|
||||
|
||||
SET (CMAKE_C_FLAGS "@CFLAGS@" CACHE STRING
|
||||
"Flags for C compiler.")
|
||||
|
||||
SET (CMAKE_SHLIB_CFLAGS "@CMAKE_SHLIB_CFLAGS@" CACHE STRING
|
||||
"Flag used for building shared library objects" )
|
||||
"Flag used for building shared library objects.")
|
||||
|
||||
SET (CMAKE_SHLIB_BUILD_FLAGS "@CMAKE_SHLIB_BUILD_FLAGS@" CACHE STRING
|
||||
"Flag used by CXX to build a shared library")
|
||||
"Flag used by CXX to build a shared library.")
|
||||
|
||||
SET (CMAKE_MODULE_BUILD_FLAGS "@CMAKE_MODULE_BUILD_FLAGS@" CACHE STRING
|
||||
"Flag used by CXX to build a shared library")
|
||||
"Flag used by CXX to build a shared library.")
|
||||
|
||||
SET (CMAKE_INSTALL_PREFIX @prefix@ CACHE PATH
|
||||
"Install path prefix, prepended onto install directories.")
|
||||
|
||||
SET (CMAKE_OBJECT_FILE_SUFFIX @CMAKE_OBJECT_FILE_SUFFIX@ CACHE STRING
|
||||
"Object file suffix.")
|
||||
|
||||
SET (CMAKE_EXECUTABLE_SUFFIX @CMAKE_EXECUTABLE_SUFFIX@ CACHE STRING
|
||||
"Executable suffix.")
|
||||
|
||||
SET (CMAKE_STATICLIB_SUFFIX @CMAKE_STATICLIB_SUFFIX@ CACHE STRING
|
||||
"Static library suffix.")
|
||||
|
||||
SET (CMAKE_SHLIB_SUFFIX @CMAKE_SHLIB_SUFFIX@ CACHE STRING
|
||||
"Shared library suffix")
|
||||
"Shared library suffix.")
|
||||
|
||||
SET (CMAKE_MODULE_SUFFIX @CMAKE_MODULE_SUFFIX@ CACHE STRING
|
||||
"Module library suffix")
|
||||
"Module library suffix.")
|
||||
|
||||
SET (CMAKE_THREAD_LIBS "@CMAKE_THREAD_LIBS@" CACHE STRING
|
||||
"Thread library used")
|
||||
"Thread library used.")
|
||||
|
||||
SET (CMAKE_DL_LIBS "@CMAKE_DL_LIBS@" CACHE STRING
|
||||
"Dynamic link library to link in.")
|
||||
|
||||
SET (CMAKE_SHLIB_LINK_FLAGS "@CMAKE_SHLIB_LINK_FLAGS@" CACHE STRING
|
||||
"Flags used to link a shared library.")
|
||||
|
||||
SET (CMAKE_MODULE_LINK_FLAGS "@CMAKE_MODULE_LINK_FLAGS@" CACHE STRING
|
||||
"Flags used to link a shared library.")
|
||||
|
||||
SET (CMAKE_SHLIB_LD_LIBS "@CMAKE_SHLIB_LD_LIBS@" CACHE STRING
|
||||
"Libraries used by LD for shared libraries")
|
||||
"Libraries used by LD for shared libraries.")
|
||||
|
||||
SET (CMAKE_SHLIB_RUNTIME_FLAG "@CMAKE_SHLIB_RUNTIME_FLAG@" CACHE STRING
|
||||
"Flag used to specify run-time search paths")
|
||||
"Flag used to specify run-time search paths.")
|
||||
|
||||
SET (CMAKE_SHLIB_RUNTIME_SEP "@CMAKE_SHLIB_RUNTIME_SEP@" CACHE STRING
|
||||
"If null, each runtime path is a separate option. Otherwise, they are all joined, separated by this.")
|
||||
|
||||
# support for X11
|
||||
SET (CMAKE_X_LIBS "@X_PRE_LIBS@ @X_LIBS@ -lX11 -lXext @X_EXTRA_LIBS@" CACHE STRING "Libraries and options used in X11 programs")
|
||||
SET (CMAKE_X_CFLAGS "@X_CFLAGS@" CACHE STRING "X11 extra flags")
|
||||
SET (CMAKE_HAS_X @CMAKE_HAS_X@ CACHE INTERNAL "Is X11 around")
|
||||
SET (CMAKE_NO_ANSI_STREAM_HEADERS @CMAKE_NO_ANSI_STREAM_HEADERS@ CACHE INTERNAL "does the compiler support headers like iostream ")
|
||||
SET (CMAKE_NO_STD_NAMESPACE @CMAKE_NO_STD_NAMESPACE@ CACHE INTERNAL "does the compiler support std:: ")
|
||||
SET (CMAKE_NO_ANSI_FOR_SCOPE @CMAKE_NO_ANSI_FOR_SCOPE@ CACHE INTERNAL "does the compiler support ansi for scoping.")
|
||||
SET (CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@ CACHE INTERNAL "Is the compile GNU C++")
|
||||
SET (CMAKE_ANSI_CFLAGS @CMAKE_ANSI_CFLAGS@ CACHE INTERNAL "What flags are required by the c++ compiler to make it ansi.")
|
||||
SET (CMAKE_ANSI_CXXFLAGS @CMAKE_ANSI_CXXFLAGS@ CACHE INTERNAL "What flags are required by the c++ compiler to make it ansi.")
|
||||
SET (CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION @CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION@ CACHE INTERNAL "does the compiler not support explicit template instantiation.")
|
||||
|
||||
SET (CMAKE_X_LIBS "@X_PRE_LIBS@ @X_LIBS@ -lX11 -lXext @X_EXTRA_LIBS@" CACHE STRING
|
||||
"Libraries and options used in X11 programs.")
|
||||
|
||||
SET (CMAKE_X_CFLAGS "@X_CFLAGS@" CACHE STRING
|
||||
"X11 extra flags.")
|
||||
|
||||
SET (CMAKE_HAS_X @CMAKE_HAS_X@ CACHE INTERNAL
|
||||
"Is X11 around".)
|
||||
|
||||
SET (CMAKE_NO_ANSI_STREAM_HEADERS @CMAKE_NO_ANSI_STREAM_HEADERS@ CACHE INTERNAL
|
||||
"Does the compiler support headers like iostream.")
|
||||
|
||||
SET (CMAKE_NO_STD_NAMESPACE @CMAKE_NO_STD_NAMESPACE@ CACHE INTERNAL
|
||||
"Does the compiler support std::.")
|
||||
|
||||
SET (CMAKE_NO_ANSI_FOR_SCOPE @CMAKE_NO_ANSI_FOR_SCOPE@ CACHE INTERNAL
|
||||
"Does the compiler support ansi for scoping.")
|
||||
|
||||
SET (CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@ CACHE INTERNAL
|
||||
"Is the compile GNU C++.")
|
||||
|
||||
SET (CMAKE_ANSI_CFLAGS @CMAKE_ANSI_CFLAGS@ CACHE INTERNAL
|
||||
"What flags are required by the c++ compiler to make it ansi.")
|
||||
|
||||
SET (CMAKE_ANSI_CXXFLAGS @CMAKE_ANSI_CXXFLAGS@ CACHE INTERNAL
|
||||
"What flags are required by the c++ compiler to make it ansi.")
|
||||
|
||||
SET (CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION @CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION@ CACHE INTERNAL
|
||||
"Does the compiler not support explicit template instantiation.")
|
||||
|
||||
FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES gmake make )
|
||||
|
||||
# the following variables are advanced
|
||||
# The following variables are advanced
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CMAKE_X_LIBS
|
||||
CMAKE_USE_WIN32_THREADS
|
||||
CMAKE_USE_SPROC
|
||||
CMAKE_USE_PTHREADS
|
||||
CMAKE_OBJECT_FILE_SUFFIX
|
||||
CMAKE_EXECUTABLE_SUFFIX
|
||||
CMAKE_STATICLIB_SUFFIX
|
||||
CMAKE_SHLIB_SUFFIX
|
||||
CMAKE_MODULE_SUFFIX
|
||||
CMAKE_INSTALL_PREFIX
|
||||
|
|
|
@ -6,35 +6,52 @@ FIND_PATH(BCB_BIN_PATH bcc32.exe
|
|||
"/Borland/Bcc55/Bin"
|
||||
[HKEY_LOCAL_MACHINE/SOFTWARE/Borland/C++Builder/5.0/RootDir]/Bin
|
||||
)
|
||||
|
||||
SET (BORLAND 1)
|
||||
|
||||
SET (WORDS_BIGENDIAN )
|
||||
|
||||
SET (HAVE_LIMITS_H 1)
|
||||
|
||||
SET (HAVE_UNISTD_H 1)
|
||||
SET (CMAKE_CXX_COMPILER "${BCB_BIN_PATH}/bcc32" CACHE FILEPATH
|
||||
"Name of C++ compiler used.")
|
||||
|
||||
SET (CMAKE_C_COMPILER ${BCB_BIN_PATH}/bcc32 CACHE FILEPATH
|
||||
"Name of C compiler used.")
|
||||
SET (CMAKE_CFLAGS "-w- -whid -waus -wpar" CACHE STRING
|
||||
|
||||
SET (CMAKE_C_FLAGS "-w- -whid -waus -wpar" CACHE STRING
|
||||
"Flags for C compiler.")
|
||||
|
||||
SET (CMAKE_BUILD_TYPE Debug CACHE STRING
|
||||
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel")
|
||||
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.")
|
||||
|
||||
SET (CMAKE_CXX_COMPILER "${BCB_BIN_PATH}/bcc32" CACHE FILEPATH
|
||||
"Name of C++ compiler used.")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS_RELEASE "-O2" CACHE STRING
|
||||
"Flags used by the compiler during release builds.)")
|
||||
"Flags used by the compiler during release builds.")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Od" CACHE STRING
|
||||
"Flags used by the compiler during Release with Debug Info builds")
|
||||
"Flags used by the compiler during Release with Debug Info builds.")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS_MINSIZEREL "-O1" CACHE STRING
|
||||
"Flags used by the compiler during release minsize builds")
|
||||
"Flags used by the compiler during release minsize builds.")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS_DEBUG "-Od" CACHE STRING
|
||||
"Flags used by the compiler during debug builds")
|
||||
"Flags used by the compiler during debug builds.")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS "-w- -whid -waus -wpar" CACHE STRING
|
||||
"Flags used by the compiler during all build types, /GX /GR are for exceptions and rtti in VC++, /Zm1000 increases the compiler's memory allocation to support ANSI C++/stdlib")
|
||||
SET (CMAKE_USE_WIN32_THREADS 1 CACHE BOOL "Use the win32 thread library")
|
||||
SET (CMAKE_STANDARD_WINDOWS_LIBRARIES "import32.lib"
|
||||
CACHE STRING "Libraries linked by defalut with all applications")
|
||||
SET (CMAKE_SHLIB_SUFFIX ".dll" CACHE STRING "Shared library suffix")
|
||||
SET (CMAKE_MODULE_SUFFIX ".dll" CACHE STRING "Module library suffix")
|
||||
"Flags used by the compiler during all build types, /GX /GR are for exceptions and rtti in VC++, /Zm1000 increases the compiler's memory allocation to support ANSI C++/stdlib.")
|
||||
|
||||
SET (CMAKE_USE_WIN32_THREADS 1 CACHE BOOL
|
||||
"Use the win32 thread library.")
|
||||
|
||||
SET (CMAKE_STANDARD_WINDOWS_LIBRARIES "import32.lib" CACHE STRING
|
||||
"Libraries linked by defalut with all applications.")
|
||||
|
||||
SET (CMAKE_SHLIB_SUFFIX ".dll" CACHE STRING
|
||||
"Shared library suffix.")
|
||||
|
||||
SET (CMAKE_MODULE_SUFFIX ".dll" CACHE STRING
|
||||
"Module library suffix.")
|
||||
|
||||
FIND_PROGRAM(CMAKE_MAKE_PROGRAM make ${BCB_BIN_PATH})
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,21 +1,37 @@
|
|||
# microsoft specific config file
|
||||
# Microsoft specific config file
|
||||
|
||||
SET (WORDS_BIGENDIAN )
|
||||
|
||||
SET (HAVE_LIMITS_H 1)
|
||||
|
||||
SET (HAVE_UNISTD_H 1)
|
||||
|
||||
SET (CMAKE_CXX_COMPILER VC++60 CACHE STRING
|
||||
"Name of C++ compiler used.")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS_RELEASE "/MD /O2" CACHE STRING
|
||||
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files)")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /Zi /O2" CACHE STRING
|
||||
"Flags used by the compiler during Release with Debug Info builds")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS_MINSIZEREL "/MD /O1" CACHE STRING
|
||||
"Flags used by the compiler during release minsize builds")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS_DEBUG "/MDd /Zi /Od /GZ" CACHE STRING
|
||||
"Flags used by the compiler during debug builds")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS "/W3 /Zm1000 /GX /GR" CACHE STRING
|
||||
"Flags used by the compiler during all build types, /GX /GR are for exceptions and rtti in VC++, /Zm1000 increases the compiler's memory allocation to support ANSI C++/stdlib")
|
||||
SET (CMAKE_USE_WIN32_THREADS 1 CACHE BOOL "Use the win32 thread library")
|
||||
SET (CMAKE_MAKE_PROGRAM "msdev" CACHE STRING "Program used to build from dsp files.")
|
||||
|
||||
SET (CMAKE_USE_WIN32_THREADS 1 CACHE BOOL
|
||||
"Use the win32 thread library")
|
||||
|
||||
SET (CMAKE_MAKE_PROGRAM "msdev" CACHE STRING
|
||||
"Program used to build from dsp files.")
|
||||
|
||||
# The following variables are advanced
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
WORDS_BIGENDIAN
|
||||
HAVE_UNISTD_H
|
||||
|
|
Loading…
Reference in New Issue