Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
aa3b2675
Commit
aa3b2675
authored
Aug 26, 2016
by
Victor Kotlyar
Browse files
Added suport for building only cmdline on SL6
parent
a2c2ef0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
aa3b2675
...
...
@@ -25,7 +25,7 @@ set(CMAKE_C_FLAGS "-fPIC -pedantic -Wall -Wextra -Werror -Wno-unused-parameter")
# following:
#
# ClientSimulator.hpp:65: error: ISO C++ prohibits anonymous structs
set
(
CMAKE_CXX_FLAGS
"-fPIC -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Wno-long-long
-std=c++1y
-fstack-protector-all"
)
set
(
CMAKE_CXX_FLAGS
"-fPIC -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Wno-long-long -fstack-protector-all
-Wnon-virtual-dtor
"
)
#
# A maximalist error checking parameter combo has been suggested by S. Ponce and D. Come:
# to be tested once we have a stable compilation on CC7:
...
...
@@ -36,29 +36,24 @@ set(CMAKE_CXX_FLAGS "-fPIC -pedantic -Wall -Wextra -Werror -Wno-unused-parameter
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"-g"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-g"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wnon-virtual-dtor"
)
set
(
BUILD_CMDLINE_ONLY FALSE
)
# Switch on support for c++0x if the compiler is gcc 4.4.7 or clang
execute_process
(
COMMAND
${
CMAKE_C_COMPILER
}
-dumpversion
OUTPUT_VARIABLE GCC_VERSION
)
if
(
CMAKE_COMPILER_IS_GNUCC
)
if
(
GCC_VERSION VERSION_GREATER 4.4.6
)
message
(
STATUS
"Detected gcc >= 4.4.7 - switching on support for c++1y"
)
if
(
GCC_VERSION VERSION_EQUAL 4.4.7
)
message
(
STATUS
"Detected gcc = 4.4.7 - build cmdline only with c++0x"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++0x"
)
set
(
BUILD_CMDLINE_ONLY TRUE
)
endif
(
GCC_VERSION VERSION_EQUAL 4.4.7
)
if
(
GCC_VERSION VERSION_GREATER 4.4.7
)
message
(
STATUS
"Detected gcc > 4.4.7 - switching on support for c++1y"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++1y"
)
endif
(
GCC_VERSION VERSION_GREATER 4.4.
6
)
endif
(
GCC_VERSION VERSION_GREATER 4.4.
7
)
endif
(
CMAKE_COMPILER_IS_GNUCC
)
set
(
GCC_VERSION_GE_4_8_0 FALSE
)
if
(
CMAKE_COMPILER_IS_GNUCC
AND
((
GCC_VERSION VERSION_GREATER 4.8.0
)
OR
(
GCC_VERSION VERSION_EQUAL 4.8.0
)))
set
(
GCC_VERSION_GE_4_8_0 TRUE
)
endif
(
CMAKE_COMPILER_IS_GNUCC
AND
((
GCC_VERSION VERSION_GREATER 4.8.0
)
OR
(
GCC_VERSION VERSION_EQUAL 4.8.0
)))
if
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
message
(
STATUS
"Detected clang - switching on support for c++0x"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++0x"
)
endif
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
# Generate the compilation variables, if needed
if
(
NOT DEFINED SKIP_UNIT_TESTS
)
message
(
STATUS
"Setting SKIP_UNIT_TESTS to the value of 0"
)
...
...
@@ -109,16 +104,21 @@ ELSE(DEFINED PackageOnly)
include_directories
(
${
PROJECT_SOURCE_DIR
}
)
include_directories
(
${
CMAKE_BINARY_DIR
}
)
add_subdirectory
(
catalogue
)
add_subdirectory
(
cmdline
)
add_subdirectory
(
common
)
add_subdirectory
(
objectstore
)
add_subdirectory
(
rdbms
)
add_subdirectory
(
remotens
)
add_subdirectory
(
scheduler
)
add_subdirectory
(
tapeserver
)
add_subdirectory
(
tests
)
add_subdirectory
(
xroot_plugins
)
if
(
BUILD_CMDLINE_ONLY
)
message
(
STATUS
"Build cmdline only"
)
add_subdirectory
(
cmdline
)
else
(
BUILD_CMDLINE_ONLY
)
add_subdirectory
(
catalogue
)
add_subdirectory
(
cmdline
)
add_subdirectory
(
common
)
add_subdirectory
(
objectstore
)
add_subdirectory
(
rdbms
)
add_subdirectory
(
remotens
)
add_subdirectory
(
scheduler
)
add_subdirectory
(
tapeserver
)
add_subdirectory
(
tests
)
add_subdirectory
(
xroot_plugins
)
endif
(
BUILD_CMDLINE_ONLY
)
#Generate version information
configure_file
(
${
PROJECT_SOURCE_DIR
}
/version.hpp.in
...
...
cta.spec.in
View file @
aa3b2675
...
...
@@ -82,11 +82,34 @@ cd build
%check
# The CTA client is the only component of CTA that can be compiled on both SLC6
# and C77, therefore thereis no unittest for it
%if "%{?dist}" == ".slc6" || "%{?dist}" == ".el6"
%define skip_unit_tests 1
%endif
%if "%{skip_unit_tests}" == "0"
cd build
%{__make} shortunittests
%endif
# The CTA client is the only component of CTA that can be compiled on both SLC6
# and C77
%if "%{?dist}" == ".slc6" || "%{?dist}" == ".el6"
%package -n cta-cli
Summary: CERN Tape Archive: command line interface
Group: Application/CTA
requires: xrootd >= 4.3
%description -n cta-cli
CERN Tape Archive:
The xroot plugin
%files -n cta-cli
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/cta
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-cli.conf
%else
# The packages will be cta-taped, cta-frontend, cta-cli
%package -n cta-taped
...
...
@@ -135,8 +158,6 @@ CERN Tape Archive:
The xroot plugin
%files -n cta-cli
%defattr(-,root,root)
%attr(0755,root,root) %{_libdir}/libctacommon.so
%attr(0755,root,root) %{_libdir}/libctautils.so
%attr(0755,root,root) %{_bindir}/cta
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-cli.conf
...
...
@@ -240,3 +261,4 @@ Utilities to faciliate working with the mediachangers
%attr(0755,root,root) %{_bindir}/cta-mediachanger-mount
%attr(0644,root,bin) %doc /usr/share/man/man1/cta-mediachanger-dismount.1cta.gz
%attr(0644,root,bin) %doc /usr/share/man/man1/cta-mediachanger-mount.1cta.gz
%endif
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment