diff --git a/lib/mini_portile2/mini_portile_cmake.rb b/lib/mini_portile2/mini_portile_cmake.rb index 8543645..fd7aa08 100644 --- a/lib/mini_portile2/mini_portile_cmake.rb +++ b/lib/mini_portile2/mini_portile_cmake.rb @@ -69,7 +69,8 @@ def cmake_compile_flags "-DCMAKE_SYSTEM_NAME=#{cmake_system_name}", "-DCMAKE_SYSTEM_PROCESSOR=#{cpu_type}", "-DCMAKE_C_COMPILER=#{c_compiler}", - "-DCMAKE_CXX_COMPILER=#{cxx_compiler}" + "-DCMAKE_CXX_COMPILER=#{cxx_compiler}", + "-DCMAKE_BUILD_TYPE=Release" ] end diff --git a/test/test_cmake.rb b/test/test_cmake.rb index c7bfb35..20abe75 100644 --- a/test/test_cmake.rb +++ b/test/test_cmake.rb @@ -96,7 +96,8 @@ def test_configure_defaults_with_macos "-DCMAKE_SYSTEM_NAME=Darwin", "-DCMAKE_SYSTEM_PROCESSOR=arm64", "-DCMAKE_C_COMPILER=some-host-clang", - "-DCMAKE_CXX_COMPILER=some-host-clang++" + "-DCMAKE_CXX_COMPILER=some-host-clang++", + "-DCMAKE_BUILD_TYPE=Release" ], recipe.configure_defaults) end @@ -119,7 +120,8 @@ def test_configure_defaults_with_manual_system_name "-DCMAKE_SYSTEM_NAME=Custom", "-DCMAKE_SYSTEM_PROCESSOR=x86_64", "-DCMAKE_C_COMPILER=gcc", - "-DCMAKE_CXX_COMPILER=g++" + "-DCMAKE_CXX_COMPILER=g++", + "-DCMAKE_BUILD_TYPE=Release" ], recipe.configure_defaults) end @@ -227,7 +229,8 @@ def default_x86_compile_flags "-DCMAKE_SYSTEM_NAME=Linux", "-DCMAKE_SYSTEM_PROCESSOR=x86_64", "-DCMAKE_C_COMPILER=gcc", - "-DCMAKE_CXX_COMPILER=g++" + "-DCMAKE_CXX_COMPILER=g++", + "-DCMAKE_BUILD_TYPE=Release" ] end