Commit dbe62f5a authored by vijaysm's avatar vijaysm

Merged in vijaysm/cmake-fixes (pull request #273)

Several critical fixes for CMake builds
parents 3b78d257 71e54e4d
...@@ -31,7 +31,10 @@ if ( CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang") ) ...@@ -31,7 +31,10 @@ if ( CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang") )
FORCE_ADD_FLAGS(CMAKE_C_FLAGS "${MOAB_CXX_FLAGS}") FORCE_ADD_FLAGS(CMAKE_C_FLAGS "${MOAB_CXX_FLAGS}")
FORCE_ADD_FLAGS(CMAKE_Fortran_FLAGS "${MOAB_CXX_FLAGS}") FORCE_ADD_FLAGS(CMAKE_Fortran_FLAGS "${MOAB_CXX_FLAGS}")
ENABLE_IF_SUPPORTED(MOAB_CXX_FLAGS "-fpermissive") ENABLE_IF_SUPPORTED(MOAB_CXX_FLAGS "-fpermissive")
ENABLE_IF_SUPPORTED(MOAB_CXX_FLAGS "-Wno-c++11-long-long") ENABLE_IF_SUPPORTED(MOAB_CXX_FLAGS "-Wno-ignored-attributes")
ENABLE_IF_SUPPORTED(MOAB_CXX_FLAGS "-Wno-deprecated-declarations")
# Need to enable or check for this only if user asks for C++11 support
# ENABLE_IF_SUPPORTED(MOAB_CXX_FLAGS "-Wno-c++11-long-long")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8)
ENABLE_IF_SUPPORTED(MOAB_CXX_FLAGS "-Wno-unused-local-typedefs") ENABLE_IF_SUPPORTED(MOAB_CXX_FLAGS "-Wno-unused-local-typedefs")
endif() endif()
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# #
MACRO(TEST_BIG_ENDIAN VARIABLE) MACRO(TEST_BIG_ENDIAN VARIABLE)
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") IF(HAVE_${VARIABLE} MATCHES ^HAVE_${VARIABLE}$)
MESSAGE(STATUS "Check if the system is big endian") MESSAGE(STATUS "Check if the system is big endian")
MESSAGE(STATUS "Searching 16 bit integer") MESSAGE(STATUS "Searching 16 bit integer")
...@@ -93,6 +93,6 @@ MACRO(TEST_BIG_ENDIAN VARIABLE) ...@@ -93,6 +93,6 @@ MACRO(TEST_BIG_ENDIAN VARIABLE)
"Determining if the system is big endian failed with the following output:\n${OUTPUT}\nTestEndianess.c:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n") "Determining if the system is big endian failed with the following output:\n${OUTPUT}\nTestEndianess.c:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n")
SET(${VARIABLE}) SET(${VARIABLE})
ENDIF(HAVE_${VARIABLE}) ENDIF(HAVE_${VARIABLE})
ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") ENDIF(HAVE_${VARIABLE} MATCHES ^HAVE_${VARIABLE}$)
ENDMACRO(TEST_BIG_ENDIAN) ENDMACRO(TEST_BIG_ENDIAN)
...@@ -28,7 +28,7 @@ if ( MOAB_HAVE_MPI ) ...@@ -28,7 +28,7 @@ if ( MOAB_HAVE_MPI )
${CMAKE_BINARY_DIR}/src/parallel) ${CMAKE_BINARY_DIR}/src/parallel)
endif () endif ()
target_link_libraries( FBiGeomMOAB MOAB ) target_link_libraries( FBiGeomMOAB iMesh MOAB )
set_target_properties( set_target_properties(
FBiGeomMOAB FBiGeomMOAB
......
...@@ -2358,7 +2358,7 @@ ErrorCode mb_mesh_set_flag_test() ...@@ -2358,7 +2358,7 @@ ErrorCode mb_mesh_set_flag_test()
unsigned int flags; unsigned int flags;
rval = mb->get_meshset_options( set, flags ); rval = mb->get_meshset_options( set, flags );
CHKERR(rval); CHKERR(rval);
if(!MESHSET_SET&flags || MESHSET_TRACK_OWNER&flags || MESHSET_ORDERED&flags){ if(!(MESHSET_SET&flags) || (MESHSET_TRACK_OWNER&flags) || (MESHSET_ORDERED&flags) ){
std::cerr << "set should be MESHSET_SET only, flags=" << flags << std::endl; std::cerr << "set should be MESHSET_SET only, flags=" << flags << std::endl;
return MB_FAILURE; return MB_FAILURE;
} }
......
add_subdirectory(point_location) add_subdirectory(point_location)
set( LIBS MOAB ) set( LIBS MOAB )
set( TESTS seqperf.cpp set( TESTS adj_mem_time_test.cpp
adj_mem_time_test.cpp
) )
if(MOAB_HAVE_HDF5) if(MOAB_HAVE_HDF5)
set( TESTS ${TESTS} adj_time.cpp ) set( TESTS ${TESTS} adj_time.cpp )
endif(MOAB_HAVE_HDF5) endif(MOAB_HAVE_HDF5)
set( TOOLS perf.cpp set( TOOLS seqperf.cpp
perf.cpp
perftool.cpp perftool.cpp
umr_perf.cpp ) umr_perf.cpp )
......
...@@ -491,7 +491,7 @@ int main(int argc, char* argv[]) ...@@ -491,7 +491,7 @@ int main(int argc, char* argv[])
rval = mb.write_file(tmp_output_file.str().c_str()); rval = mb.write_file(tmp_output_file.str().c_str());
if (MB_SUCCESS != rval) if (MB_SUCCESS != rval)
{ {
std::cerr << tmp_output_file << " : failed to write file." << std::endl; std::cerr << tmp_output_file.str() << " : failed to write file." << std::endl;
std::cerr << " Error code: " << mb.get_error_string(rval) << " (" std::cerr << " Error code: " << mb.get_error_string(rval) << " ("
<< rval << ")" << std::endl; << rval << ")" << std::endl;
std::string errstr; std::string errstr;
......
...@@ -267,7 +267,7 @@ static void print_tag_counts( const std::vector<TagCounts>& counts ) ...@@ -267,7 +267,7 @@ static void print_tag_counts( const std::vector<TagCounts>& counts )
for (EntityType t = MBVERTEX; t != MBMAXTYPE; ++t) for (EntityType t = MBVERTEX; t != MBMAXTYPE; ++t)
if (widths[t]) if (widths[t])
printf( " %s", dashes(widths[t]) ); printf( " %s", dashes(widths[t]) );
printf("\n"); printf("\n");
// print data // print data
for (size_t i = 0; i < counts.size(); ++i) { for (size_t i = 0; i < counts.size(); ++i) {
......
Markdown is supported
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