How do I determine the host operating system when using CMAKE?

I am using a custom toolchain file to develop an embedded system. CMAKE_SYSTEM_NAME is set to “Generic”, so variables such as WIN32, UNIX cannot be used to check the operating system of the configuration item. But I need Configure the project in different ways on different OS.

How to determine the operating system for cmake?

check variables that describe the system.

Special interest The ones are the CMAKE_HOST_SYSTEM variable and its relatives. Unfortunately, the exact behavior of these largely depends on the platform and toolchain used. If you are not getting a reasonable value for your environment, please consider writing to the CMake mailing list for Please provide better support for your platform.

I am using a custom toolchain file to develop an embedded system. CMAKE_SYSTEM_NAME is set to “Generic”, so WIN32, UNIX Such variables cannot be used to check the operating system of the configuration project. But I need to configure the project in different ways on different OS.

How to determine the operating system of cmake?

Check the variables that describe the system.

Of particular interest is the CMAKE_HOST_SYSTEM variable and its relatives. Unfortunately, The exact behavior of these largely depends on the platform and toolchain used. If you are not getting a reasonable value for your environment, please consider writing to the CMake mailing list to request better support for your platform. /p>

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5349 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.