Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "In-source builds are not supported! Please use out of source builds:\n"
"$ cd scap-security-guide\n"
"$ rm CMakeCache.txt\n"
"$ mkdir build\n"
"$ cd build\n"
"$ cmake ../\n"
"$ make -j4"
Expand Down
Empty file removed build/.gitkeep
Empty file.
9 changes: 8 additions & 1 deletion build_product
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,11 @@ for p in "${all_cmake_products[@]}"; do
done
test "$chosen_product_encountered_among_cmake" = on || handle_wrong_argument "$chosen_product"

cd build && rm -rf * && cmake .. "${cmake_disable_all_args[@]}" "$(opt_product_in $chosen_product)" && make "$chosen_product"
cores=$(nproc 2>/dev/null) || cores=1

set -e
rm -rf build
mkdir build
cd build
cmake .. "${cmake_disable_all_args[@]}" "$(opt_product_in $chosen_product)"
make "-j${cores}" "$chosen_product"
20 changes: 14 additions & 6 deletions docs/manual/developer_guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ To build all the security content:

```bash
cd content/
mkdir build
cd build/
cmake ../
make -j4
Expand All @@ -111,6 +112,7 @@ security content only for *Red Hat Enterprise Linux 7*:

```bash
cd content/
mkdir build
cd build/
cmake ../
make -j4 rhel7
Expand All @@ -127,6 +129,7 @@ security content only for *Red Hat Enterprise Linux 7*:

```bash
cd content/
mkdir build
cd build/
cmake ../
make -j4 rhel7-content # SCAP XML files for RHEL7
Expand All @@ -141,6 +144,7 @@ make -j4 rhel7 # everything above for RHEL7

```bash
cd content/
mkdir build
cd build/
cmake-gui ../
make -j4
Expand All @@ -150,6 +154,7 @@ make -j4

```bash
cd content/
mkdir build
cd build/
cmake -G Ninja ../
ninja-build # depending on the distribution just "ninja" may also work
Expand Down Expand Up @@ -209,6 +214,7 @@ running our test suite against the build output. This is done with CTest:

```bash
cd content/
mkdir build
cd build/
cmake ../
make -j4
Expand All @@ -223,6 +229,7 @@ System-wide installation:

```bash
cd content/
mkdir build
cd build/
cmake ../
make -j4
Expand All @@ -233,6 +240,7 @@ sudo make install

```bash
cd content/
mkdir build
cd build/
cmake ../
make -j4
Expand All @@ -243,6 +251,7 @@ sudo make DESTDIR=/opt/absolute/path/to/ssg/ install

```bash
cd content/
mkdir build
cd build/
cmake -G Ninja ../
ninja-build
Expand All @@ -254,6 +263,7 @@ ninja-build install
To build a tarball with all the source code:

```bash
mkdir build
cd build/
make package_source
```
Expand All @@ -263,6 +273,7 @@ make package_source
To build a package for testing purposes:

```bash
mkdir build
cd build/
# disable any product you would not like to bundle in the package. For example:
cmake -DSSG_PRODUCT_FEDORA:BOOL=OFF../
Expand All @@ -279,6 +290,7 @@ packages.
To build a zip file with all generated source data streams and kickstarts:

```bash
mkdir build
cd build/
make zipfile
```
Expand Down Expand Up @@ -321,7 +333,6 @@ For example:
[source,bash]
----
$ ls -1 scap-security-guide
build
build_config.yml.in
build-scripts
chromium
Expand Down Expand Up @@ -363,9 +374,6 @@ wrlinux
|===
|Directory |Description

|`build`
| Can be used to build the content using CMake.

|`build-scripts`
| Scripts used by the build system.

Expand Down Expand Up @@ -617,7 +625,6 @@ The SSG content is primarily divided by platform and it can be seen on its direc

----
*scap-security-guide/*
├── _build_
├── _build-scripts_
├── chromium
├── debian8
Expand All @@ -640,7 +647,7 @@ The SSG content is primarily divided by platform and it can be seen on its direc
├── wrlinux
----

Except for _build_ and _docs_, each directory contains checks and remediations that are useful and make sense to be used on that platform.
Except for _docs_, each directory contains checks and remediations that are useful and make sense to be used on that platform.
The shared directory contains checks and remediations that can be used by more than one platform.

=== Contributing
Expand Down Expand Up @@ -1092,6 +1099,7 @@ This is an example of a patch to add a new template into the templating system:
SCAP Security Guide uses ctest to orchestrate testing upstream. To run the test suite go to the build folder and execute `ctest`:

----
mkdir build
cd build/
ctest -j 4
----
Expand Down