FindSimModSuite.cmake fails if there is no arch folders under "lib"
It seems that if simmetrix libraries are installed under the /lib without any arch folders present the cmake configuration fails. The reason seems to be that SIM_ARCHOS will get set to the wrong thing.
For example, if libSim*.a files are under simroot/lib then SIM_ARCHOS gets set to one of the .a files.
One simple solution seems to be to add the following lines here https://github.com/SCOREC/core/blob/f66ef983d00ce7c295cd2c090aae0644e893f87a/cmake/FindSimModSuite.cmake#L110
IF( IS_DIRECTORY "${SIMMODSUITE_INSTALL_DIR}/lib/${SIM_ARCHOS}" )
MESSAGE(STATUS "Is a dir")
ELSE()
MESSAGE(STATUS "Is not a dir")
set(SIM_ARCHOS "")
ENDIF()
message(STATUS "SIM_ARCHOS ${SIM_ARCHOS}")
@cwsmith can you tell me if there is a better way to do this? Otherwise, I can update the file and commit it to the repo.
The easiest thing to do is to set CMAKE_PREFIX_PATH to point at the lib dirs. For example:
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/path/to/simmodsuite/install/include:\
/path/to/simmodsuite/install/lib:\
/path/to/simmodsuite/install/lib/acisKrnl:\
/path/to/simmodsuite/install/lib/psKrnl
@mortezah Did setting CMAKE_PREFIX_PATH work for you?
@cwsmith I will test this on MIT machines today and let you know.
@cwsmith It did not work, still the same problem.
The SCOREC install tree for SimModSuite has the following structure
| lib
|------ x64_rhel6_gcc44
|------ x64_rhel7_gcc48
and the purpose of SIM_ARCHOS is to pick one of those folders. At MIT the libraries (the .a file) are directly under /lib/, and the part of the FindSimModSuite that handles the directory structure picks one of the .a files. Specifically, if I print out SIM_ARCHOS I get the value libSimPartitionedMesh-mpi.a