Git Product home page Git Product logo

topoms's People

Contributors

bhatiaharsh avatar srk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

topoms's Issues

FIELDTYPE = OTHER not supported

Tried using FIELDTYPE = OTHER with current master, got:

Config::parse() - Invalid Fieldtype (OTHER). Expected CHG or POT. Aborting!

Fails with clang: non-constant-expression cannot be narrowed from type 'unsigned long' to 'float' in initializer list

In file included from /usr/ports/science/topoms/work/TopoMS-1.1/topoms/src/TopoMS-vtk.cpp:78:
/usr/ports/science/topoms/work/TopoMS-1.1/topoms/include/TopoMS.h:295:25: error: non-constant-expression cannot be narrowed from type 'unsigned long' to 'float' in initializer list [-Wc++11-narrowing]
        float cut[3] = {m_metadata.m_grid_dims[0], m_metadata.m_grid_dims[1], m_metadata.m_grid_dims[2]};
                        ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/science/topoms/work/TopoMS-1.1/topoms/include/TopoMS.h:295:25: note: insert an explicit cast to silence this issue
        float cut[3] = {m_metadata.m_grid_dims[0], m_metadata.m_grid_dims[1], m_metadata.m_grid_dims[2]};
                        ^~~~~~~~~~~~~~~~~~~~~~~~~
                        static_cast<float>(      )
/usr/ports/science/topoms/work/TopoMS-1.1/topoms/include/TopoMS.h:295:52: error: non-constant-expression cannot be narrowed from type 'unsigned long' to 'float' in initializer list [-Wc++11-narrowing]
        float cut[3] = {m_metadata.m_grid_dims[0], m_metadata.m_grid_dims[1], m_metadata.m_grid_dims[2]};
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/science/topoms/work/TopoMS-1.1/topoms/include/TopoMS.h:295:52: note: insert an explicit cast to silence this issue
        float cut[3] = {m_metadata.m_grid_dims[0], m_metadata.m_grid_dims[1], m_metadata.m_grid_dims[2]};
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
                                                   static_cast<float>(      )
/usr/ports/science/topoms/work/TopoMS-1.1/topoms/include/TopoMS.h:295:79: error: non-constant-expression cannot be narrowed from type 'unsigned long' to 'float' in initializer list [-Wc++11-narrowing]
        float cut[3] = {m_metadata.m_grid_dims[0], m_metadata.m_grid_dims[1], m_metadata.m_grid_dims[2]};
                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/science/topoms/work/TopoMS-1.1/topoms/include/TopoMS.h:295:79: note: insert an explicit cast to silence this issue
        float cut[3] = {m_metadata.m_grid_dims[0], m_metadata.m_grid_dims[1], m_metadata.m_grid_dims[2]};
                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
                                                                              static_cast<float>(      )
3 errors generated.
[6/10] /usr/local/bin/clang++70   -I/usr/ports/science/topoms/work/TopoMS-1.1/msc/include -I/usr/ports/science/topoms/work/TopoMS-1.1/topoms/include -std=c++0x -fpermissive -w         -fopenmp=libomp -O2 -pipe -fno-omit-frame-pointer -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer -MD -MT topoms-cli/CMakeFiles/topoms-cli.dir/src/main.cpp.o -MF topoms-cli/CMakeFiles/topoms-cli.dir/src/main.cpp.o.d -o topoms-cli/CMakeFiles/topoms-cli.dir/src/main.cpp.o -c /usr/ports/science/topoms/work/TopoMS-1.1/topoms-cli/src/main.cpp

Made topoms-cli and topoms-ui compile under Ubuntu 18.04.1LTS

Made a new CMakeLists.txt. This evolved over many many iterations and probably has quite a few unnecessary parts.

====

------------------------------------------------------------------------------

CMake file for TopoMS

------------------------------------------------------------------------------

cmake_minimum_required(VERSION 3.9)

message(STATUS "> configuring TopoMS in (" ${CMAKE_CURRENT_SOURCE_DIR} ")")

project(TopoMS LANGUAGES CXX VERSION 1.1 DESCRIPTION "TopoMS")
set(CMAKE_BUILD_TYPE Release)

#set(CMAKE_VERBOSE_MAKEFILE 1)

------------------------------------------------------------------------------

compiler configuration

#if(NOT CMAKE_COMPILER_IS_GNUCXX)

message(FATAL_ERROR "TopoMS requires a GNU compiler. CMake will fail.")

#endif()

Compiler flags

set(CMAKE_CXX_FLAGS "-O3 -I/usr/include/GL/ ") ## Optimize
set(CMAKE_CXX_FLAGS "-std=c++0x -fpermissive -w ")

set(CMAKE_SHARED_LINKER_FLAGS "-s -lstdc++ -lGL -lQt5Xml -lQt5Designer") ## Strip binary
#set(CMAKE_SHARED_LINKER_FLAGS "-s -lc++ ") ## Strip binary
set(CMAKE_EXE_LINKER_FLAGS "-s -lstdc++ -lGL -lQt5Xml -lQt5Designer") ## Strip binary
#set(CMAKE_EXE_LINKER_FLAGS "-s -lc++ ") ## Strip binary
#-lc++ for Apple

------------------------------------------------------------------------------

subdirectories

set(PATH_EXT ${CMAKE_CURRENT_SOURCE_DIR}/external)
set(PATH_MSC ${CMAKE_CURRENT_SOURCE_DIR}/msc)
set(PATH_TOPOMS ${CMAKE_CURRENT_SOURCE_DIR}/topoms)
set(PATH_CLI ${CMAKE_CURRENT_SOURCE_DIR}/topoms-cli)
set(PATH_UI ${CMAKE_CURRENT_SOURCE_DIR}/topoms-ui)

#message(STATUS " > PATH_MSC: " ${PATH_MSC})
#message(STATUS " > PATH_TOPOMS: " ${PATH_TOPOMS})
#message(STATUS " > PATH_CLI: " ${PATH_CLI})
#message(STATUS " > PATH_UI: " ${PATH_UI})

target names

set(TRG_LIB topoms)
set(TRG_CLI topoms-cli)
set(TRG_UI topoms-ui)

------------------------------------------------------------------------------

OpenMP

#find_package(OpenMP REQUIRED)

#message(STATUS "OpenMP_CXX_FLAGS: " ${OpenMP_CXX_FLAGS})
#message(STATUS "OpenMP_EXE_LINKER_FLAGS: " ${OpenMP_EXE_LINKER_FLAGS})

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -fopenmp -DGL_GLEXT_PROTOTYPES -DUSE_GLEW -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/GL/ ")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS} -lgomp -lGL -lQt5OpenGL -lGLEW -lQt5Xml -lQt5Core -lQt5Designer ")

------------------------------------------------------------------------------

VTK

find_package(VTK 7.1
HINTS ${PATH_EXT}/lib/cmake/vtk-7.1)

if(VTK_FOUND)
message(STATUS "Found VTK " ${VTK_VERSION} ": " ${VTK_INCLUDE_DIRS})
include(${VTK_USE_FILE})
add_definitions(-DUSE_VTK=TRUE)
endif(VTK_FOUND)

------------------------------------------------------------------------------

TopoMS

add_subdirectory(topoms)
add_subdirectory(topoms-cli)

OPTION(TOPOMS_BUILD_UI "Build User Interface" OFF)
if(TOPOMS_BUILD_UI)
add_subdirectory(topoms-ui)
endif()

------------------------------------------------------------------------------

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.