Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libmtime
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
icon-libraries
libmtime
Commits
2ace1f21
Commit
2ace1f21
authored
4 months ago
by
Sergey Kosukhin
Browse files
Options
Downloads
Patches
Plain Diff
cmake: drop unnecessary variable expansions
parent
ffb11263
No related branches found
No related tags found
1 merge request
!50
Refactor CMake scripts
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+8
-12
8 additions, 12 deletions
CMakeLists.txt
cmake/config.cmake.in
+2
-4
2 additions, 4 deletions
cmake/config.cmake.in
doc/CMakeLists.txt
+1
-1
1 addition, 1 deletion
doc/CMakeLists.txt
src/CMakeLists.txt
+3
-3
3 additions, 3 deletions
src/CMakeLists.txt
with
14 additions
and
20 deletions
CMakeLists.txt
+
8
−
12
View file @
2ace1f21
...
...
@@ -41,32 +41,28 @@ if(BUILD_DOCUMENTATION)
add_subdirectory
(
doc
)
endif
()
export
(
EXPORT
"
${
PROJECT_NAME
}
-targets"
FILE
"
${
PROJECT_BINARY_DIR
}
/
${
PROJECT_NAME
}
-targets.cmake"
)
export
(
EXPORT
"mtime-targets"
FILE
"
${
PROJECT_BINARY_DIR
}
/mtime-targets.cmake"
)
include
(
CMakePackageConfigHelpers
)
configure_package_config_file
(
"
${
PROJECT_SOURCE_DIR
}
/cmake/config.cmake.in"
"
${
PROJECT_BINARY_DIR
}
/
${
PROJECT_NAME
}
-config.cmake"
"
${
PROJECT_BINARY_DIR
}
/
mtime
-config.cmake"
INSTALL_DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
/cmake"
NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
write_basic_package_version_file
(
"
${
PROJECT_BINARY_DIR
}
/
${
PROJECT_NAME
}
-config-version.cmake"
VERSION
"
${
${
PROJECT_NAME
}
_VERSION_MAJOR
}
.
${
${
PROJECT_NAME
}
_VERSION_MINOR
}
"
"
${
PROJECT_BINARY_DIR
}
/
mtime
-config-version.cmake"
VERSION
"
${
mtime
_VERSION_MAJOR
}
.
${
mtime
_VERSION_MINOR
}
"
COMPATIBILITY AnyNewerVersion
)
install
(
EXPORT
"
${
PROJECT_NAME
}
-targets"
DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
/
${
PROJECT_NAME
}
/cmake"
EXPORT
"mtime-targets"
DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
/mtime/cmake"
)
install
(
FILES
"
${
PROJECT_BINARY_DIR
}
/
${
PROJECT_NAME
}
-config.cmake"
"
${
PROJECT_BINARY_DIR
}
/
${
PROJECT_NAME
}
-config-version.cmake"
DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
/
${
PROJECT_NAME
}
/cmake"
FILES
"
${
PROJECT_BINARY_DIR
}
/
mtime
-config.cmake"
"
${
PROJECT_BINARY_DIR
}
/
mtime
-config-version.cmake"
DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
/
mtime
/cmake"
)
This diff is collapsed.
Click to expand it.
cmake/config.cmake.in
+
2
−
4
View file @
2ace1f21
...
...
@@ -5,9 +5,7 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/
@PROJECT_NAME@
-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/
mtime
-targets.cmake")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
@PROJECT_NAME@ REQUIRED_VARS @PROJECT_NAME@_DIR
)
find_package_handle_standard_args(mtime REQUIRED_VARS mtime_DIR)
This diff is collapsed.
Click to expand it.
doc/CMakeLists.txt
+
1
−
1
View file @
2ace1f21
...
...
@@ -6,7 +6,7 @@
find_package
(
Doxygen REQUIRED dot
)
# Autoconf args translation
set
(
PACKAGE_NAME
"
${
PROJECT_NAME
}
"
)
set
(
PACKAGE_NAME
"
mtime
"
)
set
(
PACKAGE_VERSION
"
${
PROJECT_VERSION
}
"
)
set
(
DX_DOCDIR
"doxygen-doc"
)
set
(
top_srcdir
"
${
PROJECT_SOURCE_DIR
}
"
)
...
...
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
3
−
3
View file @
2ace1f21
...
...
@@ -39,7 +39,7 @@ if(MTIME_ENABLE_FORTRAN_HL)
)
endif
()
add_library
(
${
PROJECT_NAME
}
::mtime ALIAS mtime
)
add_library
(
mtime
::mtime ALIAS mtime
)
set
(
Fortran_MODULE_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/mod"
)
set_target_properties
(
...
...
@@ -48,7 +48,7 @@ set_target_properties(
Fortran_MODULE_DIRECTORY
"
${
Fortran_MODULE_DIRECTORY
}
"
C_STANDARD 99
C_STANDARD_REQUIRED ON
EXPORT_NAME
${
PROJECT_NAME
}
::mtime
EXPORT_NAME
mtime
::mtime
)
target_include_directories
(
...
...
@@ -62,7 +62,7 @@ target_include_directories(
$<INSTALL_INTERFACE:$<$<COMPILE_LANGUAGE:C>:
${
CMAKE_INSTALL_INCLUDEDIR
}
>>
)
install
(
TARGETS mtime EXPORT
"
${
PROJECT_NAME
}
-targets"
)
install
(
TARGETS mtime EXPORT
"
mtime
-targets"
)
install
(
DIRECTORY
"
${
Fortran_MODULE_DIRECTORY
}
/"
"
${
PROJECT_SOURCE_DIR
}
/include/"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment