Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f89ad81
use system provided newmat library
akva2 Apr 1, 2025
3e7835c
use system provided ttl library
akva2 Apr 1, 2025
b642a2d
use system provided sisl library
akva2 Apr 1, 2025
98536cf
gotools-core: use GNUInstallDirs
akva2 Apr 1, 2025
5cd7c6f
gotrivariate: install config files
akva2 Apr 1, 2025
84ee9a0
parametrization: install config files
akva2 Apr 1, 2025
90709db
GoIgeslib: install config files
akva2 Apr 1, 2025
728bcd8
GoImplicitization: install config files
akva2 Apr 1, 2025
016c2cf
GoIntersections: install config files
akva2 Apr 1, 2025
3e14e13
GoLRSplines2D: use GNUInstallDirs
akva2 Apr 1, 2025
00026ca
GoLrsplines3D: install config files
akva2 Apr 1, 2025
2c121d9
GoTopology: install config files
akva2 Apr 1, 2025
0e0ed32
GoCompositeModel: install config files
akva2 Apr 1, 2025
9e25e08
GoTrivariateModel: install config files
akva2 Apr 1, 2025
ba956af
GoQualityModule: install config files
akva2 Apr 1, 2025
cd81a70
GoIsogeometricModel: install config files
akva2 Apr 1, 2025
3eacfe4
Pulled in akva2 pack changes. Added minor changes.
sbriseid Apr 9, 2025
d338459
Removed find cmake for sisl, ttl and cmake, keeping the modules insid…
sbriseid Apr 10, 2025
138b119
Fixed windows issue with cmake config install location.
sbriseid Apr 10, 2025
39656e6
Fixed windows issue with cmake config install location.
sbriseid Apr 10, 2025
de95fcc
Fixed windows issue with cmake config install location.
sbriseid Apr 10, 2025
b4e6d88
Updated ttl to master with new cmake changes.
sbriseid Apr 10, 2025
bdb71c2
Renamed windows only GoTools_INSTALL_PREFIX to GoTools_WINDOWS_INSTAL…
sbriseid Apr 11, 2025
e36e87f
Updated install guide.
sbriseid Apr 11, 2025
30d7a3d
Increased version number to 5.0.0. First bump in 13 years, lots of ch…
sbriseid Apr 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
gotools-core/include/GoTools/geometry/GoTools_version.h
doc
gpl/generate_gpl_headers
*~
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ PROJECT(GoTools)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)

# Set version info
SET(GoTools_VERSION_MAJOR 4)
SET(GoTools_VERSION_MINOR 3)
SET(GoTools_VERSION_MAJOR 5)
SET(GoTools_VERSION_MINOR 0)
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")
Expand Down Expand Up @@ -108,7 +108,7 @@ ENDIF(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
# Set install prefix on Windows
IF(WIN32)
SET(CMAKE_INSTALL_PREFIX CACHE INTERNAL "")
SET(GoTools_INSTALL_PREFIX "$ENV{PROGRAMFILES}/SINTEF/GoTools"
SET(GoTools_WINDOWS_INSTALL_PREFIX "$ENV{PROGRAMFILES}/SINTEF/GoTools"
CACHE PATH "Path to install GoTools")
ENDIF(WIN32)
# Organize the project in folders (VS only?)
Expand Down
46 changes: 30 additions & 16 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -71,28 +71,28 @@ A set of options to control the build can be accessed in CMake (names starting w
example, you can turn on/off building the various modules by checking/unchecking
GoTools_COMPILE_MODULE_<modulename>.

If a C++11 compliant compiler is not available, the building process uses boost::shared_ptr instead of
std::shared_ptr.
If a C++11 compliant compiler is not available, the building process uses boost::shared_ptr instead
of std::shared_ptr.

Windows
*********

The code has been tested using Visual Studio 2015, 2019 and 2022, with x64.

Make sure that your installment of Visual Studio includes support for Visual C++. When installing Visual
Studio you should select "Desktop development with C++" from the Workloads options. If you did not do
that then you must launch the Visual Studio installer and select "Modify", then select "Desktop
development with C++". Follow further instructions.
Make sure that your installment of Visual Studio includes support for Visual C++. When installing
Visual Studio you should select "Desktop development with C++" from the Workloads options. If you
did not do that then you must launch the Visual Studio installer and select "Modify", then select
"Desktop development with C++". Follow further instructions.

Note that Visual Studio introduced binary compatibility in Visual Studio 2015, allowing the user to mix
binaries built by the VS toolsets v140, v141, v142 and v143 (Visual Studio 2015 and later, with some
specific restrictions). The linker must use a toolset at least as recent as the newest toolset used by
the binaries.
Note that Visual Studio introduced binary compatibility in Visual Studio 2015, allowing the user to
mix binaries built by the VS toolsets v140, v141, v142 and v143 (Visual Studio 2015 and later, with
some specific restrictions). The linker must use a toolset at least as recent as the newest toolset
used by the binaries.

How to edit environment variables:
- Open the settings application.
- Search for env, select: "Edit the system environment variables" (or "Edit environment variables for
your account" to add them to your user only).
- Search for env, select: "Edit the system environment variables" (or "Edit environment variables
for your account" to add them to your user only).

Boost:
- Download a binary release for your Visual Studio version.
Expand Down Expand Up @@ -161,20 +161,34 @@ CMake:
- On Windows 10 the HOME variable is not set. This is needed by the cmake setup. Add HOME to the
user environment variables, pointing to the home directory (typically 'C:\Users\<username>').
- For 64 bit applications using Visual Studio 2015 you should make sure to choose x64 when
generating the solution (default is x86).
generating the solution using cmake-gui (default is x86).
- Optionally you may run cmake from the command line, in this example using Visual Studio 2019 on
an Intel/AMD 64-bit system:
$ mkdir build_msvc2019
$ cd build_msvc2019
$ cmake ../ -G "Visual Studio 16 2019" -A x64

Build the project in Release mode from the build folder (replace with 'Debug' for building in debug
mode):
$ cmake --build . --config Release --parallel

Install using gsudo/sudo (or run in a shell with administrator privileges):
$ gsudo cmake --install .

Building the gotools Visual Studio solution:
- Open the gotools Visual Studio solution file that was generated by cmake. Choose either Release or
Debug, build the solution by pressing 'F7'.

Running the tests from a shell (like Git Bash):
- Run the tests in default (release) mode:
$ ctest.exe
$ ctest
- Run the tests in parallel:
$ ctest -j ${NUMBER_OF_PROCESSORS}
- Run the tests in debug mode:
$ ctest.exe -C debug
$ ctest -C debug
- Run only the acceptance tests (use unit or integration for the other test types, using a unique
substring like 'cep' will also work):
$ ctest.exe -L acceptance
$ ctest -L acceptance


MacOS
Expand Down
67 changes: 49 additions & 18 deletions compositemodel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,29 +123,60 @@ endif()
# Create a tmp dir for generated data.
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/tmp)

# 'install' target
# === Install Targets and Export Package ===

include(CMakePackageConfigHelpers)

# 'install' target
IF(WIN32)
# Windows
# lib
INSTALL(TARGETS GoCompositeModel DESTINATION ${GoTools_INSTALL_PREFIX}/lib)
#include
INSTALL(DIRECTORY include/GoTools/compositemodel
DESTINATION ${GoTools_INSTALL_PREFIX}/include/GoTools
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
set(CMAKE_INSTALL_LIBDIR ${GoTools_WINDOWS_INSTALL_PREFIX}/lib)
set(CMAKE_INSTALL_INCLUDEDIR ${GoTools_WINDOWS_INSTALL_PREFIX}/include)
set(CMAKE_INSTALL_BINDIR ${GoTools_WINDOWS_INSTALL_PREFIX}/bin)
ELSE(WIN32)
# Linux
#lib
INSTALL(TARGETS GoCompositeModel DESTINATION lib COMPONENT compositemodel)
# include
INSTALL(DIRECTORY include/GoTools/compositemodel
DESTINATION include/GoTools
COMPONENT compositemodel-dev
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
include(GNUInstallDirs)
ENDIF(WIN32)

# Install the GoCompositeModel target with export set
install(TARGETS GoCompositeModel
EXPORT GoCompositeModelTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

# Install headers
install(DIRECTORY include/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
)

# Export the targets to a file
install(EXPORT GoCompositeModelTargets
FILE GoCompositeModelTargets.cmake
#NAMESPACE GoTools:: # So consumer can do target_link_libraries(... GoTools::GoToolsCore)
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/GoCompositeModel
)

# Generate and install the Config and Version files
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/GoCompositeModelConfigVersion.cmake"
VERSION ${GoTools_VERSION_MAJOR}.${GoTools_VERSION_MINOR}.${GoTools_VERSION_PATCH}
COMPATIBILITY SameMajorVersion
)

configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/GoCompositeModelConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/GoCompositeModelConfig.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/GoCompositeModel
)

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/GoCompositeModelConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/GoCompositeModelConfigVersion.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/GoCompositeModel
)

SET(CPACK_STRIP_FILES ${CPACK_STRIP_FILES} libGoCompositeModel.so)
9 changes: 9 additions & 0 deletions compositemodel/cmake/GoCompositeModelConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/GoCompositeModelTargets.cmake")

# Legacy compatibility
set(GoCompositeModel_LIBRARIES GoCompositeModel)

# Optionally set variables
set(GoCompositeModel_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include")
35 changes: 19 additions & 16 deletions gotools-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,36 +98,39 @@ if (GoTools_COPY_DATA)
DESTINATION ${GoToolsCore_BINARY_DIR}/examples)
endif()

# Set default installation prefix
# IF(WIN32)
# SET(GoTools_INSTALL_PREFIX "$ENV{PROGRAMFILES}/SINTEF/GoTools" CACHE PATH "Path to install GoTools")
# ENDIF()
if(NOT DEFINED GoTools_INSTALL_PREFIX)
SET(GoTools_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Path to install GoTools")
endif()

# === Install Targets and Export Package ===

include(CMakePackageConfigHelpers)

IF(WIN32)
# Windows
set(CMAKE_INSTALL_LIBDIR ${GoTools_WINDOWS_INSTALL_PREFIX}/lib)
set(CMAKE_INSTALL_INCLUDEDIR ${GoTools_WINDOWS_INSTALL_PREFIX}/include)
set(CMAKE_INSTALL_BINDIR ${GoTools_WINDOWS_INSTALL_PREFIX}/bin)
ELSE(WIN32)
# Linux
include(GNUInstallDirs)
ENDIF(WIN32)

# Install the GoToolsCore target
install(TARGETS GoToolsCore
EXPORT GoToolsCoreTargets
ARCHIVE DESTINATION ${GoTools_INSTALL_PREFIX}/lib
LIBRARY DESTINATION ${GoTools_INSTALL_PREFIX}/lib
RUNTIME DESTINATION ${GoTools_INSTALL_PREFIX}/bin
INCLUDES DESTINATION ${GoTools_INSTALL_PREFIX}/include
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

# Install headers
install(DIRECTORY include/
DESTINATION ${GoTools_INSTALL_PREFIX}/include
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
)

# Export the targets
install(EXPORT GoToolsCoreTargets
FILE GoToolsCoreTargets.cmake
DESTINATION ${GoTools_INSTALL_PREFIX}/lib/cmake/GoToolsCore
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/GoToolsCore
)

# Generate version file
Expand All @@ -141,14 +144,14 @@ write_basic_package_version_file(
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/GoToolsCoreConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/GoToolsCoreConfig.cmake"
INSTALL_DESTINATION ${GoTools_INSTALL_PREFIX}/lib/cmake/GoToolsCore
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/GoToolsCore
)

# Install the config files
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/GoToolsCoreConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/GoToolsCoreConfigVersion.cmake"
DESTINATION ${GoTools_INSTALL_PREFIX}/lib/cmake/GoToolsCore
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/GoToolsCore
)

# Optional stripping
Expand Down
67 changes: 49 additions & 18 deletions igeslib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,60 @@ if (GoTools_COPY_DATA)
DESTINATION ${GoIgeslib_BINARY_DIR}/examples)
endif()

# 'install' target
# === Install Targets and Export Package ===

include(CMakePackageConfigHelpers)

# 'install' target
IF(WIN32)
# Windows
# lib
INSTALL(TARGETS GoIgeslib DESTINATION ${GoTools_INSTALL_PREFIX}/lib)
# include
INSTALL(DIRECTORY include/GoTools/igeslib
DESTINATION ${GoTools_INSTALL_PREFIX}/include/GoTools
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
set(CMAKE_INSTALL_LIBDIR ${GoTools_WINDOWS_INSTALL_PREFIX}/lib)
set(CMAKE_INSTALL_INCLUDEDIR ${GoTools_WINDOWS_INSTALL_PREFIX}/include)
set(CMAKE_INSTALL_BINDIR ${GoTools_WINDOWS_INSTALL_PREFIX}/bin)
ELSE(WIN32)
# Linux
# lib
INSTALL(TARGETS GoIgeslib DESTINATION lib COMPONENT igeslib)
# include
INSTALL(DIRECTORY include/GoTools/igeslib
COMPONENT igeslib-dev
DESTINATION include/GoTools
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
include(GNUInstallDirs)
ENDIF(WIN32)

# Install the GoToolsCore target with export set
install(TARGETS GoIgeslib
EXPORT GoIgeslibTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

# Install headers
install(DIRECTORY include/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
)

# Export the targets to a file
install(EXPORT GoIgeslibTargets
FILE GoIgeslibTargets.cmake
#NAMESPACE GoTools:: # So consumer can do target_link_libraries(... GoTools::GoToolsCore)
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/GoIgeslib
)

# Generate and install the Config and Version files
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/GoIgeslibConfigVersion.cmake"
VERSION ${GoTools_VERSION_MAJOR}.${GoTools_VERSION_MINOR}.${GoTools_VERSION_PATCH}
COMPATIBILITY SameMajorVersion
)

configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/GoIgeslibConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/GoIgeslibConfig.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/GoIgeslib
)

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/GoIgeslibConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/GoIgeslibConfigVersion.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/GoIgeslib
)

SET(CPACK_STRIP_FILES ${CPACK_STRIP_FILES} libGoIgeslib.so)
9 changes: 9 additions & 0 deletions igeslib/cmake/GoIgeslibConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/GoIgesLibTargets.cmake")

# Legacy compatibility
set(GoIgesLib_LIBRARIES GoIgesLib)

# Optionally set variables
set(GoIgesLib_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include")
Loading