Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
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
dCache
cta
Commits
fdde17dd
Commit
fdde17dd
authored
6 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
Simplified cmake/Findgmock.cmake
parent
609d8d53
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/Findgmock.cmake
+17
-40
17 additions, 40 deletions
cmake/Findgmock.cmake
with
17 additions
and
40 deletions
cmake/Findgmock.cmake
+
17
−
40
View file @
fdde17dd
# cmake/Findgmock.cmake
# The CERN Tape Archive(CTA) project
# Copyright(C) 2015 CERN
#
# This file is part of the Castor project.
# See http://castor.web.cern.ch/castor
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Copyright (C) 2003 CERN
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
# castor-dev@cern.ch
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# We define here 2 main variables : GMOCK_LINK and GMOCK_SRC
# for slc6, GMOCK_SRC will be empty
# for cc7 and later it's GMOCK_LINK that will be empty
# If not empty, GMOCK_LIB is pointing to the gmock library
# If not empty, GMOCK_SRC will contain the name of the gmock-all.cc
# to be used (something like "/usr/src/gmock/gmock-all.cc")
# Executables should use GMOCK_LIB AND GMOCK_SRC so that
# compilation will work on all platforms
#
# This module will set the following variables:
# GMOCK_SRC
# deal with the gmock-all.cc file
set
(
GMOCK_ALL_FILE
"/usr/src/gmock/gmock-all.cc"
)
IF
(
EXISTS
${
GMOCK_ALL_FILE
}
)
set
(
GMOCK_SRC
${
GMOCK_ALL_FILE
}
CACHE FILEPATH
"Location of gmock-all.cc or empty if none exists"
)
ELSE
(
EXISTS
${
GMOCK_ALL_FILE
}
)
set
(
GMOCK_SRC
""
CACHE FILEPATH
"Location of gmock-all.cc or empty if none exists"
)
ENDIF
(
EXISTS
${
GMOCK_ALL_FILE
}
)
set
(
GMOCK_SRC
"/usr/src/gmock/gmock-all.cc"
)
# deal with the gmock library
find_library
(
GMOCK_LIB gmock
)
IF
(
GMOCK_LIB STREQUAL GMOCK_LIB-NOTFOUND
)
set
(
GMOCK_LIB
""
)
ENDIF
(
GMOCK_LIB STREQUAL GMOCK_LIB-NOTFOUND
)
if
(
NOT EXISTS
${
GMOCK_SRC
}
)
unset
(
GMOCK_SRC
)
endif
(
NOT EXISTS
${
GMOCK_SRC
}
)
# check that either GMOCK_LIB or GMOCK_SRC is set
IF
(
NOT GMOCK_SRC AND NOT GMOCK_LIB
)
Message
(
FATAL_ERROR
"Gmock not found"
)
ENDIF
(
NOT GMOCK_SRC AND NOT GMOCK_LIB
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
gmock DEFAULT_MSG
GMOCK_SRC
)
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