Skip to content

Commit

Permalink
Clean up CMake files
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Jul 7, 2023
1 parent 04bd9a2 commit c60babb
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 17 deletions.
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
for rpm in $RPMS
do
docker exec runner \
rpm -qlp "/root/build/pki/RPMS/$rpm" | tee -a files
rpm -qlp "/root/build/pki/RPMS/$rpm" | tee -a file_list
done
# exclude RPM-specific files
Expand All @@ -57,7 +57,7 @@ jobs:
-e '/^\/usr\/share\/doc\//d' \
-e '/^\/usr\/lib\/.build-id\//d' \
-e '/__pycache__/d' \
files
file_list
displayName: Get list of files from RPM packages
- script: |
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
displayName: Install PKI with CMake
- script: |
readarray -t files < files
readarray -t files < file_list
docker exec runner ls -ld "${files[@]}"
displayName: Compare CMake and RPM files
Expand Down
4 changes: 2 additions & 2 deletions base/console/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ project(console NONE)

# build console classes
javac(pki-console-classes
DEPENDS
pki-common-jar
SOURCES
src/main/java/*.java
CLASSPATH
Expand All @@ -16,6 +14,8 @@ javac(pki-console-classes
${JSS_JAR} ${COMMONS_CODEC_JAR}
OUTPUT_DIR
${CMAKE_CURRENT_BINARY_DIR}/classes
DEPENDS
pki-common-jar
)

set(PKI_CONSOLE_JAR ${CMAKE_BINARY_DIR}/dist/pki-console.jar
Expand Down
4 changes: 2 additions & 2 deletions base/est/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ javac(pki-est-classes
${PKI_TOMCAT_JAR}
${PKI_TOMCAT_9_0_JAR}
${PKI_SERVER_JAR}
DEPENDS
pki-server-jar
OUTPUT_DIR
${CMAKE_CURRENT_BINARY_DIR}/classes
DEPENDS
pki-server-jar
)

set(PKI_EST_JAR ${CMAKE_BINARY_DIR}/dist/pki-est.jar
Expand Down
4 changes: 2 additions & 2 deletions base/server-webapp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ project(server-webapp)

# build server-webapp classes
javac(pki-server-webapp-classes
DEPENDS
pki-server-jar
SOURCES
src/main/java/*.java
CLASSPATH
Expand All @@ -16,6 +14,8 @@ javac(pki-server-webapp-classes
${PKI_SERVER_JAR}
OUTPUT_DIR
${CMAKE_CURRENT_BINARY_DIR}/classes
DEPENDS
pki-server-jar
)

set(PKI_SERVER_WEBAPP_JAR ${CMAKE_BINARY_DIR}/dist/pki-server-webapp.jar
Expand Down
8 changes: 4 additions & 4 deletions base/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ jar(pki-server-jar
if(RUN_TESTS)
# build pki-server-test
javac(pki-server-test-classes
DEPENDS
pki-common-test-classes pki-common-jar pki-server-jar
SOURCES
src/test/java/*.java
CLASSPATH
Expand All @@ -77,11 +75,11 @@ if(RUN_TESTS)
${OPENTEST4J_JAR} ${JAXRS_API_JAR}
OUTPUT_DIR
${CMAKE_BINARY_DIR}/test/classes
DEPENDS
pki-common-test-classes pki-common-jar pki-server-jar
)

add_junit_test(test-pki-server
DEPENDS
pki-server-test-classes
CLASSPATH
${SLF4J_API_JAR} ${SLF4J_SIMPLE_JAR}
${PKI_COMMON_JAR} ${PKI_SERVER_JAR}
Expand All @@ -96,6 +94,8 @@ if(RUN_TESTS)
${OPENTEST4J_JAR} ${JAXRS_API_JAR}
REPORTS_DIR
reports
DEPENDS
pki-server-test-classes
)
endif(RUN_TESTS)

Expand Down
4 changes: 3 additions & 1 deletion base/tks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ javac(pki-tks-classes
pki-server-jar
)

set(PKI_TKS_JAR ${CMAKE_BINARY_DIR}/dist/pki-tks.jar CACHE INTERNAL "pki-tks.jar")
set(PKI_TKS_JAR ${CMAKE_BINARY_DIR}/dist/pki-tks.jar
CACHE INTERNAL "pki-tks.jar"
)

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/main/resources/META-INF/MANIFEST.MF
Expand Down
2 changes: 1 addition & 1 deletion base/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ javac(pki-tools-classes
OUTPUT_DIR
${CMAKE_CURRENT_BINARY_DIR}/classes
DEPENDS
pki-common-jar tkstool
pki-common-jar
)

set(PKI_TOOLS_JAR ${CMAKE_BINARY_DIR}/dist/pki-tools.jar
Expand Down
4 changes: 2 additions & 2 deletions base/tps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ configure_file(
)

jar(pki-tps-jar
DEPENDS
pki-tps-classes
CREATE
${PKI_TPS_JAR}
OPTIONS
Expand All @@ -45,6 +43,8 @@ jar(pki-tps-jar
${CMAKE_CURRENT_BINARY_DIR}/MANIFEST.MF
INPUT_DIR
${CMAKE_CURRENT_BINARY_DIR}/classes
DEPENDS
pki-tps-classes
)

# TPS does not support admin console.
Expand Down

0 comments on commit c60babb

Please sign in to comment.