llnl / llnl/TopoMS

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

Open
#7 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
17
Forks
4
PR merge metrics
No merged PRs in 30d

Description

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()

# ------------------------------------------------------------------------------

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the proposed CMakeLists.txt with the repository's current build setup and configure the project on Ubuntu 18.04. Build topoms-cli and, with TOPOMS_BUILD_UI enabled, topoms-ui. Done means both targets compile reproducibly while unnecessary compiler and linker settings are removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.