From 894835d50ad40f7ff8b21cc32d2adc0635178393 Mon Sep 17 00:00:00 2001 From: Pierre-Anthony Lemieux Date: Thu, 12 Oct 2023 11:08:02 -0700 Subject: [PATCH] Tweak CI --- .github/workflows/main.yaml | 2 +- CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 41ef504..7f3ca22 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -23,6 +23,6 @@ jobs: - name: Test Java run: mvn test - name: Configure CMake - run: cmake -DCXX_STANDARD=98 -B ${{github.workspace}}/build + run: cmake -DCI=1 -B ${{github.workspace}}/build - name: Test regxmllibc run: ctest diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d4c870..614676e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,11 @@ file(GLOB_RECURSE SRC_FILES src/main/cpp/*.cpp src/main/cpp/*.h ) add_library(${PROJECT_NAME} ${SRC_FILES}) install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) +if ( CI ) +# enforce C++98 conformance during CI + set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 98) +endif() + target_link_libraries ( ${PROJECT_NAME} ${XercesC_LIBRARY} ) foreach(source IN LISTS SRC_FILES)