From 6c3a599e742b15ce71c96786cd7470a9cb1a1252 Mon Sep 17 00:00:00 2001 From: Sverre Briseid Date: Thu, 13 Mar 2025 18:09:34 +0100 Subject: [PATCH 1/6] Enforcing C++14, required for newest additions to the code. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca1e8f1f..1cdd66cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,9 @@ SET(GoTools_VERSION_PATCH 0) SET(GoTools_VERSION "${GoTools_VERSION_MAJOR}.${GoTools_VERSION_MINOR}.${GoTools_VERSION_PATCH}") SET(GoTools_ABI_VERSION "${GoTools_VERSION_MAJOR}.${GoTools_VERSION_MINOR}" CACHE INTERNAL "GoTools ABI version") +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + option(BUILD_AS_SHARED_LIBRARY "Build the project as shared libraries?" OFF) #message("gotools: BUILD_AS_SHARED_LIBRARY: " ${BUILD_AS_SHARED_LIBRARY}) From ad12c2636011ebda5f3f7585a2a10938dc29445a Mon Sep 17 00:00:00 2001 From: Sverre Briseid Date: Fri, 11 Apr 2025 17:53:23 +0200 Subject: [PATCH 2/6] Setting permissions for installed apps. --- viewlib/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/viewlib/CMakeLists.txt b/viewlib/CMakeLists.txt index 04a82d48..506f5cb2 100644 --- a/viewlib/CMakeLists.txt +++ b/viewlib/CMakeLists.txt @@ -327,8 +327,13 @@ set(APP_RUNTIME_DIR "${APP_BUILD_DIR}/${CONFIG_SUBDIR}") # Install everything from app/[config]/ (or app/) into install bin directory install(DIRECTORY "${APP_RUNTIME_DIR}/" DESTINATION ${CMAKE_INSTALL_BINDIR} + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE FILES_MATCHING PATTERN "*" PATTERN ".svn" EXCLUDE + PATTERN ".pdb" EXCLUDE + PATTERN ".ilk" EXCLUDE ) #message(STATUS "Will install app runtime files from: ${APP_RUNTIME_DIR}") From c7d6c0479d48b342b6965364208747fc77eed0e1 Mon Sep 17 00:00:00 2001 From: Sverre Briseid Date: Fri, 11 Apr 2025 18:29:38 +0200 Subject: [PATCH 3/6] Requiring C++14 standard. --- CMakeLists.txt | 1 + INSTALL | 8 ++------ README | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e1bab41..d0fa70ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ SET(GoTools_ABI_VERSION "${GoTools_VERSION_MAJOR}.${GoTools_VERSION_MINOR}" CACH set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_DEBUG_POSTFIX "d") option(BUILD_AS_SHARED_LIBRARY "Build the project as shared libraries?" OFF) diff --git a/INSTALL b/INSTALL index 0447a341..88c55932 100644 --- a/INSTALL +++ b/INSTALL @@ -67,17 +67,13 @@ $ sudo make install Compilers ********* -The code uses certain features of the new C++ standard C++11, most notably the smart pointer -std::shared_ptr. On Linux this has been tested using GCC 4.7.3 and newer. On Windows this has been -tested using Visual Studio 2010 and newer. +The code uses certain features of the C++ standard C++14. On Linux this should be compatible with +gcc 5.0 and newer. On Windows this should be compatible with Visual Studio 2019 and newer. A set of options to control the build can be accessed in CMake (names starting with 'GoTools'). For example, you can turn on/off building the various modules by checking/unchecking GoTools_COMPILE_MODULE_. -If a C++11 compliant compiler is not available, the building process uses boost::shared_ptr instead -of std::shared_ptr. - Windows ********* diff --git a/README b/README index c0545664..e2f553e5 100644 --- a/README +++ b/README @@ -20,10 +20,10 @@ Newmat was written by Robert Davies, http://www.robertnz.com. Requirements: * CMake - see: www.cmake.org * Linux: Tested on the latest LTS version of Ubuntu (with a transition period, currently tested on - 22.04, using gcc version 11.4.0) on x64. It should work with older gcc versions down to 4.8, but + 22.04, using gcc version 11.4.0) on x64. It should work with older gcc versions down to 5.0, but it is not actively supported. It has been tested to run on ARM64, but it is not actively supported. -* Windows: Tested with Visual Studio 2015, 2019 and 2022 on x64. Older versions are not +* Windows: Tested with Visual Studio 2019 and 2022 on x64. Older versions are not actively supported. It has been tested to run on ARM64 (using x64 emulation), but it is not actively supported. * MacOS: We do not officially support MacOS. It has beed tested to run on ARM64, but it is not From 1243da8e308d003506a3ee0f8603ae7e10eea5c6 Mon Sep 17 00:00:00 2001 From: Sverre Briseid Date: Fri, 11 Apr 2025 18:49:06 +0200 Subject: [PATCH 4/6] Updated INSTALL section for macOS with command line steps. --- INSTALL | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/INSTALL b/INSTALL index 88c55932..61d5c550 100644 --- a/INSTALL +++ b/INSTALL @@ -232,3 +232,10 @@ export CXXFLAGS="$CXXFLAGS -I/opt/homebrew/opt/libomp/include" export LDFLAGS="$LDFLAGS -Wl,-rpath,/opt/homebrew/opt/libomp/lib -L/opt/homebrew/opt/libomp/lib -lomp" Logging and shared builds are not supported on MacOS. + +Command line steps for configuring, building and installing: +$ mkdir build_release +$ cd build_release +$ cmake ../ -G Ninja +$ cmake --build . +$ sudo cmake --install . From c66116037a7d82e3fa2baf1a2370f6a10942e78e Mon Sep 17 00:00:00 2001 From: Sverre Briseid Date: Fri, 11 Apr 2025 18:52:45 +0200 Subject: [PATCH 5/6] macOS: Added freeglut as requirement, resolves GL/gl.h issue. --- INSTALL | 1 + 1 file changed, 1 insertion(+) diff --git a/INSTALL b/INSTALL index 61d5c550..40e6c801 100644 --- a/INSTALL +++ b/INSTALL @@ -211,6 +211,7 @@ $ brew install pugixml $ brew install boost $ brew install qt5 $ brew install jsoncpp +$ brew install freeglut The following environment variables should be set (for instance in your .bashrc file if you are using bash): From 27f9e8452a65241a684cb21f70192ea90266eb16 Mon Sep 17 00:00:00 2001 From: Sverre Briseid Date: Fri, 11 Apr 2025 19:15:56 +0200 Subject: [PATCH 6/6] Not building sisl viewer on macOS. --- INSTALL | 1 - 1 file changed, 1 deletion(-) diff --git a/INSTALL b/INSTALL index 40e6c801..61d5c550 100644 --- a/INSTALL +++ b/INSTALL @@ -211,7 +211,6 @@ $ brew install pugixml $ brew install boost $ brew install qt5 $ brew install jsoncpp -$ brew install freeglut The following environment variables should be set (for instance in your .bashrc file if you are using bash):