Skip to content

Commit 09586f0

Browse files
committed
style: cmake: drop extra spaces with commands
1 parent 1ce00ea commit 09586f0

36 files changed

+140
-140
lines changed

CMakeLists.txt

+40-40
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ endif()
1010

1111
project(scap-security-guide NONE)
1212

13-
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
13+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
1414
# This is set to silence GNUInstallDirs warning about no language being used with cmake
1515
set(CMAKE_INSTALL_LIBDIR "/nowhere")
1616
include(GNUInstallDirs)
1717
include(FindPythonModule)
1818

19-
if ( "$ENV{PYTHONPATH}" STREQUAL "" )
19+
if("$ENV{PYTHONPATH}" STREQUAL "")
2020
set(ENV{PYTHONPATH} "${PROJECT_SOURCE_DIR}")
2121
else()
2222
set(ENV{PYTHONPATH} "${PROJECT_SOURCE_DIR}:$ENV{PYTHONPATH}")
@@ -114,7 +114,7 @@ message(STATUS "")
114114

115115
# Strictly speaking in-source will work but will be very messy, let's
116116
# discourage our users from using them
117-
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
117+
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
118118
message(FATAL_ERROR "In-source builds are not supported! Please use out of source builds:\n"
119119
"$ cd content\n"
120120
"$ rm CMakeCache.txt\n"
@@ -151,28 +151,28 @@ cmake_dependent_option(ENABLE_PYTHON_COVERAGE "Enable Python tests with coverage
151151

152152
find_package(OpenSCAP REQUIRED)
153153

154-
if (NOT SSG_TARGET_OVAL_VERSION VERSION_EQUAL "5.11")
154+
if(NOT SSG_TARGET_OVAL_VERSION VERSION_EQUAL "5.11")
155155
message(WARNING "You are targetting OVAL version ${SSG_TARGET_OVAL_VERSION}. In SSG we support/test 5.11 only!")
156156
endif()
157157

158158
# OCP4 requires non-standard extensions. Vanilla OpenSCAP 1.2 doesn't support
159159
# it. See also: https://github.com/ComplianceAsCode/content/issues/6798
160-
if ("${OSCAP_VERSION}" VERSION_LESS "1.3.4" AND SSG_PRODUCT_OCP4)
160+
if("${OSCAP_VERSION}" VERSION_LESS "1.3.4" AND SSG_PRODUCT_OCP4)
161161
set(SSG_PRODUCT_OCP4 OFF)
162162
message(WARNING "Won't build OCP4 content as it requires an OpenSCAP version with OCP4 support. See also: https://github.com/ComplianceAsCode/content/issues/6798. n.b.: if 1.3.4 fails to build OCP4 content, please update to 1.3.5")
163163
endif()
164164

165165
# EKS requires non-standard extensions. Vanilla OpenSCAP 1.2 doesn't support
166166
# it. See also: https://github.com/ComplianceAsCode/content/issues/6798
167-
if ("${OSCAP_VERSION}" VERSION_LESS "1.3.4" AND SSG_PRODUCT_EKS)
167+
if("${OSCAP_VERSION}" VERSION_LESS "1.3.4" AND SSG_PRODUCT_EKS)
168168
set(SSG_PRODUCT_EKS OFF)
169169
message(WARNING "Won't build EKS content as it requires an OpenSCAP version with EKS support. See also: https://github.com/ComplianceAsCode/content/issues/6798. n.b.: if 1.3.4 fails to build EKS content, please update to 1.3.5")
170170
endif()
171171

172172

173-
if (SSG_JINJA2_CACHE_ENABLED)
173+
if(SSG_JINJA2_CACHE_ENABLED)
174174
file(MAKE_DIRECTORY "${SSG_JINJA2_CACHE_DIR}")
175-
if (NOT EXISTS "${SSG_JINJA2_CACHE_DIR}")
175+
if(NOT EXISTS "${SSG_JINJA2_CACHE_DIR}")
176176
message(FATAL_ERROR "jinja2 cache dir was set to '${SSG_JINJA2_CACHE_DIR}'. This directory doesn't seem to exist and attempt to create it has failed.")
177177
endif()
178178
set(SSG_JINJA2_CACHE_ENABLED_BOOL "true")
@@ -181,17 +181,17 @@ else()
181181
endif()
182182

183183
find_program(XSLTPROC_EXECUTABLE NAMES xsltproc)
184-
if (NOT XSLTPROC_EXECUTABLE)
184+
if(NOT XSLTPROC_EXECUTABLE)
185185
message(SEND_ERROR "xsltproc is required!")
186186
endif()
187187

188188
find_program(XMLLINT_EXECUTABLE NAMES xmllint)
189-
if (NOT XMLLINT_EXECUTABLE)
189+
if(NOT XMLLINT_EXECUTABLE)
190190
message(SEND_ERROR "xmllint is required!")
191191
endif()
192192

193193
find_program(SED_EXECUTABLE NAMES sed)
194-
if (NOT SED_EXECUTABLE)
194+
if(NOT SED_EXECUTABLE)
195195
message(SEND_ERROR "sed is required!")
196196
endif()
197197

@@ -250,7 +250,7 @@ message(STATUS "Separate SCAP files: ${SSG_SEPARATE_SCAP_FILES_ENABLED}")
250250
message(STATUS "Ansible Playbooks: ${SSG_ANSIBLE_PLAYBOOKS_ENABLED}")
251251
message(STATUS "Ansible Playbooks Per Rule: ${SSG_ANSIBLE_PLAYBOOKS_PER_RULE_ENABLED}")
252252
message(STATUS "Bash scripts: ${SSG_BASH_SCRIPTS_ENABLED}")
253-
if (SSG_JINJA2_CACHE_ENABLED)
253+
if(SSG_JINJA2_CACHE_ENABLED)
254254
message(STATUS "jinja2 cache: enabled")
255255
message(STATUS "jinja2 cache dir: ${SSG_JINJA2_CACHE_DIR}")
256256
else()
@@ -325,89 +325,89 @@ endif()
325325

326326
ssg_build_man_page()
327327

328-
if (SSG_PRODUCT_ALINUX2)
328+
if(SSG_PRODUCT_ALINUX2)
329329
add_subdirectory("products/alinux2" "alinux2")
330330
endif()
331-
if (SSG_PRODUCT_ALINUX3)
331+
if(SSG_PRODUCT_ALINUX3)
332332
add_subdirectory("products/alinux3" "alinux3")
333333
endif()
334-
if (SSG_PRODUCT_ANOLIS8)
334+
if(SSG_PRODUCT_ANOLIS8)
335335
add_subdirectory("products/anolis8" "anolis8")
336336
endif()
337-
if (SSG_PRODUCT_CHROMIUM)
337+
if(SSG_PRODUCT_CHROMIUM)
338338
add_subdirectory("products/chromium" "chromium")
339339
endif()
340340

341-
if (SSG_PRODUCT_DEBIAN10)
341+
if(SSG_PRODUCT_DEBIAN10)
342342
add_subdirectory("products/debian10" "debian10")
343343
endif()
344-
if (SSG_PRODUCT_DEBIAN11)
344+
if(SSG_PRODUCT_DEBIAN11)
345345
add_subdirectory("products/debian11" "debian11")
346346
endif()
347-
if (SSG_PRODUCT_EXAMPLE)
347+
if(SSG_PRODUCT_EXAMPLE)
348348
add_subdirectory("products/example" "example")
349349
endif()
350-
if (SSG_PRODUCT_EKS)
350+
if(SSG_PRODUCT_EKS)
351351
add_subdirectory("products/eks" "eks")
352352
endif()
353-
if (SSG_PRODUCT_FEDORA)
353+
if(SSG_PRODUCT_FEDORA)
354354
add_subdirectory("products/fedora" "fedora")
355355
endif()
356-
if (SSG_PRODUCT_FIREFOX)
356+
if(SSG_PRODUCT_FIREFOX)
357357
add_subdirectory("products/firefox" "firefox")
358358
endif()
359-
if (SSG_PRODUCT_MACOS1015)
359+
if(SSG_PRODUCT_MACOS1015)
360360
add_subdirectory("products/macos1015" "macos1015")
361361
endif()
362-
if (SSG_PRODUCT_OCP4)
362+
if(SSG_PRODUCT_OCP4)
363363
add_subdirectory("products/ocp4" "ocp4")
364364
endif()
365-
if (SSG_PRODUCT_RHCOS4)
365+
if(SSG_PRODUCT_RHCOS4)
366366
add_subdirectory("products/rhcos4" "rhcos4")
367367
endif()
368-
if (SSG_PRODUCT_OL7)
368+
if(SSG_PRODUCT_OL7)
369369
add_subdirectory("products/ol7" "ol7")
370370
endif()
371-
if (SSG_PRODUCT_OL8)
371+
if(SSG_PRODUCT_OL8)
372372
add_subdirectory("products/ol8" "ol8")
373373
endif()
374-
if (SSG_PRODUCT_OL9)
374+
if(SSG_PRODUCT_OL9)
375375
add_subdirectory("products/ol9" "ol9")
376376
endif()
377-
if (SSG_PRODUCT_OPENSUSE)
377+
if(SSG_PRODUCT_OPENSUSE)
378378
add_subdirectory("products/opensuse" "opensuse")
379379
endif()
380-
if (SSG_PRODUCT_RHEL7)
380+
if(SSG_PRODUCT_RHEL7)
381381
add_subdirectory("products/rhel7" "rhel7")
382382
endif()
383-
if (SSG_PRODUCT_RHEL8)
383+
if(SSG_PRODUCT_RHEL8)
384384
add_subdirectory("products/rhel8" "rhel8")
385385
endif()
386-
if (SSG_PRODUCT_RHEL9)
386+
if(SSG_PRODUCT_RHEL9)
387387
add_subdirectory("products/rhel9" "rhel9")
388388
endif()
389-
if (SSG_PRODUCT_RHV4)
389+
if(SSG_PRODUCT_RHV4)
390390
add_subdirectory("products/rhv4" "rhv4")
391391
endif()
392-
if (SSG_PRODUCT_SLE12)
392+
if(SSG_PRODUCT_SLE12)
393393
add_subdirectory("products/sle12" "sle12")
394394
endif()
395-
if (SSG_PRODUCT_SLE15)
395+
if(SSG_PRODUCT_SLE15)
396396
add_subdirectory("products/sle15" "sle15")
397397
endif()
398-
if (SSG_PRODUCT_UBUNTU1604)
398+
if(SSG_PRODUCT_UBUNTU1604)
399399
add_subdirectory("products/ubuntu1604" "ubuntu1604")
400400
endif()
401-
if (SSG_PRODUCT_UBUNTU1804)
401+
if(SSG_PRODUCT_UBUNTU1804)
402402
add_subdirectory("products/ubuntu1804" "ubuntu1804")
403403
endif()
404-
if (SSG_PRODUCT_UBUNTU2004)
404+
if(SSG_PRODUCT_UBUNTU2004)
405405
add_subdirectory("products/ubuntu2004" "ubuntu2004")
406406
endif()
407-
if (SSG_PRODUCT_UBUNTU2204)
407+
if(SSG_PRODUCT_UBUNTU2204)
408408
add_subdirectory("products/ubuntu2204" "ubuntu2204")
409409
endif()
410-
if (SSG_PRODUCT_UOS20)
410+
if(SSG_PRODUCT_UOS20)
411411
add_subdirectory("products/uos20" "uos20")
412412
endif()
413413

cmake/FindOpenSCAP.cmake

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ foreach(NAME ${OPENSCAP_POSSIBLE_ROOT_DIRS})
2626
)
2727
endforeach()
2828

29-
if (NOT EXISTS "${OPENSCAP_XCCDF_XSL_1_2}")
29+
if(NOT EXISTS "${OPENSCAP_XCCDF_XSL_1_2}")
3030
list(APPEND OscapErrors "ERROR: The OPENSCAP XSL XCCDF file was not found. Please specify the OPENSCAP ROOT DIR with the OPENSCAP_ROOT_DIR environment variable.")
3131
endif()
3232

33-
if (NOT EXISTS "${OPENSCAP_OSCAP_EXECUTABLE}")
33+
if(NOT EXISTS "${OPENSCAP_OSCAP_EXECUTABLE}")
3434
list(APPEND OscapErrors "ERROR: The OPENSCAP executable was not found. Please specify the OPENSCAP ROOT DIR with the OPENSCAP_ROOT_DIR environment variable.")
3535
endif()
3636

37-
if (OscapErrors)
37+
if(OscapErrors)
3838
message(FATAL_ERROR "${OscapErrors}")
3939
endif()
4040

cmake/GNUInstallDirs.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
8080
# See http://wiki.debian.org/Multiarch
8181
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
8282
AND NOT CMAKE_CROSSCOMPILING)
83-
if (EXISTS "/etc/debian_version") # is this a debian system ?
83+
if(EXISTS "/etc/debian_version") # is this a debian system ?
8484
if(CMAKE_LIBRARY_ARCHITECTURE)
8585
set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
86-
endif()
86+
endif()
8787
else() # not debian, rely on CMAKE_SIZEOF_VOID_P:
8888
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
8989
message(AUTHOR_WARNING

0 commit comments

Comments
 (0)