lukka / run-cmake

GitHub Action to build C++ applications with CMake (CMakePresets.json), Ninja and vcpkg on GitHub.
MIT License
176 stars 19 forks source link

Multiline cmakeAppendedArgs Values? #20

Closed kwhat closed 4 years ago

kwhat commented 4 years ago

Is it possible to spread cmakeAppendedArgs across multiple lines?

For example, the cmakeAppendedArgs is getting quite long. Is there any way to break these apart?

      - name: Compile
        uses: lukka/run-cmake@v2.4
        with:
          cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
          cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
          cmakeAppendedArgs: '-DCMAKE_C_FLAGS=""-march=k8 -mtune=generic -O2 -g -fomit-frame-pointer -fno-stack-protector -pipe" -DCMAKE_VERBOSE_MAKEFILE=true -DENABLE_STATIC=ON'
          buildDirectory: ${{ github.workspace }}/build/

Thanks

lukka commented 4 years ago

You could add newlines inside single and double quoted argument, as shown in this workflow.

kwhat commented 4 years ago

Awesome, thanks!