diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index da054cd..3314599 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -39,11 +39,11 @@ jobs: shell: bash run: | if [ "${{ matrix.config.cxx }}" == "g++" ]; then - cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" - cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" + cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" + cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" else - cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release - cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug + cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release + cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug fi - name: Build main target @@ -61,10 +61,15 @@ jobs: working-directory: ./cmake-build-release run: | if [ "$RUNNER_OS" == "Windows" ]; then + if [ "${{ matrix.config.cxx }}" == "g++" ]; then + cd bin + ./cpp_tests.exe --help + else ./cpp_tests.exe --help + fi else - cd bin - ./cpp_tests --help + cd bin + ./cpp_tests --help fi - name: Run tests @@ -72,15 +77,16 @@ jobs: working-directory: ./cmake-build-debug run: | if [ "$RUNNER_OS" == "Windows" ]; then - if [ "${{ matrix.config.cxx }}" == "g++" ]; then - echo "Currently unable to run tests on ${{ matrix.config.name }}. See https://gitmemories.com/cristianadam/HelloWorld/issues/12 and https://github.com/microsoft/vscode-cmake-tools/issues/2451" - # ./cpp_tests_tests.exe - else - ./cpp_tests_tests.exe - fi - else + if [ "${{ matrix.config.cxx }}" == "g++" ]; then + # echo "Currently unable to run tests on ${{ matrix.config.name }}. See https://gitmemories.com/cristianadam/HelloWorld/issues/12 and https://github.com/microsoft/vscode-cmake-tools/issues/2451" cd tests - ./cpp_tests_tests + ./cpp_tests_tests.exe + else + ./cpp_tests_tests.exe + fi + else + cd tests + ./cpp_tests_tests fi memory-leaks: diff --git a/CMakeLists.txt b/CMakeLists.txt index fbb7a76..51d7c2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ project( set(CMAKE_CXX_STANDARD 20) -if(WIN32) # Install dlls in the same directory as the executable on Windows +if(WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # Install dlls in the same directory as the executable on Windows MSVC set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})