Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
wenqing
ogs
Commits
d1fba71f
Verified
Commit
d1fba71f
authored
Jun 23, 2020
by
Lars Bilke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CMake] Do not build vtkdiff or gtest when BUILD_TESTING=OFF
parent
3c484e09
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
6 deletions
+10
-6
CMakeLists.txt
CMakeLists.txt
+1
-1
ThirdParty/CMakeLists.txt
ThirdParty/CMakeLists.txt
+5
-3
scripts/cmake/SubmoduleSetup.cmake
scripts/cmake/SubmoduleSetup.cmake
+3
-1
scripts/cmake/test/OgsTest.cmake
scripts/cmake/test/OgsTest.cmake
+1
-1
No files found.
CMakeLists.txt
View file @
d1fba71f
...
...
@@ -272,7 +272,7 @@ include_directories(
${
CMAKE_CURRENT_SOURCE_DIR
}
/ThirdParty/spdlog/include
)
# vtkdiff
if
(
EXISTS
${
PROJECT_SOURCE_DIR
}
/ThirdParty/vtkdiff/CMakeLists.txt
)
if
(
EXISTS
${
PROJECT_SOURCE_DIR
}
/ThirdParty/vtkdiff/CMakeLists.txt
AND BUILD_TESTING
)
add_subdirectory
(
ThirdParty/vtkdiff
)
install
(
PROGRAMS $<TARGET_FILE:vtkdiff> DESTINATION bin COMPONENT ogs_extras
)
endif
()
...
...
ThirdParty/CMakeLists.txt
View file @
d1fba71f
add_subdirectory
(
spdlog
)
set
(
DISABLE_WARNINGS_TARGETS spdlog
)
set
(
gtest_force_shared_crt ON CACHE INTERNAL
""
)
# Use dynamic MSVC runtime
set
(
INSTALL_GTEST OFF CACHE INTERNAL
""
)
add_subdirectory
(
googletest
)
if
(
BUILD_TESTING
)
set
(
gtest_force_shared_crt ON CACHE INTERNAL
""
)
# Use dynamic MSVC runtime
set
(
INSTALL_GTEST OFF CACHE INTERNAL
""
)
add_subdirectory
(
googletest
)
endif
()
# This is a workaround for Travis builds.
option
(
OGS_USE_OPTIONAL_SUBMODULES
"Option for enabling optional submodules"
OFF
)
...
...
scripts/cmake/SubmoduleSetup.cmake
View file @
d1fba71f
...
...
@@ -18,9 +18,11 @@ set(REQUIRED_SUBMODULES
ThirdParty/spdlog
ThirdParty/tclap
ThirdParty/tetgen
ThirdParty/vtkdiff
${
OGS_ADDITIONAL_SUBMODULES_TO_CHECKOUT
}
)
if
(
BUILD_TESTING
)
list
(
APPEND REQUIRED_SUBMODULES ThirdParty/vtkdiff
)
endif
()
if
(
OGS_BUILD_UTILS
)
# Required by the partmesh tool, which is build with utils only.
list
(
APPEND REQUIRED_SUBMODULES ThirdParty/metis
)
...
...
scripts/cmake/test/OgsTest.cmake
View file @
d1fba71f
function
(
OgsTest
)
if
(
NOT OGS_BUILD_CLI
)
if
(
NOT OGS_BUILD_CLI
OR NOT BUILD_TESTING
)
return
()
endif
()
set
(
options LARGE
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment