Skip to content

CMake: Set GCC version specific subfolder for MinGW #4671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Modelica/Resources/BuildProjects/CMake/Modelica_platform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ function(get_modelica_platform_name_with_compiler_version var)
set(PLATFORM_PATH_SUFFIX "${PLATFORM_PATH_SUFFIX}/vs2019")
elseif(MSVC_VERSION GREATER_EQUAL 1930 AND MSVC_VERSION LESS 1950)
set(PLATFORM_PATH_SUFFIX "${PLATFORM_PATH_SUFFIX}/vs2022")
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
execute_process(
COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(GCC_VERSION)
string(REPLACE "." "" GCC_VERSION_NO_DOTS "${GCC_VERSION}")
set(PLATFORM_PATH_SUFFIX "${PLATFORM_PATH_SUFFIX}/gcc${GCC_VERSION_NO_DOTS}")
endif()
endif()
endif()

Expand Down