Commit 24ab72de authored by Thomas Steinreiter's avatar Thomas Steinreiter
Browse files

made libmesh paths configurable in cmake

parent e0736748
......@@ -5,12 +5,9 @@ find_package(MPI) # Built-in in CMake
include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/common.cmake)
#TODO: this is ugly, use cached variables
set(LIBMESH_INCLUDE_PATH $ENV{HOME}/libmesh/libmesh_install/include)
set(LIBMESH_LIBRARY_PATH $ENV{HOME}/libmesh/libmesh_install/lib)
set(LOCAL_INCLUDE_PATH /usr/local/include)
set(LOCAL_LIBRARY_PATH /usr/local/lib)
set(LIBMESH_LIBRARIES mesh_opt)
set(LIBMESH_INCLUDE_PATH /usr/local/include CACHE PATH "path to libMesh include directory")
set(LIBMESH_LIBRARY_PATH /usr/local/lib CACHE PATH "path to libMesh library directory")
set(LIBMESH_LIBRARY mesh_opt CACHE FILEPATH "name of libmesh library" )
# ==================================================================================================
......@@ -33,7 +30,7 @@ if (MPI_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost -std=c++14")
endif()
set_target_properties(${NAME} PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED YES)
target_link_libraries(${NAME} ${LIBMESH_LIBRARIES} ${MPI_LIBRARIES})
target_link_libraries(${NAME} ${LIBMESH_LIBRARY} ${MPI_LIBRARIES})
install(TARGETS ${NAME} DESTINATION bin)
message("** Enabling '${NAME}': with MPI")
else()
......
......@@ -9,7 +9,7 @@ int main(int argc, char* argv[]) {
libMesh::LibMeshInit init(argc, argv);
if (argc < 2) {
libmesh_error_msg("Usage: " << argv[0] << "in.mesh [-o out.mesh]");
libmesh_error_msg("Usage: " << argv[0] << " in.mesh [-o out.mesh]");
}
const auto& input_mesh = std::string { argv[1] };
......
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