menu_book Course Curriculum (CMake) expand_more
Foundations
Variables & Flow
Targets
Linking & Usage Requirements
Dependencies
Configuration
Build Automation
if elseif else
Learn if elseif else in CMake with a dedicated explanation, a topic-specific example, edge guidance, and a mastery check.
12 min read
•
Beginner
Advertisement
cmake-013.cmake
cmake
set(ENVIRONMENT "staging")
if(ENVIRONMENT STREQUAL "production")
message(STATUS "prod")
elseif(ENVIRONMENT STREQUAL "staging")
message(STATUS "stage")
else()
message(STATUS "dev")
endif()
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content