Skip to content

Commit

Permalink
have compilation tests use CMakeDeps generator
Browse files Browse the repository at this point in the history
  • Loading branch information
bernedom committed Sep 22, 2023
1 parent 67d5f2f commit 75b05d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/compilation-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ oneTimeSetUp(){
conan install . --output-folder=${BUILD_DIR} --build=missing --settings=build_type=Release

# install SI
cmake ${ROOT_DIR} -B${BUILD_DIR} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_PATH} -DBUILD_TESTING=off -DCMAKE_BUILD_TYPE=Release --toolchain=${BUILD_DIR}/conan_toolchain.cmake -G Ninja > /dev/null
cmake ${ROOT_DIR} -B${BUILD_DIR} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_PATH} -DBUILD_TESTING=off -DCMAKE_BUILD_TYPE=Release -G Ninja > /dev/null
cmake --build ${BUILD_DIR} --config Release --target install > /dev/null

if [ -d ${BUILD_DIR} ]; then
Expand All @@ -53,15 +53,15 @@ tearDown(){

testSISelfSuccessfulCompilationWhenDefaultInvocation() {

cmake ${ROOT_DIR} -B${BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -G Ninja --toolchain=${BUILD_DIR}/conan_toolchain.cmake > /dev/null
cmake ${ROOT_DIR} -B${BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -G Ninja > /dev/null
assertEquals "Configuration successful" 0 $?
cmake --build ${BUILD_DIR} --config Release > /dev/null
assertEquals "Building successful" 0 $?
}

testSISelfFailedCompilationWhenImplicitConversionDisabled() {

cmake ${ROOT_DIR} -B${BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-DSI_DISABLE_IMPLICIT_RATIO_CONVERSION" -G Ninja --toolchain=${BUILD_DIR}/conan_toolchain.cmake > /dev/null
cmake ${ROOT_DIR} -B${BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-DSI_DISABLE_IMPLICIT_RATIO_CONVERSION" -G Ninja > /dev/null
assertEquals "Configuration successful" 0 $?
cmake --build ${BUILD_DIR} --config Release
assertNotEquals "Building fails" 0 $?
Expand Down

0 comments on commit 75b05d9

Please sign in to comment.