Skip to content

Commit

Permalink
cmp - merge origin and upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
claudioperez committed Sep 27, 2021
2 parents f727e40 + 613c342 commit 67e4f97
Show file tree
Hide file tree
Showing 24 changed files with 73 additions and 18 deletions.
16 changes: 13 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@ set(OPS_EXTERNALS_DIR "${PROJECT_SOURCE_DIR}/OTHER/")

set(OPS_BUNDLED_DIR "${PROJECT_SOURCE_DIR}/OTHER/")
set(OPS_SRC_DIR "${PROJECT_SOURCE_DIR}/SRC/")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/ETC/cmake")
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${PROJECT_SOURCE_DIR}/TOOLS/cmake")
include(OpenSeesFunctions)
include(conan)

# add Conan stuff for external dependencies
if(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
conan_basic_setup(TARGETS)
endif()

# pseudo target modeling all exteral packages
add_library(OPS_External_packages INTERFACE)
#add_library(OPS_Element_libraries INTERFACE)

# include user config
include(${PROJECT_SOURCE_DIR}/Conf.cmake)
Expand All @@ -56,10 +61,12 @@ if (UNIX)
include(OpenSeesDependenciesUnix)
if(APPLE)
message(STATUS ">>> MacOS")
add_compile_definitions(_LINUX _UNIX _TCL85)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -ffloat-store -std=c++17 ")
else()
message(STATUS ">>> LINUX")
add_compile_definitions(_LINUX _UNIX _TCL85)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -ffloat-store")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -ffloat-store -std=c++17")
endif()
endif()

Expand Down Expand Up @@ -97,6 +104,9 @@ enable_language(Fortran)
# C++
#--------------------------------------
#add_link_options(-rdynamic)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cqls <TARGET> <LINK_FLAGS> <OBJECTS>")
#add_compile_options(-g)

Expand Down
2 changes: 1 addition & 1 deletion CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "x64-Debug",
"generator": "Visual Studio 16 2019 Win64",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"inheritEnvironments": [ "msvc_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"buildCommandArgs": "",
Expand Down
3 changes: 1 addition & 2 deletions OTHER/UMFPACK/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# people.engr.tamu.edu/davis/suitesparse.html
#==============================================================================
# Claudio Perez

cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.16)
project(UMFPACK)
include_directories(. ../AMD)
add_compile_options(-fexceptions -fPIC)
Expand Down
3 changes: 2 additions & 1 deletion SRC/actor/channel/TCP_Socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,8 @@ TCP_Socket::addToProgram()
static int
GetHostAddr(char *host, char *IntAddr)
{
register struct hostent *hostptr;
// register struct hostent *hostptr;
struct hostent *hostptr;

if ( (hostptr = gethostbyname(host)) == NULL)
return (-1);
Expand Down
3 changes: 2 additions & 1 deletion SRC/actor/channel/UDP_Socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,8 @@ UDP_Socket::addToProgram()
static int
GetHostAddr(char *host, char *IntAddr)
{
register struct hostent *hostptr;
// register struct hostent *hostptr;
struct hostent *hostptr;

if ( (hostptr = gethostbyname(host)) == NULL)
return (-1);
Expand Down
3 changes: 2 additions & 1 deletion SRC/domain/domain/DomainModalProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
// What: "@(#) DomainModalProperties.h, revA"

#include <stdlib.h>
#include <math.h>
//#include <math.h>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
Expand Down
6 changes: 0 additions & 6 deletions SRC/element/HUelements/MultipleNormalSpring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,8 @@
#include <elementAPI.h>

//extern void printCommand(int argc, TCL_Char **argv);
#ifdef _WIN32
extern "C" double dbesi0(double);
extern "C" double dbesi1(double);
#else
extern double dbesi0(double);
extern double dbesi1(double);
#endif



static bool errDetected(bool ifNoError, const char *msg){
Expand Down
6 changes: 3 additions & 3 deletions SRC/renderer/Renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ class Renderer
virtual int drawPoint(const Vector &, const Vector &rgb1, int tag = 0, int mode = 0, int width = 1) =0;

virtual int drawLine(const Vector &, const Vector &,
float V1, float V2, int tag = 0, int mode = 0) ;// =0;
float V1, float V2, int tag = 0, int mode = 0) =0;
virtual int drawLine(const Vector &end1, const Vector &end2,
const Vector &rgb1, const Vector &rgb2,int tag = 0, int mode = 0) ;//=0;
const Vector &rgb1, const Vector &rgb2,int tag = 0, int mode = 0) =0;

virtual int drawCube(const Matrix &points, const Vector &values, int tag = 0, int mode = 0);

Expand Down Expand Up @@ -102,7 +102,7 @@ class Renderer

virtual int setProjectionMode(const char *mode) =0; //parallel or perspective
virtual int setFillMode(const char *mode) =0; // wire or fill
virtual int setLineWidth(int width) ;// = 0; // line width
virtual int setLineWidth(int width) =0; // line width

virtual int setPRP(float u, float v, float n) =0; // eye location if
// perspective, dirn to +ViewPlane if parallel
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 49 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
from conans import ConanFile, CMake, tools
import os

class OpenSeesDependencies(ConanFile):
name = "OpenSeesDependencies"
version = "1.0.0"
description = "rovides Software Packages needed to build OpenSees"
license = "BSD 3-Clause"
author = "fmk fmckenna@berkeley.edu"
settings = {"os": None, "build_type": None, "compiler": None, "arch": ["x86_64"]}
options = {"shared": [True, False]}
default_options = {"mkl-static:threaded": False, "ipp-static:simcenter_backend": True}
generators = "cmake"
build_policy = "missing"
requires = "libmysqlclient/8.0.25", \
"tcl/8.6.10"
# Custom attributes for Bincrafters recipe conventions
_source_subfolder = "source_subfolder"
_build_subfolder = "build_subfolder"
# Set short paths for Windows
short_paths = True
scm = {
"type": "git", # Use "type": "svn", if local repo is managed using SVN
"subfolder": _source_subfolder,
"url": "auto",
"revision": "auto"
}


def configure(self):
self.options.shared = False

def configure_cmake(self):
cmake = CMake(self)
cmake.configure(source_folder=self._source_subfolder)
return cmake

def build(self):
cmake = self.configure_cmake()
cmake.build()

def package(self):
self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder)
cmake = self.configure_cmake()
cmake.install()
self.copy("*", dst="bin", src=self._source_subfolder + "/applications")

def package_info(self):
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))

0 comments on commit 67e4f97

Please sign in to comment.