ENH: do not test for c and cxx flags on visual studio as it does not work yet

This commit is contained in:
Bill Hoffman 2005-07-29 14:02:51 -04:00
parent db28904467
commit 76e14b4f1a
6 changed files with 54 additions and 33 deletions

View File

@ -374,21 +374,27 @@ int main()
#else #else
cmPassed("CMake CMAKE_CXX_FLAGS is being passed to the compiler."); cmPassed("CMake CMAKE_CXX_FLAGS is being passed to the compiler.");
#endif #endif
std::string gen = CMAKE_GENERATOR;
// visual studio is currently broken for c flags
if(gen.find("Visual") == gen.npos)
{
#ifdef TEST_C_FLAGS #ifdef TEST_C_FLAGS
cmFailed("CMake CMAKE_C_FLAGS are being passed to c++ files the compiler!"); cmFailed("CMake CMAKE_C_FLAGS are being passed to c++ files the compiler!");
#else #else
cmPassed("CMake CMAKE_C_FLAGS are not being passed to c++ files."); cmPassed("CMake CMAKE_C_FLAGS are not being passed to c++ files.");
#endif #endif
char msg[1024]; char msg[1024];
if(TestCFlags(msg)) if(TestCFlags(msg))
{ {
cmPassed( cmPassed(
"CMake CMAKE_C_FLAGS are being passed to c files and CXX flags are not."); "CMake CMAKE_C_FLAGS are being passed to c files and CXX flags are not.");
} }
else else
{ {
cmFailed(msg); cmFailed(msg);
}
} }
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// Test ADD_DEFINITIONS // Test ADD_DEFINITIONS

View File

@ -70,3 +70,4 @@
// Test SET CACHE FORCE // Test SET CACHE FORCE
#cmakedefine FORCE_TEST #cmakedefine FORCE_TEST
#define CMAKE_GENERATOR "${CMAKE_GENERATOR}"

View File

@ -374,21 +374,27 @@ int main()
#else #else
cmPassed("CMake CMAKE_CXX_FLAGS is being passed to the compiler."); cmPassed("CMake CMAKE_CXX_FLAGS is being passed to the compiler.");
#endif #endif
std::string gen = CMAKE_GENERATOR;
// visual studio is currently broken for c flags
if(gen.find("Visual") == gen.npos)
{
#ifdef TEST_C_FLAGS #ifdef TEST_C_FLAGS
cmFailed("CMake CMAKE_C_FLAGS are being passed to c++ files the compiler!"); cmFailed("CMake CMAKE_C_FLAGS are being passed to c++ files the compiler!");
#else #else
cmPassed("CMake CMAKE_C_FLAGS are not being passed to c++ files."); cmPassed("CMake CMAKE_C_FLAGS are not being passed to c++ files.");
#endif #endif
char msg[1024]; char msg[1024];
if(TestCFlags(msg)) if(TestCFlags(msg))
{ {
cmPassed( cmPassed(
"CMake CMAKE_C_FLAGS are being passed to c files and CXX flags are not."); "CMake CMAKE_C_FLAGS are being passed to c files and CXX flags are not.");
} }
else else
{ {
cmFailed(msg); cmFailed(msg);
}
} }
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// Test ADD_DEFINITIONS // Test ADD_DEFINITIONS

View File

@ -70,3 +70,4 @@
// Test SET CACHE FORCE // Test SET CACHE FORCE
#cmakedefine FORCE_TEST #cmakedefine FORCE_TEST
#define CMAKE_GENERATOR "${CMAKE_GENERATOR}"

View File

@ -374,21 +374,27 @@ int main()
#else #else
cmPassed("CMake CMAKE_CXX_FLAGS is being passed to the compiler."); cmPassed("CMake CMAKE_CXX_FLAGS is being passed to the compiler.");
#endif #endif
std::string gen = CMAKE_GENERATOR;
// visual studio is currently broken for c flags
if(gen.find("Visual") == gen.npos)
{
#ifdef TEST_C_FLAGS #ifdef TEST_C_FLAGS
cmFailed("CMake CMAKE_C_FLAGS are being passed to c++ files the compiler!"); cmFailed("CMake CMAKE_C_FLAGS are being passed to c++ files the compiler!");
#else #else
cmPassed("CMake CMAKE_C_FLAGS are not being passed to c++ files."); cmPassed("CMake CMAKE_C_FLAGS are not being passed to c++ files.");
#endif #endif
char msg[1024]; char msg[1024];
if(TestCFlags(msg)) if(TestCFlags(msg))
{ {
cmPassed( cmPassed(
"CMake CMAKE_C_FLAGS are being passed to c files and CXX flags are not."); "CMake CMAKE_C_FLAGS are being passed to c files and CXX flags are not.");
} }
else else
{ {
cmFailed(msg); cmFailed(msg);
}
} }
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// Test ADD_DEFINITIONS // Test ADD_DEFINITIONS

View File

@ -70,3 +70,4 @@
// Test SET CACHE FORCE // Test SET CACHE FORCE
#cmakedefine FORCE_TEST #cmakedefine FORCE_TEST
#define CMAKE_GENERATOR "${CMAKE_GENERATOR}"