fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
b62fa0675
master
1include ( FeatureSummary ) 2include ( FindRust ) 3find_package ( Rust REQUIRED ) 4 5set ( FISH_RUST_BUILD_DIR " ${ CMAKE_BINARY_DIR } /cargo" ) 6 7if ( DEFINED ASAN) 8list ( APPEND CARGO_FLAGS "-Z" "build-std" ) 9endif () 10if ( DEFINED TSAN) 11list ( APPEND CARGO_FLAGS "-Z" "build-std" ) 12list ( APPEND FISH_CARGO_FEATURES_LIST "tsan" ) 13endif () 14 15if ( Rust_CARGO_TARGET) 16set ( rust_target_dir " ${ FISH_RUST_BUILD_DIR } / ${ Rust_CARGO_TARGET } " ) 17else () 18set ( rust_target_dir " ${ FISH_RUST_BUILD_DIR } / ${ Rust_CARGO_HOST_TARGET } " ) 19endif () 20 21set ( rust_profile $ <IF: $ <CONFIG:Debug>,debug, $ <IF: $ <CONFIG:RelWithDebInfo>,release-with-debug,release>> ) 22 23if ( NOT DEFINED WITH_MESSAGE_LOCALIZATION) # Don't check for legacy options if the new one is defined, to help bisecting. 24if ( DEFINED WITH_GETTEXT) 25message ( FATAL_ERROR "the WITH_GETTEXT option is no longer supported, use -DWITH_MESSAGE_LOCALIZATION=ON|OFF" ) 26endif () 27endif () 28option ( WITH_MESSAGE_LOCALIZATION "Build with localization support. Requires `msgfmt` to work." ON ) 29# Enable gettext feature unless explicitly disabled. 30if ( NOT DEFINED WITH_MESSAGE_LOCALIZATIONOR " ${ WITH_MESSAGE_LOCALIZATION } " ) 31list ( APPEND FISH_CARGO_FEATURES_LIST "localize-messages" ) 32endif () 33 34add_feature_info ( Translation WITH_MESSAGE_LOCALIZATION "message localization (requires gettext)" ) 35 36list ( JOIN FISH_CARGO_FEATURES_LIST , FISH_CARGO_FEATURES )