Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some modifications for an upcoming guix package #20

Merged
merged 3 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 18 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,26 @@ set(CMAKE_CXX_EXTENSIONS OFF)

# --- CPM ---
include(cmake/CPM.cmake)
CPMFindPackage(
NAME tclap
GIT_REPOSITORY https://git.code.sf.net/p/tclap/code
VERSION 1.4.0
GIT_TAG 81b3d2a0c47895c22e9bb8c577f5ab521f76e5d2
DOWNLOAD_ONLY YES
)
if(tclap_ADDED AND NOT TARGET tclap)
if(GUIX_BUILD)
find_path(_tclap_include UnlabeledValueArg.h PATH_SUFFIXES tclap REQUIRED)
add_library(tclap INTERFACE IMPORTED)
target_include_directories(
tclap SYSTEM INTERFACE ${tclap_SOURCE_DIR}/include
tclap SYSTEM INTERFACE ${_tclap_include} ${_tclap_include}/..
)
else()
CPMFindPackage(
NAME tclap
GIT_REPOSITORY https://git.code.sf.net/p/tclap/code
GIT_TAG 81b3d2a0c47895c22e9bb8c577f5ab521f76e5d2
VERSION 1.4.0
DOWNLOAD_ONLY YES
)
if(tclap_ADDED)
add_library(tclap INTERFACE IMPORTED)
target_include_directories(
tclap SYSTEM INTERFACE ${tclap_SOURCE_DIR}/include
)
endif()
endif()

set(VTK_COMPONENTS IOXML)
Expand Down Expand Up @@ -76,6 +84,7 @@ endif()

add_executable(vtkdiff vtkdiff.cpp)
target_link_libraries(vtkdiff tclap VTK::IOXML)
install(TARGETS vtkdiff RUNTIME)

# Set compiler helper variables
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
Expand Down
6 changes: 3 additions & 3 deletions vtkdiff.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* \copyright
* Copyright (c) 2015-2025, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* Distributed under the BSD 3-Clause "New" or "Revised" license.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*/
Expand Down Expand Up @@ -87,11 +87,11 @@ auto parseCommandLine(int argc, char* argv[]) -> Args
"VtkDiff software.\n"
"Copyright (c) 2015-2025, OpenGeoSys Community "
"(http://www.opengeosys.org) "
"Distributed under a Modified BSD License. "
"Distributed under the BSD 3-Clause 'New' or 'Revised' License. "
"See accompanying file LICENSE.txt or "
"http://www.opengeosys.org/project/license",
' ',
"0.1");
"1.0.0");

TCLAP::UnlabeledValueArg<std::string> vtk_input_a_arg(
"input-file-a",
Expand Down