Yeah, you should use the option
command. You can set options from the command line this way:
//CMakeLists.txt
option(MyOption "MyOption" OFF)
//Command line
cmake -DMyOption=ON MyProjectFolder
Note that -DMyOption
must come before the path.
More Related Contents:
- How to use sed to replace only the first occurrence in a file?
- What is a faster alternative to Python’s http.server (or SimpleHTTPServer)?
- How to pass command line argument to gnuplot?
- What does cmd /C mean? [closed]
- How do you input command line arguments in IntelliJ IDEA?
- How to loop through files matching wildcard in batch file
- How to check in command-line if a given file or directory is locked (used by any process)?
- Why is my command prompt freezing on Windows 10?
- How to check if ping responded or not in a batch file
- How to suppress specific MSBuild warning
- Encoding a readable movie by QuickTime using FFMPEG
- Running command line silently with VbScript and getting output?
- How to use command line arguments in Fortran?
- How to animate the command line?
- xcopy file, rename, suppress “Does xxx specify a file name…” message
- How can I show lines in common (reverse diff)?
- PowerShell – Start-Process and Cmdline Switches
- Command prompt won’t change directory to another drive
- How to pass argument to Makefile from command line?
- String replacement in batch file
- How to script FTP upload and download
- Get certificate fingerprint of HTTPS server from command line?
- wmic error (invalid XSL format) in windows7
- CMake’s execute_process and arbitrary shell scripts
- Is it possible to accept custom command line parameters with Inno Setup
- Using command line arguments in VBscript
- dos batch iterate through a delimited string
- SAS Display Manager commands
- find filenames NOT ending in specific extensions on Unix?
- Modify cmd.exe properties using the command prompt