Skip to content

Commit

Permalink
Set the default build type to Release
Browse files Browse the repository at this point in the history
  • Loading branch information
JanOlencki committed Nov 24, 2023
1 parent 3174c92 commit 62549b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/run-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
if: ${{ runner.os != 'Windows' }}
run: |
cd ${{ env.SAMPLE_DIR }}/build
cmake .. -DCMAKE_BUILD_TYPE=Release -DUSER_RENODE_DIR=../../../renode -DUSER_VERILATOR_DIR=../../../verilator ${{ inputs.custom_cmake_args }}
cmake .. -DUSER_RENODE_DIR=../../../renode -DUSER_VERILATOR_DIR=../../../verilator ${{ inputs.custom_cmake_args }}
make
cp verilated ${{ github.workspace }}/${{ env.ARTIFACTS_DIR_NAME }}/
Expand Down
5 changes: 5 additions & 0 deletions cmake/build-cosimulation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Type of build" FORCE)
message(STATUS "Setting build type to ${CMAKE_BUILD_TYPE} as none was specified")
endif()

if(NOT USER_RENODE_DIR AND DEFINED ENV{RENODE_ROOT})
message(STATUS "Using RENODE_ROOT from environment as USER_RENODE_DIR")
set(USER_RENODE_DIR $ENV{RENODE_ROOT} CACHE PATH "Absolute (!) path to Renode root directory or any other that contains VerilatorIntegrationLibrary.")
Expand Down

0 comments on commit 62549b7

Please sign in to comment.