From c534c4cf09bb424bdc12aa7345e1b85c04165c44 Mon Sep 17 00:00:00 2001 From: Marcus Burghardt Date: Mon, 27 May 2024 16:34:19 +0200 Subject: [PATCH] WIP: Testing CI --- CMakeLists.txt | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 866d3314ec15..2f40c678b2d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,20 +58,6 @@ set(SSG_SHARED_REFS "${SSG_SHARED}/references") set(SSG_SHARED_TRANSFORMS "${SSG_SHARED}/transforms") set(SSG_UTILS_SCRIPTS "${CMAKE_SOURCE_DIR}/utils") -if(SSG_JINJA2_CACHE_ENABLED) - file(MAKE_DIRECTORY "${SSG_JINJA2_CACHE_DIR}") - if(NOT EXISTS "${SSG_JINJA2_CACHE_DIR}") - 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.") - endif() - set(SSG_JINJA2_CACHE_ENABLED_BOOL "true") -else() - set(SSG_JINJA2_CACHE_ENABLED_BOOL "false") -endif() - -message(STATUS "SCAP Security Guide ${SSG_VERSION}") -message(STATUS "(see ${CMAKE_SOURCE_DIR}/docs/manual/developer_guide.adoc for build instructions)") -message(STATUS "") - # Content Generation Opetions option(SSG_ANSIBLE_PLAYBOOKS_ENABLED "If enabled, Ansible Playbooks for each profile will be built and installed." TRUE) option(SSG_ANSIBLE_PLAYBOOKS_PER_RULE_ENABLED "If enabled, Ansible Playbooks for each rule will be built and installed." FALSE) @@ -134,12 +120,6 @@ option(SSG_PRODUCT_UOS20 "If enabled, the Uos 20 SCAP content will be built" ${S option(SSG_CENTOS_DERIVATIVES_ENABLED "If enabled, CentOS derivative content will be built from the RHEL content" TRUE) option(SSG_SCIENTIFIC_LINUX_DERIVATIVES_ENABLED "If enabled, Scientific Linux derivative content will be built from the RHEL content" TRUE) -if("$ENV{PYTHONPATH}" STREQUAL "") - set(ENV{PYTHONPATH} "${PROJECT_SOURCE_DIR}") -else() - set(ENV{PYTHONPATH} "${PROJECT_SOURCE_DIR}:$ENV{PYTHONPATH}") -endif() - # Required Packages find_package(PythonInterp REQUIRED) find_package(OpenSCAP REQUIRED) @@ -157,11 +137,31 @@ find_program(XMLLINT_EXECUTABLE NAMES xmllint REQUIRED) find_program(XSLTPROC_EXECUTABLE NAMES xsltproc REQUIRED) find_program(YAMLLINT_EXECUTABLE NAMES yamllint) +if(SSG_JINJA2_CACHE_ENABLED) + file(MAKE_DIRECTORY "${SSG_JINJA2_CACHE_DIR}") + if(NOT EXISTS "${SSG_JINJA2_CACHE_DIR}") + 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.") + endif() + set(SSG_JINJA2_CACHE_ENABLED_BOOL "true") +else() + set(SSG_JINJA2_CACHE_ENABLED_BOOL "false") +endif() + +message(STATUS "SCAP Security Guide ${SSG_VERSION}") +message(STATUS "(see ${CMAKE_SOURCE_DIR}/docs/manual/developer_guide.adoc for build instructions)") +message(STATUS "") + +if("$ENV{PYTHONPATH}" STREQUAL "") + set(ENV{PYTHONPATH} "${PROJECT_SOURCE_DIR}") +else() + set(ENV{PYTHONPATH} "${PROJECT_SOURCE_DIR}:$ENV{PYTHONPATH}") +endif() + message(STATUS "") message(STATUS "Find Python Modules:") set(Python_ADDITIONAL_VERSIONS 3 2) -find_python_module(jinja2 REQUIRED) find_python_module(yaml REQUIRED) +find_python_module(jinja2 REQUIRED) find_python_module(cmakelint) find_python_module(github) find_python_module(json2html)